PySMT 0.9.7.dev139__tar.gz → 0.9.7.dev333__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {PySMT-0.9.7.dev139/PySMT.egg-info → PySMT-0.9.7.dev333}/PKG-INFO +1 -1
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333/PySMT.egg-info}/PKG-INFO +1 -1
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/PySMT.egg-info/SOURCES.txt +15 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/__init__.py +1 -1
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/check_version.py +11 -3
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/install.py +5 -2
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/__init__.py +2 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/cvcfive.py +0 -1
- PySMT-0.9.7.dev333/pysmt/cmd/installers/optimsat.py +89 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/shell.py +61 -24
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/configuration.py +1 -1
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/decorators.py +1 -1
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/exceptions.py +45 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/factory.py +153 -38
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/fnode.py +2 -8
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/formula.py +30 -8
- PySMT-0.9.7.dev333/pysmt/optimization/goal.py +267 -0
- PySMT-0.9.7.dev333/pysmt/optimization/msat.py +26 -0
- PySMT-0.9.7.dev333/pysmt/optimization/optimizer.py +716 -0
- PySMT-0.9.7.dev333/pysmt/optimization/optimsat.py +287 -0
- PySMT-0.9.7.dev333/pysmt/optimization/yices.py +26 -0
- PySMT-0.9.7.dev333/pysmt/optimization/z3.py +178 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/shortcuts.py +10 -1
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/smtlib/commands.py +18 -1
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/smtlib/parser/parser.py +242 -132
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/smtlib/printers.py +2 -2
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/smtlib/script.py +259 -59
- PySMT-0.9.7.dev333/pysmt/solvers/dynmsat.py +66 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/eager.py +3 -2
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/msat.py +392 -373
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/solver.py +1 -1
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/z3.py +61 -5
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/substituter.py +2 -2
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/__init__.py +15 -0
- PySMT-0.9.7.dev333/pysmt/test/omt_examples.py +302 -0
- PySMT-0.9.7.dev333/pysmt/test/optimization_utils.py +305 -0
- PySMT-0.9.7.dev333/pysmt/test/smtlib/__init__.py +17 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/parser_utils.py +128 -6
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_annotations.py +4 -2
- PySMT-0.9.7.dev333/pysmt/test/smtlib/test_omt_lib_solver.py +359 -0
- PySMT-0.9.7.dev333/pysmt/test/smtlib/test_parser_omt.py +144 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_smtlibscript.py +5 -4
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_cnf.py +1 -1
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_configuration.py +2 -4
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_env.py +3 -4
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_formula.py +14 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_imports.py +1 -1
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_nlira.py +1 -1
- PySMT-0.9.7.dev333/pysmt/test/test_optimization.py +607 -0
- PySMT-0.9.7.dev333/pysmt/test/test_optimizing.py +50 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_unsat_cores.py +1 -1
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/LICENSE +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/MANIFEST.in +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/NOTICE +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/PySMT.egg-info/dependency_links.txt +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/PySMT.egg-info/entry_points.txt +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/PySMT.egg-info/top_level.txt +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/README.rst +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/docs/CHANGES.rst +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/docs/api_ref.rst +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/docs/development.rst +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/docs/getting_started.rst +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/docs/index.rst +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/docs/tutorials/boolean_logic.rst +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/docs/tutorials.rst +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/__main__.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/__init__.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/base.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/bdd.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/btor.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/cvcfour.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/msat.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/pico.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/yices.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/cmd/installers/z3.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/constants.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/environment.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/logics.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/operators.py +0 -0
- {PySMT-0.9.7.dev139/pysmt/smtlib → PySMT-0.9.7.dev333/pysmt/optimization}/__init__.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/oracles.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/parsing.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/printers.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/rewritings.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/simplifier.py +0 -0
- {PySMT-0.9.7.dev139/pysmt/solvers → PySMT-0.9.7.dev333/pysmt/smtlib}/__init__.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/smtlib/annotations.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/smtlib/parser/__init__.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/smtlib/solver.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/smtlib/utils.py +0 -0
- {PySMT-0.9.7.dev139/pysmt/test/smtlib → PySMT-0.9.7.dev333/pysmt/solvers}/__init__.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/bdd.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/btor.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/cvcfive.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/cvcfour.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/interpolation.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/options.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/pico.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/portfolio.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/qelim.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/smtlib.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/solvers/yices.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/configs/config1.ini +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/configs/config_bad.ini +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/examples.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_fuzzed.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_generic_wrapper.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_griggio.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_model_validation.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_examples.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_extensibility.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_lra.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_qf_arrays.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_qf_lia.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_qf_lira.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_qf_lra.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_qf_nia.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_qf_nra.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_qf_uf.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_qf_ufbv.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/smtlib/test_parser_type_error.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_array.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_back.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_bdd.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_bv.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_bv_simplification.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_constants.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_cvc_quantifiers.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_dwf.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_eager_model.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_euf.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_hr_parsing.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_int.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_interpolation.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_lira.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_logics.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_models.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_native_qe.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_nia.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_oracles.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_portfolio.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_printing.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_qe.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_regressions.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_rewritings.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_shannon_expansion.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_simplify.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_size.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_solving.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_sorts.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_string.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_typechecker.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_walker_ext.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/test/test_walkers.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/type_checker.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/typing.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/utils.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/walkers/__init__.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/walkers/dag.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/walkers/generic.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/walkers/identitydag.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/pysmt/walkers/tree.py +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/setup.cfg +0 -0
- {PySMT-0.9.7.dev139 → PySMT-0.9.7.dev333}/setup.py +0 -0
|
@@ -48,9 +48,17 @@ pysmt/cmd/installers/btor.py
|
|
|
48
48
|
pysmt/cmd/installers/cvcfive.py
|
|
49
49
|
pysmt/cmd/installers/cvcfour.py
|
|
50
50
|
pysmt/cmd/installers/msat.py
|
|
51
|
+
pysmt/cmd/installers/optimsat.py
|
|
51
52
|
pysmt/cmd/installers/pico.py
|
|
52
53
|
pysmt/cmd/installers/yices.py
|
|
53
54
|
pysmt/cmd/installers/z3.py
|
|
55
|
+
pysmt/optimization/__init__.py
|
|
56
|
+
pysmt/optimization/goal.py
|
|
57
|
+
pysmt/optimization/msat.py
|
|
58
|
+
pysmt/optimization/optimizer.py
|
|
59
|
+
pysmt/optimization/optimsat.py
|
|
60
|
+
pysmt/optimization/yices.py
|
|
61
|
+
pysmt/optimization/z3.py
|
|
54
62
|
pysmt/smtlib/__init__.py
|
|
55
63
|
pysmt/smtlib/annotations.py
|
|
56
64
|
pysmt/smtlib/commands.py
|
|
@@ -65,6 +73,7 @@ pysmt/solvers/bdd.py
|
|
|
65
73
|
pysmt/solvers/btor.py
|
|
66
74
|
pysmt/solvers/cvcfive.py
|
|
67
75
|
pysmt/solvers/cvcfour.py
|
|
76
|
+
pysmt/solvers/dynmsat.py
|
|
68
77
|
pysmt/solvers/eager.py
|
|
69
78
|
pysmt/solvers/interpolation.py
|
|
70
79
|
pysmt/solvers/msat.py
|
|
@@ -78,6 +87,8 @@ pysmt/solvers/yices.py
|
|
|
78
87
|
pysmt/solvers/z3.py
|
|
79
88
|
pysmt/test/__init__.py
|
|
80
89
|
pysmt/test/examples.py
|
|
90
|
+
pysmt/test/omt_examples.py
|
|
91
|
+
pysmt/test/optimization_utils.py
|
|
81
92
|
pysmt/test/test_array.py
|
|
82
93
|
pysmt/test/test_back.py
|
|
83
94
|
pysmt/test/test_bdd.py
|
|
@@ -102,6 +113,8 @@ pysmt/test/test_models.py
|
|
|
102
113
|
pysmt/test/test_native_qe.py
|
|
103
114
|
pysmt/test/test_nia.py
|
|
104
115
|
pysmt/test/test_nlira.py
|
|
116
|
+
pysmt/test/test_optimization.py
|
|
117
|
+
pysmt/test/test_optimizing.py
|
|
105
118
|
pysmt/test/test_oracles.py
|
|
106
119
|
pysmt/test/test_portfolio.py
|
|
107
120
|
pysmt/test/test_printing.py
|
|
@@ -127,9 +140,11 @@ pysmt/test/smtlib/test_fuzzed.py
|
|
|
127
140
|
pysmt/test/smtlib/test_generic_wrapper.py
|
|
128
141
|
pysmt/test/smtlib/test_griggio.py
|
|
129
142
|
pysmt/test/smtlib/test_model_validation.py
|
|
143
|
+
pysmt/test/smtlib/test_omt_lib_solver.py
|
|
130
144
|
pysmt/test/smtlib/test_parser_examples.py
|
|
131
145
|
pysmt/test/smtlib/test_parser_extensibility.py
|
|
132
146
|
pysmt/test/smtlib/test_parser_lra.py
|
|
147
|
+
pysmt/test/smtlib/test_parser_omt.py
|
|
133
148
|
pysmt/test/smtlib/test_parser_qf_arrays.py
|
|
134
149
|
pysmt/test/smtlib/test_parser_qf_lia.py
|
|
135
150
|
pysmt/test/smtlib/test_parser_qf_lira.py
|
|
@@ -23,12 +23,20 @@ def check_version(module):
|
|
|
23
23
|
(major, minor, ver, _) = z3.get_version()
|
|
24
24
|
version = "%d.%d.%d" % (major, minor, ver)
|
|
25
25
|
|
|
26
|
-
elif module
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
elif module in ("msat", "optimsat"):
|
|
27
|
+
if module == "msat":
|
|
28
|
+
import mathsat
|
|
29
|
+
version_str = mathsat.msat_get_version()
|
|
30
|
+
else:
|
|
31
|
+
import optimathsat
|
|
32
|
+
version_str = optimathsat.msat_get_version()
|
|
29
33
|
m = re.match(r"^MathSAT5 version (\d+\.\d+\.\d+) .*$", version_str)
|
|
30
34
|
if m is not None:
|
|
31
35
|
version = m.group(1)
|
|
36
|
+
else:
|
|
37
|
+
m = re.match(r"^MathSAT5 version (\w+) .*$", version_str)
|
|
38
|
+
if m is not None:
|
|
39
|
+
version = m.group(1)
|
|
32
40
|
|
|
33
41
|
elif module == "cudd":
|
|
34
42
|
import repycudd
|
|
@@ -21,7 +21,7 @@ from collections import namedtuple
|
|
|
21
21
|
|
|
22
22
|
from pysmt.cmd.installers import MSatInstaller, Z3Installer, PicoSATInstaller
|
|
23
23
|
from pysmt.cmd.installers import CVC5Installer, YicesInstaller, BtorInstaller
|
|
24
|
-
from pysmt.cmd.installers import CuddInstaller, CVC4Installer
|
|
24
|
+
from pysmt.cmd.installers import CuddInstaller, CVC4Installer, OptiMSatInstaller
|
|
25
25
|
from pysmt.cmd.installers.base import solver_install_site
|
|
26
26
|
|
|
27
27
|
from pysmt.environment import get_env
|
|
@@ -43,10 +43,10 @@ INSTALLERS = [
|
|
|
43
43
|
{"pypicosat_minor_version" : "1708010052"}),
|
|
44
44
|
Installer(CuddInstaller, "2.0.3",
|
|
45
45
|
{"git_version" : "ecb03d6d231273343178f566cc4d7258dcce52b4"}),
|
|
46
|
+
Installer(OptiMSatInstaller, "1.7.3", {})
|
|
46
47
|
]
|
|
47
48
|
|
|
48
49
|
|
|
49
|
-
|
|
50
50
|
def get_requested_solvers():
|
|
51
51
|
"""Parses the PYSMT_SOLVER env variable to extract requirements to fulfill"""
|
|
52
52
|
|
|
@@ -107,6 +107,9 @@ def check_installed(required_solvers, install_dir, bindings_dir, mirror_link):
|
|
|
107
107
|
interps = get_env().factory.all_interpolators()
|
|
108
108
|
print("Interpolators: %s" % ", ".join(name for name in interps))
|
|
109
109
|
|
|
110
|
+
opts = get_env().factory.all_optimizers()
|
|
111
|
+
print("Optimizers: %s" % ", ".join(name for name in opts))
|
|
112
|
+
|
|
110
113
|
|
|
111
114
|
|
|
112
115
|
def parse_options():
|
|
@@ -20,6 +20,8 @@ from pysmt.cmd.installers.yices import YicesInstaller
|
|
|
20
20
|
from pysmt.cmd.installers.btor import BtorInstaller
|
|
21
21
|
from pysmt.cmd.installers.pico import PicoSATInstaller
|
|
22
22
|
from pysmt.cmd.installers.bdd import CuddInstaller
|
|
23
|
+
from pysmt.cmd.installers.optimsat import OptiMSatInstaller
|
|
23
24
|
|
|
24
25
|
assert MSatInstaller and Z3Installer and CVC5Installer and YicesInstaller
|
|
25
26
|
assert BtorInstaller and PicoSATInstaller and CuddInstaller and CVC4Installer
|
|
27
|
+
assert OptiMSatInstaller
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Copyright 2014 Andrea Micheli and Marco Gario
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
import os
|
|
16
|
+
import glob
|
|
17
|
+
|
|
18
|
+
from pysmt.cmd.installers.base import SolverInstaller
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class OptiMSatInstaller(SolverInstaller):
|
|
22
|
+
|
|
23
|
+
SOLVER = "optimsat"
|
|
24
|
+
|
|
25
|
+
def __init__(self, install_dir, bindings_dir, solver_version,
|
|
26
|
+
mirror_link=None):
|
|
27
|
+
# Getting the right archive name
|
|
28
|
+
os_name = self.os_name
|
|
29
|
+
arch = str(self.bits) + "-bit"
|
|
30
|
+
ext = "tar.gz"
|
|
31
|
+
if os_name == "windows":
|
|
32
|
+
ext = "zip"
|
|
33
|
+
arch += "-mingw"
|
|
34
|
+
elif os_name == "darwin":
|
|
35
|
+
os_name = "macos"
|
|
36
|
+
|
|
37
|
+
archive_name = "optimathsat-%s-%s-%s.%s" % (solver_version, os_name,
|
|
38
|
+
arch, ext)
|
|
39
|
+
|
|
40
|
+
native_link = "http://optimathsat.disi.unitn.it/releases/optimathsat-%s/{archive_name}" % solver_version
|
|
41
|
+
|
|
42
|
+
SolverInstaller.__init__(self, install_dir=install_dir,
|
|
43
|
+
bindings_dir=bindings_dir,
|
|
44
|
+
solver_version=solver_version,
|
|
45
|
+
archive_name=archive_name,
|
|
46
|
+
native_link = native_link,
|
|
47
|
+
mirror_link=mirror_link)
|
|
48
|
+
|
|
49
|
+
self.python_bindings_dir = os.path.join(self.extract_path, "python")
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def compile(self):
|
|
53
|
+
if self.os_name == "windows":
|
|
54
|
+
libdir = os.path.join(self.python_bindings_dir, "../lib")
|
|
55
|
+
incdir = os.path.join(self.python_bindings_dir, "../include")
|
|
56
|
+
gmp_h_url = "https://github.com/mikand/tamer-windows-deps/raw/master/gmp/include/gmp.h"
|
|
57
|
+
mpir_dll_url = "https://github.com/Legrandin/mpir-windows-builds/blob/master/mpir-2.6.0_VS2015_%s/mpir.dll?raw=true" % self.bits
|
|
58
|
+
mpir_lib_url = "https://github.com/Legrandin/mpir-windows-builds/blob/master/mpir-2.6.0_VS2015_%s/mpir.lib?raw=true" % self.bits
|
|
59
|
+
|
|
60
|
+
SolverInstaller.do_download(gmp_h_url, os.path.join(incdir, "gmp.h"))
|
|
61
|
+
SolverInstaller.do_download(mpir_dll_url, os.path.join(libdir, "mpir.dll"))
|
|
62
|
+
SolverInstaller.do_download(mpir_lib_url, os.path.join(libdir, "mpir.lib"))
|
|
63
|
+
|
|
64
|
+
if self.os_name in {"darwin"}:
|
|
65
|
+
SolverInstaller.run_python("./setup.py build_ext", self.python_bindings_dir)
|
|
66
|
+
else:
|
|
67
|
+
SolverInstaller.run_python("./setup.py build_ext -R $ORIGIN", self.python_bindings_dir)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def move(self):
|
|
71
|
+
pdir = self.python_bindings_dir
|
|
72
|
+
bdir = os.path.join(pdir, "build")
|
|
73
|
+
sodir = glob.glob(bdir + "/lib.*")[0]
|
|
74
|
+
libdir = os.path.join(self.python_bindings_dir, "../lib")
|
|
75
|
+
|
|
76
|
+
# First, we need the SWIG-generated wrapper
|
|
77
|
+
for f in os.listdir(sodir):
|
|
78
|
+
if f.endswith(".so") or f.endswith(".pyd"):
|
|
79
|
+
SolverInstaller.mv(os.path.join(sodir, f), self.bindings_dir)
|
|
80
|
+
SolverInstaller.mv(os.path.join(pdir, "optimathsat.py"), self.bindings_dir)
|
|
81
|
+
|
|
82
|
+
# Since MathSAT 5.5.0 we also need the SO/DLL/DYLIB of mathsat in the PATH
|
|
83
|
+
# Under Windows, we also need the DLLs of MPIR in the PATH
|
|
84
|
+
for f in os.listdir(libdir):
|
|
85
|
+
if f.endswith(".so") or f.endswith(".dll") or f.endswith(".dylib"):
|
|
86
|
+
SolverInstaller.mv(os.path.join(libdir, f), self.bindings_dir)
|
|
87
|
+
|
|
88
|
+
def get_installed_version(self):
|
|
89
|
+
return self.get_installed_version_script(self.bindings_dir, "optimsat")
|
|
@@ -21,13 +21,14 @@ import sys
|
|
|
21
21
|
import argparse
|
|
22
22
|
from warnings import warn
|
|
23
23
|
|
|
24
|
-
from pysmt import
|
|
24
|
+
from pysmt import __version__
|
|
25
25
|
from pysmt.shortcuts import *
|
|
26
26
|
from pysmt.typing import INT, REAL, BOOL, BVType, BV32
|
|
27
27
|
|
|
28
28
|
from pysmt.smtlib.parser import SmtLibParser
|
|
29
|
-
from pysmt.smtlib.script import
|
|
30
|
-
from pysmt.smtlib.commands import CHECK_SAT, GET_VALUE
|
|
29
|
+
from pysmt.smtlib.script import InterpreterOMT, InterpreterSMT
|
|
30
|
+
from pysmt.smtlib.commands import CHECK_SAT, GET_VALUE, GET_OBJECTIVES, ECHO
|
|
31
|
+
from pysmt.logics import PYSMT_LOGICS
|
|
31
32
|
|
|
32
33
|
welcome_msg = \
|
|
33
34
|
"""Welcome to pySMT!!!
|
|
@@ -60,6 +61,7 @@ class PysmtShell(object):
|
|
|
60
61
|
def __init__(self, argv):
|
|
61
62
|
self.env = get_env()
|
|
62
63
|
self.solvers = list(self.env.factory.all_solvers().keys())
|
|
64
|
+
self.optimizers = list(self.env.factory.all_optimizers().keys())
|
|
63
65
|
self.parser = self.get_parser()
|
|
64
66
|
self.args = self.parser.parse_args(argv)
|
|
65
67
|
|
|
@@ -68,7 +70,7 @@ class PysmtShell(object):
|
|
|
68
70
|
parser = argparse.ArgumentParser(description="Command-line interface " \
|
|
69
71
|
"for pySMT problems")
|
|
70
72
|
parser.add_argument('--version', action='version',
|
|
71
|
-
version='%(prog)s {version}'.format(version=
|
|
73
|
+
version='%(prog)s {version}'.format(version=__version__))
|
|
72
74
|
parser.add_argument('--file', '-f', metavar='filename', type=str,
|
|
73
75
|
help='A script file to read from instead of stdin')
|
|
74
76
|
|
|
@@ -80,6 +82,14 @@ class PysmtShell(object):
|
|
|
80
82
|
choices=['auto'] + self.solvers,
|
|
81
83
|
default=None,
|
|
82
84
|
help='The solver to use (default: auto)')
|
|
85
|
+
parser.add_argument('--optimizer', '-o', metavar='opt_name', type=str,
|
|
86
|
+
choices=['auto'] + self.optimizers,
|
|
87
|
+
default=None,
|
|
88
|
+
help='The OMT optimizer to use (default: auto)')
|
|
89
|
+
parser.add_argument('--logic', '-l', metavar='logic_name', type=str,
|
|
90
|
+
choices=['auto'] + [str(l) for l in PYSMT_LOGICS],
|
|
91
|
+
default=None,
|
|
92
|
+
help='The logic to use for solver/optimizer selection (default: auto)')
|
|
83
93
|
return parser
|
|
84
94
|
|
|
85
95
|
|
|
@@ -95,31 +105,56 @@ class PysmtShell(object):
|
|
|
95
105
|
code.interact(welcome_msg)
|
|
96
106
|
|
|
97
107
|
|
|
98
|
-
def
|
|
108
|
+
def _print(self, val, stream_out):
|
|
109
|
+
stream_out.write(val)
|
|
110
|
+
stream_out.write("\n")
|
|
111
|
+
stream_out.flush()
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def print_result(self, stream_out, cmd, result):
|
|
99
115
|
name, _ = cmd
|
|
100
|
-
if name ==
|
|
116
|
+
if name == ECHO:
|
|
117
|
+
self._print(result, stream_out)
|
|
118
|
+
elif name == CHECK_SAT:
|
|
101
119
|
if result == True:
|
|
102
|
-
|
|
120
|
+
self._print("sat", stream_out)
|
|
103
121
|
else:
|
|
104
|
-
|
|
122
|
+
self._print("unsat", stream_out)
|
|
105
123
|
elif name == GET_VALUE:
|
|
106
|
-
|
|
124
|
+
self._print("(", stream_out)
|
|
107
125
|
for k, r in result.items():
|
|
108
|
-
|
|
109
|
-
|
|
126
|
+
self._print(" (%s %s)" % (k,r), stream_out)
|
|
127
|
+
self._print(")", stream_out)
|
|
128
|
+
elif name == GET_OBJECTIVES:
|
|
129
|
+
self._print("(objectives", stream_out)
|
|
130
|
+
for r in result:
|
|
131
|
+
self._print(" (%s %s)" % (r[0], r[1]), stream_out)
|
|
132
|
+
self._print(")", stream_out)
|
|
110
133
|
|
|
111
134
|
|
|
112
|
-
def smtlib_solver(self,
|
|
135
|
+
def smtlib_solver(self, stream_in, stream_out):
|
|
113
136
|
smt_parser = SmtLibParser()
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
137
|
+
s_name = self.args.solver
|
|
138
|
+
opt_name = self.args.optimizer
|
|
139
|
+
logic = self.args.logic
|
|
140
|
+
if logic == "auto":
|
|
141
|
+
logic = None
|
|
142
|
+
|
|
143
|
+
if opt_name is not None:
|
|
144
|
+
if opt_name == "auto":
|
|
145
|
+
solver = Optimizer(logic=logic)
|
|
146
|
+
else:
|
|
147
|
+
solver = Optimizer(name=opt_name, logic=logic)
|
|
148
|
+
inter = InterpreterOMT()
|
|
117
149
|
else:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
150
|
+
if s_name == "auto":
|
|
151
|
+
solver = Solver(logic=logic)
|
|
152
|
+
else:
|
|
153
|
+
solver = Solver(name=s_name, logic=logic)
|
|
154
|
+
inter = InterpreterSMT()
|
|
155
|
+
for cmd in smt_parser.get_command_generator(stream_in):
|
|
156
|
+
r = inter.evaluate(cmd, solver)
|
|
157
|
+
self.print_result(stream_out, cmd, r)
|
|
123
158
|
|
|
124
159
|
|
|
125
160
|
def main(self):
|
|
@@ -131,10 +166,12 @@ class PysmtShell(object):
|
|
|
131
166
|
warn("The solver option will be ignored in interactive mode")
|
|
132
167
|
self.interactive()
|
|
133
168
|
else:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
169
|
+
if self.args.file is None:
|
|
170
|
+
self.smtlib_solver(sys.stdin, sys.stdout)
|
|
171
|
+
else:
|
|
172
|
+
with open(self.args.file, "r") as input_stream:
|
|
173
|
+
self.smtlib_solver(input_stream, sys.stdout)
|
|
174
|
+
|
|
138
175
|
|
|
139
176
|
def main_interactive():
|
|
140
177
|
shell = PysmtShell(sys.argv[1:])
|
|
@@ -122,7 +122,7 @@ def write_environment_configuration(config_filename, environment):
|
|
|
122
122
|
|
|
123
123
|
config.add_section("global")
|
|
124
124
|
inf = "true" if environment.enable_infix_notation else "false"
|
|
125
|
-
pl = " ".join(factory.
|
|
125
|
+
pl = " ".join(factory.preferences['Solver'])
|
|
126
126
|
config.set("global", "use_infix_notation", inf)
|
|
127
127
|
config.set("global", "solver_preference_list", pl)
|
|
128
128
|
|
|
@@ -49,7 +49,7 @@ def clear_pending_pop(f):
|
|
|
49
49
|
|
|
50
50
|
Some functions (e.g., get_value) required the state of the solver
|
|
51
51
|
to stay unchanged after a call to solve. Therefore, we can leave
|
|
52
|
-
|
|
52
|
+
the solver in an intermediate state in which there is a formula
|
|
53
53
|
asserted in the stack that is not needed (e.g., when solving under
|
|
54
54
|
assumptions). In order to guarantee that methods operate on the
|
|
55
55
|
correct set of formulae, all methods of the solver that rely on
|
|
@@ -148,3 +148,48 @@ class PysmtSyntaxError(PysmtException, SyntaxError):
|
|
|
148
148
|
|
|
149
149
|
class PysmtIOError(PysmtException, IOError):
|
|
150
150
|
pass
|
|
151
|
+
|
|
152
|
+
class PysmtInfinityError(PysmtException):
|
|
153
|
+
"""Infinite value in expressions."""
|
|
154
|
+
pass
|
|
155
|
+
|
|
156
|
+
class PysmtInfinitesimalError(PysmtException):
|
|
157
|
+
"""Infinite value in expressions."""
|
|
158
|
+
pass
|
|
159
|
+
|
|
160
|
+
class PysmtUnboundedOptimizationError(PysmtException):
|
|
161
|
+
"""Infinite optimal value in optimization."""
|
|
162
|
+
pass
|
|
163
|
+
|
|
164
|
+
class GoalNotSupportedError(PysmtException):
|
|
165
|
+
"""
|
|
166
|
+
Goal not supported by the solver.
|
|
167
|
+
|
|
168
|
+
The possible modes are the optimization modes, in case a specific goal is
|
|
169
|
+
not supported by a specific mode.
|
|
170
|
+
The possible modes are:
|
|
171
|
+
- basic
|
|
172
|
+
- boxed
|
|
173
|
+
- lexicographic
|
|
174
|
+
- pareto
|
|
175
|
+
"""
|
|
176
|
+
def __init__(self, solver, goal, mode=None):
|
|
177
|
+
self._solver = solver
|
|
178
|
+
self._goal = goal
|
|
179
|
+
self._mode = mode
|
|
180
|
+
|
|
181
|
+
@property
|
|
182
|
+
def solver(self):
|
|
183
|
+
return self._solver
|
|
184
|
+
|
|
185
|
+
@property
|
|
186
|
+
def goal(self):
|
|
187
|
+
return self._goal
|
|
188
|
+
|
|
189
|
+
@property
|
|
190
|
+
def mode(self):
|
|
191
|
+
return self._mode
|
|
192
|
+
|
|
193
|
+
def __str__(self):
|
|
194
|
+
mode_str = (" in mode '%s'" % self.mode) if self.mode else ""
|
|
195
|
+
return "Optimizer '%s' does not support goal '%s'%s" % tuple(map(str, (type(self.solver).__name__, self.goal, mode_str)))
|