PySMT 0.9.7.dev390__tar.gz → 0.9.7.dev408__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.dev390/PySMT.egg-info → pysmt-0.9.7.dev408}/PKG-INFO +1 -1
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408/PySMT.egg-info}/PKG-INFO +1 -1
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/__init__.py +1 -1
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/cmd/install.py +1 -1
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/cmd/installers/optimsat.py +19 -11
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/optimization/optimsat.py +12 -3
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/smtlib/parser/parser.py +31 -7
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/smtlib/script.py +7 -1
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/optimization_utils.py +3 -4
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_omt_lib_solver.py +2 -5
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_parser_omt.py +133 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_optimizing.py +1 -4
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/LICENSE +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/MANIFEST.in +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/NOTICE +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/PySMT.egg-info/SOURCES.txt +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/PySMT.egg-info/dependency_links.txt +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/PySMT.egg-info/entry_points.txt +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/PySMT.egg-info/top_level.txt +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/README.rst +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/docs/CHANGES.rst +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/docs/api_ref.rst +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/docs/development.rst +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/docs/getting_started.rst +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/docs/index.rst +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/docs/tutorials/boolean_logic.rst +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/docs/tutorials.rst +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/__main__.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/cmd/__init__.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/cmd/check_version.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/cmd/installers/__init__.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/cmd/installers/base.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/cmd/installers/bdd.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/cmd/installers/btor.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/cmd/installers/cvcfive.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/cmd/installers/cvcfour.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/cmd/installers/msat.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/cmd/installers/pico.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/cmd/installers/yices.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/cmd/installers/z3.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/cmd/shell.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/configuration.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/constants.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/decorators.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/environment.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/exceptions.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/factory.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/fnode.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/formula.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/logics.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/operators.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/optimization/__init__.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/optimization/goal.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/optimization/msat.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/optimization/optimizer.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/optimization/yices.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/optimization/z3.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/oracles.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/parsing.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/printers.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/rewritings.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/shortcuts.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/simplifier.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/smtlib/__init__.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/smtlib/annotations.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/smtlib/commands.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/smtlib/parser/__init__.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/smtlib/printers.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/smtlib/solver.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/smtlib/utils.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/solvers/__init__.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/solvers/bdd.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/solvers/btor.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/solvers/cvcfive.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/solvers/cvcfour.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/solvers/dynmsat.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/solvers/eager.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/solvers/interpolation.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/solvers/msat.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/solvers/options.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/solvers/pico.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/solvers/portfolio.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/solvers/qelim.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/solvers/smtlib.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/solvers/solver.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/solvers/yices.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/solvers/z3.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/substituter.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/__init__.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/configs/config1.ini +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/configs/config_bad.ini +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/examples.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/omt_examples.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/__init__.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/parser_utils.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_annotations.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_fuzzed.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_generic_wrapper.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_griggio.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_model_validation.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_parser_examples.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_parser_extensibility.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_parser_lra.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_parser_qf_arrays.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_parser_qf_lia.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_parser_qf_lira.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_parser_qf_lra.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_parser_qf_nia.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_parser_qf_nra.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_parser_qf_uf.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_parser_qf_ufbv.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_parser_type_error.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/smtlib/test_smtlibscript.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_array.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_back.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_bdd.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_bv.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_bv_simplification.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_cnf.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_configuration.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_constants.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_cvc_quantifiers.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_dwf.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_eager_model.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_env.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_euf.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_formula.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_hr_parsing.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_imports.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_int.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_interpolation.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_lira.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_logics.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_models.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_native_qe.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_nia.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_nlira.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_optimization.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_oracles.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_portfolio.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_printing.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_qe.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_regressions.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_rewritings.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_shannon_expansion.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_simplify.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_size.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_solving.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_sorts.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_string.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_typechecker.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_unsat_cores.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_walker_ext.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/test/test_walkers.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/type_checker.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/typing.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/utils.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/walkers/__init__.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/walkers/dag.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/walkers/generic.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/walkers/identitydag.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/pysmt/walkers/tree.py +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/setup.cfg +0 -0
- {pysmt-0.9.7.dev390 → pysmt-0.9.7.dev408}/setup.py +0 -0
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
from typing import Tuple, Union
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
VERSION: Union[Tuple[int, int, int], Tuple[int, int, int, str, int]] = (0, 9, 7, "dev",
|
|
22
|
+
VERSION: Union[Tuple[int, int, int], Tuple[int, int, int, str, int]] = (0, 9, 7, "dev", 408)
|
|
23
23
|
|
|
24
24
|
# Try to provide human-readable version of latest commit for dev versions
|
|
25
25
|
# E.g. v0.5.1-4-g49a49f2-wip
|
|
@@ -43,7 +43,7 @@ INSTALLERS = [
|
|
|
43
43
|
{"pypicosat_minor_version" : "1708010052"}),
|
|
44
44
|
Installer(CuddInstaller, "2.0.3",
|
|
45
45
|
{"git_version" : "ecb03d6d231273343178f566cc4d7258dcce52b4"}),
|
|
46
|
-
Installer(OptiMSatInstaller, "1.7.
|
|
46
|
+
Installer(OptiMSatInstaller, "1.7.5", {})
|
|
47
47
|
]
|
|
48
48
|
|
|
49
49
|
|
|
@@ -24,18 +24,26 @@ class OptiMSatInstaller(SolverInstaller):
|
|
|
24
24
|
|
|
25
25
|
def __init__(self, install_dir, bindings_dir, solver_version,
|
|
26
26
|
mirror_link=None):
|
|
27
|
+
|
|
27
28
|
# Getting the right archive name
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
archive_name_template = "optimathsat-{version}-{os}-{arch}.{ext}"
|
|
30
|
+
format = {
|
|
31
|
+
"version": solver_version,
|
|
32
|
+
"os" : self.os_name,
|
|
33
|
+
"arch": self.architecture,
|
|
34
|
+
"ext": "tar.gz"
|
|
35
|
+
}
|
|
36
|
+
if self.os_name in ["windows", "darwin"]:
|
|
37
|
+
# Since version 1.7.5 the architecture is not included in the
|
|
38
|
+
# pkg name for the OSX and Win release as it is considered a "universal binary"
|
|
39
|
+
archive_name_template = "optimathsat-{version}-{os}.{ext}"
|
|
40
|
+
if self.os_name == "windows":
|
|
41
|
+
format["ext"] = "zip"
|
|
42
|
+
format["os"] = "win64" if self.architecture == "x86_64" else "win32"
|
|
43
|
+
elif self.os_name == "darwin":
|
|
44
|
+
format["os"] = "osx"
|
|
45
|
+
|
|
46
|
+
archive_name = archive_name_template.format(**format)
|
|
39
47
|
|
|
40
48
|
native_link = "https://optimathsat.disi.unitn.it/releases/optimathsat-%s/{archive_name}" % solver_version
|
|
41
49
|
|
|
@@ -144,9 +144,18 @@ class OptiMSATSolver(MathSAT5Solver, Optimizer):
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
while self.solve():
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
all_ok = True
|
|
148
|
+
costs = []
|
|
149
|
+
model = None
|
|
150
|
+
for goal in goals:
|
|
151
|
+
result = self._get_goal_value(msat_objs[goal], goal)
|
|
152
|
+
if result is None:
|
|
153
|
+
all_ok = False
|
|
154
|
+
break
|
|
155
|
+
model, cost = result
|
|
156
|
+
costs.append(cost)
|
|
157
|
+
if all_ok and model is not None:
|
|
158
|
+
yield model, costs
|
|
150
159
|
else:
|
|
151
160
|
break
|
|
152
161
|
# set after the solve because the solve method has the clear_pending_pop decorator
|
|
@@ -1312,15 +1312,39 @@ class SmtLibParser(object):
|
|
|
1312
1312
|
|
|
1313
1313
|
def _cmd_minmax_maxmin_obj(self, current: str, tokens: Tokenizer) -> SmtLibCommand:
|
|
1314
1314
|
"""(minmax | maxmin <term>+ )"""
|
|
1315
|
-
|
|
1316
|
-
|
|
1315
|
+
params: List[Tuple[str, Union[str, bool]]] = []
|
|
1316
|
+
terms = []
|
|
1317
|
+
signed = False
|
|
1318
|
+
options = False
|
|
1319
|
+
|
|
1317
1320
|
while True:
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
params.append(c)
|
|
1321
|
-
except PysmtSyntaxError:
|
|
1321
|
+
token = tokens.consume()
|
|
1322
|
+
if token == ")":
|
|
1322
1323
|
break
|
|
1323
|
-
|
|
1324
|
+
if token.startswith(":"):
|
|
1325
|
+
options = True
|
|
1326
|
+
if token == ":id":
|
|
1327
|
+
identifier = self.parse_atom(tokens, "maxmin/minmax")
|
|
1328
|
+
params.append((token, identifier))
|
|
1329
|
+
elif token == ":signed":
|
|
1330
|
+
signed = True
|
|
1331
|
+
params.append((token, signed))
|
|
1332
|
+
else:
|
|
1333
|
+
raise PysmtSyntaxError(
|
|
1334
|
+
"Incorrect option in the '%s' command" % token,
|
|
1335
|
+
tokens.pos_info)
|
|
1336
|
+
else:
|
|
1337
|
+
if options:
|
|
1338
|
+
raise PysmtSyntaxError(
|
|
1339
|
+
"Unexpected token '%s' after options in the '%s' command" % (token, current),
|
|
1340
|
+
tokens.pos_info)
|
|
1341
|
+
tokens.add_extra_token(token)
|
|
1342
|
+
terms.append(self.get_expression(tokens))
|
|
1343
|
+
|
|
1344
|
+
if not any(option[0] == ":signed" for option in params):
|
|
1345
|
+
params.append((":signed", False))
|
|
1346
|
+
|
|
1347
|
+
return SmtLibCommand(current, [terms, params])
|
|
1324
1348
|
|
|
1325
1349
|
def _cmd_objective(self, current: str, tokens: Tokenizer) -> SmtLibCommand:
|
|
1326
1350
|
"""(maximize | minimize <term>"""
|
|
@@ -122,9 +122,15 @@ class SmtLibCommand(namedtuple('SmtLibCommand', ['name', 'args'])):
|
|
|
122
122
|
|
|
123
123
|
elif self.name in [smtcmd.MINMAX, smtcmd.MAXMIN]:
|
|
124
124
|
outstream.write("(%s" % self.name)
|
|
125
|
-
for a in self.args:
|
|
125
|
+
for a in self.args[0]:
|
|
126
126
|
outstream.write(" ")
|
|
127
127
|
printer.printer(a)
|
|
128
|
+
for option_name, value in self.args[1] or []:
|
|
129
|
+
if option_name == ":signed":
|
|
130
|
+
if value:
|
|
131
|
+
outstream.write(" %s" % option_name)
|
|
132
|
+
else:
|
|
133
|
+
outstream.write(" %s %s" % (option_name, value))
|
|
128
134
|
outstream.write(")")
|
|
129
135
|
|
|
130
136
|
elif self.name == smtcmd.CHECK_ALLSAT:
|
|
@@ -242,9 +242,8 @@ def check_pareto(optimizer: Optimizer, goals: Sequence[Goal], goals_values: Sequ
|
|
|
242
242
|
raised_class = _get_expected_raised_class(goals_values[0])
|
|
243
243
|
assert raised_class is None or len(goals_values) == 1, "test: %s, goals_values: %s" % (test_id_str, str(goals_values))
|
|
244
244
|
if raised_class is None:
|
|
245
|
-
|
|
246
|
-
assert
|
|
247
|
-
retval = list(iterator_retval)
|
|
245
|
+
retval = optimizer.pareto_optimize(goals, **kwargs)
|
|
246
|
+
assert retval is not None, test_id_str
|
|
248
247
|
|
|
249
248
|
sorted_costs = sorted((costs for _, costs in retval), key=str)
|
|
250
249
|
sorted_goals_values = sorted(goals_values, key=str)
|
|
@@ -257,7 +256,7 @@ def check_pareto(optimizer: Optimizer, goals: Sequence[Goal], goals_values: Sequ
|
|
|
257
256
|
assert isinstance(goal_value, FNode)
|
|
258
257
|
_check_oracle_goal(goal, goal_value, cost, test_id_str, **kwargs)
|
|
259
258
|
|
|
260
|
-
return
|
|
259
|
+
return None
|
|
261
260
|
elif not optimizer.can_diverge_for_unbounded_cases():
|
|
262
261
|
with pytest.raises(raised_class):
|
|
263
262
|
return list(optimizer.pareto_optimize(goals, **kwargs))
|
|
@@ -338,11 +338,8 @@ sat
|
|
|
338
338
|
)
|
|
339
339
|
|
|
340
340
|
|
|
341
|
-
test_to_skip = {
|
|
342
|
-
|
|
343
|
-
("QF_LIA - smtlib2_allsat.smt2", OptimizationTypes.PARETO, "optimsat"), # error that happens only if test_optimizing is done before this test
|
|
344
|
-
("QF_LIA - smtlib2_load_objective_model.smt2", OptimizationTypes.PARETO, "optimsat"), # error that happens only if test_optimizing is done before this test
|
|
345
|
-
}
|
|
341
|
+
test_to_skip: dict = {}
|
|
342
|
+
|
|
346
343
|
@pytest.mark.parametrize(
|
|
347
344
|
"optimization_example, solver_name",
|
|
348
345
|
generate_examples_with_solvers(omt_test_cases_from_smtlib_test_set()),
|
|
@@ -63,6 +63,139 @@ class TestSmtLibParserOMT(TestCase):
|
|
|
63
63
|
self.assertEqual(cmd.name, command)
|
|
64
64
|
self.assertEqual(len(cmd.args), len_args)
|
|
65
65
|
|
|
66
|
+
def test_parse_minmax_maxmin_with_options(self):
|
|
67
|
+
parser = SmtLibParser()
|
|
68
|
+
|
|
69
|
+
script = parser.get_script(StringIO(
|
|
70
|
+
"(declare-fun x () Real)\n"
|
|
71
|
+
"(declare-fun y () Real)\n"
|
|
72
|
+
"(minmax x y :id g1 :signed)\n"
|
|
73
|
+
))
|
|
74
|
+
cmd = script.commands[-1]
|
|
75
|
+
self.assertEqual(cmd.name, "minmax")
|
|
76
|
+
self.assertEqual(cmd.args[1], [(':id', 'g1'), (':signed', True)])
|
|
77
|
+
|
|
78
|
+
buf = StringIO()
|
|
79
|
+
script.serialize(buf)
|
|
80
|
+
self.assertIn("(minmax x y :id g1 :signed)", buf.getvalue())
|
|
81
|
+
|
|
82
|
+
script = parser.get_script(StringIO(
|
|
83
|
+
"(declare-fun x () Real)\n"
|
|
84
|
+
"(declare-fun y () Real)\n"
|
|
85
|
+
"(maxmin x y :id g2)\n"
|
|
86
|
+
))
|
|
87
|
+
cmd = script.commands[-1]
|
|
88
|
+
self.assertEqual(cmd.name, "maxmin")
|
|
89
|
+
self.assertEqual(cmd.args[1], [(':id', 'g2'), (':signed', False)])
|
|
90
|
+
|
|
91
|
+
def test_parse_minmax_maxmin_signed_only(self):
|
|
92
|
+
parser = SmtLibParser()
|
|
93
|
+
|
|
94
|
+
script = parser.get_script(StringIO(
|
|
95
|
+
"(declare-fun x () Real)\n"
|
|
96
|
+
"(declare-fun y () Real)\n"
|
|
97
|
+
"(maxmin x y :signed)\n"
|
|
98
|
+
))
|
|
99
|
+
cmd = script.commands[-1]
|
|
100
|
+
self.assertEqual(cmd.name, "maxmin")
|
|
101
|
+
self.assertEqual(cmd.args[1], [(':signed', True)])
|
|
102
|
+
|
|
103
|
+
buf = StringIO()
|
|
104
|
+
script.serialize(buf)
|
|
105
|
+
self.assertIn("(maxmin x y :signed)", buf.getvalue())
|
|
106
|
+
|
|
107
|
+
def test_parse_minmax_maxmin_invalid_option(self):
|
|
108
|
+
parser = SmtLibParser()
|
|
109
|
+
with self.assertRaises(PysmtSyntaxError):
|
|
110
|
+
parser.get_script(StringIO(
|
|
111
|
+
"(declare-fun x () Real)\n"
|
|
112
|
+
"(declare-fun y () Real)\n"
|
|
113
|
+
"(minmax x y :foo 1)\n"
|
|
114
|
+
))
|
|
115
|
+
|
|
116
|
+
def test_parse_minmax_multiple_terms_with_options(self):
|
|
117
|
+
parser = SmtLibParser()
|
|
118
|
+
|
|
119
|
+
script = parser.get_script(StringIO(
|
|
120
|
+
"(declare-fun x () Real)\n"
|
|
121
|
+
"(declare-fun y () Real)\n"
|
|
122
|
+
"(declare-fun z () Real)\n"
|
|
123
|
+
"(minmax x y z :id g1 :signed)\n"
|
|
124
|
+
))
|
|
125
|
+
cmd = script.commands[-1]
|
|
126
|
+
self.assertEqual(cmd.name, "minmax")
|
|
127
|
+
self.assertEqual([term.symbol_name() for term in cmd.args[0]], ['x', 'y', 'z'])
|
|
128
|
+
self.assertEqual(cmd.args[1], [(':id', 'g1'), (':signed', True)])
|
|
129
|
+
|
|
130
|
+
buf = StringIO()
|
|
131
|
+
script.serialize(buf)
|
|
132
|
+
self.assertIn("(minmax x y z :id g1 :signed)", buf.getvalue())
|
|
133
|
+
|
|
134
|
+
def test_parse_minmax_option_order(self):
|
|
135
|
+
parser = SmtLibParser()
|
|
136
|
+
|
|
137
|
+
script = parser.get_script(StringIO(
|
|
138
|
+
"(declare-fun x () Real)\n"
|
|
139
|
+
"(declare-fun y () Real)\n"
|
|
140
|
+
"(maxmin x y :signed :id g2)\n"
|
|
141
|
+
))
|
|
142
|
+
cmd = script.commands[-1]
|
|
143
|
+
self.assertEqual(cmd.name, "maxmin")
|
|
144
|
+
self.assertEqual(cmd.args[1], [(':signed', True), (':id', 'g2')])
|
|
145
|
+
|
|
146
|
+
buf = StringIO()
|
|
147
|
+
script.serialize(buf)
|
|
148
|
+
self.assertIn("(maxmin x y :signed :id g2)", buf.getvalue())
|
|
149
|
+
|
|
150
|
+
def test_parse_minmax_reverse_option_order(self):
|
|
151
|
+
parser = SmtLibParser()
|
|
152
|
+
|
|
153
|
+
script = parser.get_script(StringIO(
|
|
154
|
+
"(declare-fun x () Real)\n"
|
|
155
|
+
"(declare-fun y () Real)\n"
|
|
156
|
+
"(minmax x y :signed :id g1)\n"
|
|
157
|
+
))
|
|
158
|
+
cmd = script.commands[-1]
|
|
159
|
+
self.assertEqual(cmd.name, "minmax")
|
|
160
|
+
self.assertEqual(cmd.args[1], [(':signed', True), (':id', 'g1')])
|
|
161
|
+
|
|
162
|
+
buf = StringIO()
|
|
163
|
+
script.serialize(buf)
|
|
164
|
+
self.assertIn("(minmax x y :signed :id g1)", buf.getvalue())
|
|
165
|
+
|
|
166
|
+
def test_parse_minmax_maxmin_syntax_errors(self):
|
|
167
|
+
parser = SmtLibParser()
|
|
168
|
+
with self.assertRaises(PysmtSyntaxError):
|
|
169
|
+
parser.get_script(StringIO(
|
|
170
|
+
"(declare-fun x () Real)\n"
|
|
171
|
+
"(declare-fun y () Real)\n"
|
|
172
|
+
"(minmax x y :id)\n"
|
|
173
|
+
))
|
|
174
|
+
with self.assertRaises(PysmtSyntaxError):
|
|
175
|
+
parser.get_script(StringIO(
|
|
176
|
+
"(declare-fun x () Real)\n"
|
|
177
|
+
"(declare-fun y () Real)\n"
|
|
178
|
+
"(maxmin x y :signed true)\n"
|
|
179
|
+
))
|
|
180
|
+
|
|
181
|
+
def test_parse_minmax_maxmin_round_trip(self):
|
|
182
|
+
parser = SmtLibParser()
|
|
183
|
+
txt = """(declare-fun x () Real)
|
|
184
|
+
(declare-fun y () Real)
|
|
185
|
+
(minmax x y :id g1 :signed)
|
|
186
|
+
(maxmin x y :signed :id g2)
|
|
187
|
+
"""
|
|
188
|
+
script = parser.get_script(StringIO(txt))
|
|
189
|
+
|
|
190
|
+
buf = StringIO()
|
|
191
|
+
script.serialize(buf)
|
|
192
|
+
new_script = parser.get_script(StringIO(buf.getvalue()))
|
|
193
|
+
|
|
194
|
+
self.assertEqual(script.commands[-2].name, new_script.commands[-2].name)
|
|
195
|
+
self.assertEqual(script.commands[-2].args[1], new_script.commands[-2].args[1])
|
|
196
|
+
self.assertEqual(script.commands[-1].name, new_script.commands[-1].name)
|
|
197
|
+
self.assertEqual(script.commands[-1].args[1], new_script.commands[-1].args[1])
|
|
198
|
+
|
|
66
199
|
def parse_from_file(self, file_id: int) -> SmtLibScript:
|
|
67
200
|
fname = OMT_FILE_PATTERN % file_id
|
|
68
201
|
reset_env()
|
|
@@ -20,10 +20,7 @@ import pytest
|
|
|
20
20
|
from pysmt.test.omt_examples import get_full_example_omt_formuale
|
|
21
21
|
from pysmt.test.optimization_utils import generate_examples_with_solvers, solve_given_example, OptimizationTypes
|
|
22
22
|
|
|
23
|
-
test_to_skip = {
|
|
24
|
-
("QF_LIA 2 int 2 bools multiple objective", OptimizationTypes.PARETO, "optimsat"), # weird error, this test fails only if executed test_omt_lib_solver (skipping ("QF_LIA - smtlib2_load_objective_model.smt2", OptimizationTypes.PARETO, "optimsat") this skip becomes necessary, otherwise not). The cost returned is 0 when it should be 1
|
|
25
|
-
("QF_LIA 2 variables multiple objective", OptimizationTypes.PARETO, "optimsat"), # weird error, this test fails only if executed after test_optimization, while it works on it's own
|
|
26
|
-
}
|
|
23
|
+
test_to_skip: dict = {}
|
|
27
24
|
|
|
28
25
|
@pytest.mark.parametrize(
|
|
29
26
|
"optimization_example, solver_name",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|