PySMT 0.9.7.dev346__tar.gz → 0.9.7.dev356__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.dev346/PySMT.egg-info → pysmt-0.9.7.dev356}/PKG-INFO +1 -1
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356/PySMT.egg-info}/PKG-INFO +1 -1
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/__init__.py +1 -1
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/solvers/cvcfive.py +36 -3
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/solvers/z3.py +5 -2
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_cnf.py +4 -4
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_logics.py +0 -3
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/LICENSE +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/MANIFEST.in +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/NOTICE +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/PySMT.egg-info/SOURCES.txt +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/PySMT.egg-info/dependency_links.txt +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/PySMT.egg-info/entry_points.txt +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/PySMT.egg-info/top_level.txt +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/README.rst +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/docs/CHANGES.rst +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/docs/api_ref.rst +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/docs/development.rst +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/docs/getting_started.rst +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/docs/index.rst +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/docs/tutorials/boolean_logic.rst +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/docs/tutorials.rst +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/__main__.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/cmd/__init__.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/cmd/check_version.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/cmd/install.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/cmd/installers/__init__.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/cmd/installers/base.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/cmd/installers/bdd.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/cmd/installers/btor.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/cmd/installers/cvcfive.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/cmd/installers/cvcfour.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/cmd/installers/msat.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/cmd/installers/optimsat.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/cmd/installers/pico.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/cmd/installers/yices.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/cmd/installers/z3.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/cmd/shell.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/configuration.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/constants.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/decorators.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/environment.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/exceptions.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/factory.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/fnode.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/formula.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/logics.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/operators.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/optimization/__init__.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/optimization/goal.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/optimization/msat.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/optimization/optimizer.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/optimization/optimsat.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/optimization/yices.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/optimization/z3.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/oracles.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/parsing.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/printers.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/rewritings.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/shortcuts.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/simplifier.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/smtlib/__init__.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/smtlib/annotations.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/smtlib/commands.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/smtlib/parser/__init__.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/smtlib/parser/parser.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/smtlib/printers.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/smtlib/script.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/smtlib/solver.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/smtlib/utils.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/solvers/__init__.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/solvers/bdd.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/solvers/btor.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/solvers/cvcfour.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/solvers/dynmsat.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/solvers/eager.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/solvers/interpolation.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/solvers/msat.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/solvers/options.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/solvers/pico.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/solvers/portfolio.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/solvers/qelim.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/solvers/smtlib.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/solvers/solver.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/solvers/yices.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/substituter.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/__init__.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/configs/config1.ini +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/configs/config_bad.ini +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/examples.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/omt_examples.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/optimization_utils.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/__init__.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/parser_utils.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_annotations.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_fuzzed.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_generic_wrapper.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_griggio.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_model_validation.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_omt_lib_solver.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_parser_examples.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_parser_extensibility.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_parser_lra.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_parser_omt.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_parser_qf_arrays.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_parser_qf_lia.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_parser_qf_lira.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_parser_qf_lra.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_parser_qf_nia.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_parser_qf_nra.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_parser_qf_uf.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_parser_qf_ufbv.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_parser_type_error.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/smtlib/test_smtlibscript.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_array.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_back.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_bdd.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_bv.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_bv_simplification.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_configuration.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_constants.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_cvc_quantifiers.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_dwf.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_eager_model.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_env.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_euf.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_formula.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_hr_parsing.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_imports.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_int.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_interpolation.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_lira.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_models.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_native_qe.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_nia.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_nlira.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_optimization.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_optimizing.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_oracles.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_portfolio.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_printing.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_qe.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_regressions.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_rewritings.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_shannon_expansion.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_simplify.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_size.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_solving.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_sorts.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_string.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_typechecker.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_unsat_cores.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_walker_ext.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/test/test_walkers.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/type_checker.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/typing.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/utils.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/walkers/__init__.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/walkers/dag.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/walkers/generic.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/walkers/identitydag.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/pysmt/walkers/tree.py +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/setup.cfg +0 -0
- {pysmt-0.9.7.dev346 → pysmt-0.9.7.dev356}/setup.py +0 -0
|
@@ -25,7 +25,7 @@ except ImportError:
|
|
|
25
25
|
from cvc5 import Kind
|
|
26
26
|
|
|
27
27
|
import pysmt.typing as types
|
|
28
|
-
from pysmt.logics import PYSMT_LOGICS,
|
|
28
|
+
from pysmt.logics import PYSMT_LOGICS, AUFLIRA, AUFLIA, AUFNIRA, ALIA
|
|
29
29
|
|
|
30
30
|
from pysmt.solvers.solver import Solver, Converter, SolverOptions
|
|
31
31
|
from pysmt.exceptions import (SolverReturnedUnknownResultError,
|
|
@@ -92,8 +92,14 @@ class CVC5Options(SolverOptions):
|
|
|
92
92
|
|
|
93
93
|
class CVC5Solver(Solver, SmtLibBasicSolver, SmtLibIgnoreMixin):
|
|
94
94
|
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
# Exclude const-array logics that mix BV with integer/real arithmetic:
|
|
96
|
+
# cvc5 rejects arrays indexed by array types (e.g. QF_AUFBVLIRA*).
|
|
97
|
+
LOGICS = (PYSMT_LOGICS | {AUFLIRA, AUFLIA, AUFNIRA, ALIA}) - \
|
|
98
|
+
frozenset(l for l in PYSMT_LOGICS
|
|
99
|
+
if l.theory.arrays_const
|
|
100
|
+
and l.theory.bit_vectors
|
|
101
|
+
and (l.theory.integer_arithmetic
|
|
102
|
+
or l.theory.real_arithmetic))
|
|
97
103
|
|
|
98
104
|
OptionsClass = CVC5Options
|
|
99
105
|
|
|
@@ -105,6 +111,9 @@ class CVC5Solver(Solver, SmtLibBasicSolver, SmtLibIgnoreMixin):
|
|
|
105
111
|
self.cvc5_solver = cvc5.Solver()
|
|
106
112
|
self.declarations = None
|
|
107
113
|
self.logic_name = str(logic)
|
|
114
|
+
if self.logic_name.endswith("*"):
|
|
115
|
+
# Const-array extension (pySMT-internal suffix)
|
|
116
|
+
self.logic_name = self.logic_name[:-1]
|
|
108
117
|
if "t" in self.logic_name:
|
|
109
118
|
# Custom Type extension
|
|
110
119
|
self.logic_name = self.logic_name.replace("t","")
|
|
@@ -114,6 +123,15 @@ class CVC5Solver(Solver, SmtLibBasicSolver, SmtLibIgnoreMixin):
|
|
|
114
123
|
self.logic_name = "LRA"
|
|
115
124
|
self.cvc5_solver.setLogic(self.logic_name)
|
|
116
125
|
|
|
126
|
+
# Enable constant-array support (STORE_ALL / mkConstArray).
|
|
127
|
+
# Without this, cvc5 rejects assertions containing constant
|
|
128
|
+
# arrays with "Cannot handle assertion with term of kind
|
|
129
|
+
# STORE_ALL in this configuration."
|
|
130
|
+
try:
|
|
131
|
+
self.cvc5_solver.setOption("arrays-exp", "true")
|
|
132
|
+
except Exception:
|
|
133
|
+
pass # older cvc5 versions may not have this option
|
|
134
|
+
|
|
117
135
|
self.options(self)
|
|
118
136
|
|
|
119
137
|
self.converter = CVC5Converter(environment, parent_solver=self)
|
|
@@ -257,6 +275,11 @@ class CVC5Converter(Converter, DagWalker):
|
|
|
257
275
|
array_type = self._cvc5_type_to_type(expr.getSort())
|
|
258
276
|
base_value = self.back(const_)
|
|
259
277
|
res = self.mgr.Array(array_type.index_type, base_value)
|
|
278
|
+
elif expr.getKind() == Kind.STORE:
|
|
279
|
+
base = self.back(expr[0])
|
|
280
|
+
index = self.back(expr[1])
|
|
281
|
+
value = self.back(expr[2])
|
|
282
|
+
res = self.mgr.Store(base, index, value)
|
|
260
283
|
else:
|
|
261
284
|
raise PysmtTypeError("Unsupported expression:", str(expr))
|
|
262
285
|
|
|
@@ -335,6 +358,16 @@ class CVC5Converter(Converter, DagWalker):
|
|
|
335
358
|
def walk_array_select(self, formula, args, **kwargs):
|
|
336
359
|
return self.cvc5_solver.mkTerm(Kind.SELECT, args[0], args[1])
|
|
337
360
|
|
|
361
|
+
def walk_array_value(self, formula, args, **kwargs):
|
|
362
|
+
arr_sort = self._type_to_cvc5(formula.get_type())
|
|
363
|
+
# args[0] is the converted default value
|
|
364
|
+
const_arr = self.cvc5_solver.mkConstArray(arr_sort, args[0])
|
|
365
|
+
# Remaining args are (index, value) pairs for point overrides
|
|
366
|
+
result = const_arr
|
|
367
|
+
for i in range(1, len(args), 2):
|
|
368
|
+
result = self.cvc5_solver.mkTerm(Kind.STORE, result, args[i], args[i + 1])
|
|
369
|
+
return result
|
|
370
|
+
|
|
338
371
|
def walk_minus(self, formula, args, **kwargs):
|
|
339
372
|
return self.cvc5_solver.mkTerm(Kind.SUB, args[0], args[1])
|
|
340
373
|
|
|
@@ -45,7 +45,8 @@ from pysmt.exceptions import (SolverReturnedUnknownResultError,
|
|
|
45
45
|
UndefinedSymbolError, PysmtValueError,
|
|
46
46
|
PysmtInfinityError, PysmtInfinitesimalError)
|
|
47
47
|
from pysmt.decorators import clear_pending_pop, catch_conversion_error
|
|
48
|
-
from pysmt.logics import LRA, LIA, QF_UFLRA, QF_UFLIA, PYSMT_LOGICS
|
|
48
|
+
from pysmt.logics import LRA, LIA, QF_UFLRA, QF_UFLIA, PYSMT_LOGICS, \
|
|
49
|
+
AUFLIRA, AUFLIA, AUFNIRA, ALIA
|
|
49
50
|
from pysmt.oracles import get_logic
|
|
50
51
|
from pysmt.constants import Fraction, Numeral, is_pysmt_integer
|
|
51
52
|
|
|
@@ -141,7 +142,9 @@ class Z3Options(SolverOptions):
|
|
|
141
142
|
class Z3Solver(IncrementalTrackingSolver, UnsatCoreSolver,
|
|
142
143
|
SmtLibBasicSolver, SmtLibIgnoreMixin):
|
|
143
144
|
|
|
144
|
-
LOGICS =
|
|
145
|
+
LOGICS = (PYSMT_LOGICS |
|
|
146
|
+
{AUFLIRA, AUFLIA, AUFNIRA, ALIA}) -\
|
|
147
|
+
set(x for x in PYSMT_LOGICS if x.theory.strings)
|
|
145
148
|
OptionsClass = Z3Options
|
|
146
149
|
|
|
147
150
|
SOLVERFOR_LOGIC_NAMES=['AUFLIA', 'ALIA', 'AUFLIRA', 'AUFNIRA', 'LRA', 'LIA', 'NIA',
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import os
|
|
19
19
|
import pytest
|
|
20
20
|
|
|
21
|
-
from pysmt.shortcuts import Implies, is_sat, reset_env, Symbol, Iff, Select, ArrayType, INT, BOOL, And, get_env
|
|
21
|
+
from pysmt.shortcuts import Implies, is_sat, is_valid, reset_env, Symbol, Iff, Select, ArrayType, INT, BOOL, And, get_env
|
|
22
22
|
from pysmt.rewritings import CNFizer
|
|
23
23
|
from pysmt.logics import QF_BOOL, QF_LRA, QF_LIA, QF_UFLIRA, QF_UFLRA, QF_ALIA
|
|
24
24
|
from pysmt.test import TestCase, skipIfNoSolverForLogic, main
|
|
@@ -61,9 +61,9 @@ class TestCnf(TestCase):
|
|
|
61
61
|
@skipIfNoSolverForLogic(QF_LIA)
|
|
62
62
|
def test_smtlib_cnf_small(self):
|
|
63
63
|
cnt = 0
|
|
64
|
-
max_cnt =
|
|
64
|
+
max_cnt = 2
|
|
65
65
|
for (logic, f, expected_result) in SMTLIB_TEST_FILES:
|
|
66
|
-
if logic !=
|
|
66
|
+
if logic != QF_LRA:
|
|
67
67
|
continue
|
|
68
68
|
self._smtlib_cnf(f, logic, expected_result)
|
|
69
69
|
cnt += 1
|
|
@@ -91,7 +91,7 @@ class TestCnf(TestCase):
|
|
|
91
91
|
return
|
|
92
92
|
|
|
93
93
|
cnf = conv.convert_as_formula(expr)
|
|
94
|
-
self.
|
|
94
|
+
self.assertTrue(is_valid(Implies(cnf, expr), logic=logic))
|
|
95
95
|
|
|
96
96
|
res = is_sat(cnf, logic=logic)
|
|
97
97
|
self.assertEqual(res, res_is_sat)
|
|
@@ -114,9 +114,6 @@ class TestLogic(TestCase):
|
|
|
114
114
|
with self.assertRaises(NoSolverAvailableError):
|
|
115
115
|
Solver(logic=pysmt.logics.QF_BOOL)
|
|
116
116
|
|
|
117
|
-
with self.assertRaises(NoSolverAvailableError):
|
|
118
|
-
Solver(logic=NRA)
|
|
119
|
-
|
|
120
117
|
with self.assertRaises(NoSolverAvailableError):
|
|
121
118
|
Solver(name='picosat', logic=pysmt.logics.QF_BV)
|
|
122
119
|
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|