if (options::proof())
{
+ if (d_logic > LogicInfo("QF_AUFBVLRA")) {
+ throw OptionException(
+ "Proofs are only supported for sub-logics of QF_AUFBVLIA.");
+ }
if (options::bitvectorAlgebraicSolver())
{
if (options::bitvectorAlgebraicSolver.wasSetByUser())
std::string logicString = d_logic.getLogicString();
- if (!(d_logic <= LogicInfo("QF_AUFBVLRA")))
- {
- // This logic is not yet supported
- Notice() << "Notice: no proof-checking for " << logicString << " proofs yet"
- << endl;
- return;
- }
-
std::stringstream pfStream;
pfStream << proof::plf_signatures << endl;
regress0/printer/empty_symbol_name.smt2
regress0/printer/let_shadowing.smt2
regress0/printer/tuples_and_records.cvc
+ regress0/proof_no_support.smt2
regress0/push-pop/boolean/fuzz_12.smt2
regress0/push-pop/boolean/fuzz_13.smt2
regress0/push-pop/boolean/fuzz_14.smt2
return features
+def logic_supported_with_proofs(logic):
+ assert logic is None or isinstance(logic, str)
+ return logic in [
+ #single theories
+ "QF_BV",
+ "QF_UF",
+ "QF_A",
+ "QF_LRA",
+ #two theories
+ "QF_UFBV",
+ "QF_UFLRA",
+ "QF_AUF",
+ "QF_ALRA",
+ "QF_ABV",
+ "QF_BVLRA"
+ #three theories
+ "QF_AUFBV",
+ "QF_ABVLRA",
+ "QF_UFBVLRA",
+ "QF_AUFLRA",
+ #four theories
+ "QF_AUFBVLRA"
+ ]
+
def run_benchmark(dump, wrapper, scrubber, error_scrubber, cvc4_binary,
command_line, benchmark_dir, benchmark_filename, timeout):
"""Runs CVC4 on the file `benchmark_filename` in the directory
benchmark_dir = os.path.dirname(benchmark_path)
comment_char = '%'
status_regex = None
+ logic_regex = None
status_to_output = lambda s: s
if benchmark_ext == '.smt':
status_regex = r':status\s*(sat|unsat)'
comment_char = ';'
elif benchmark_ext == '.smt2':
status_regex = r'set-info\s*:status\s*(sat|unsat)'
+ logic_regex = r'\(\s*set-logic\s*(.*)\)'
comment_char = ';'
elif benchmark_ext == '.cvc':
pass
expected_exit_status = None
command_lines = []
requires = []
+ logic = None
for line in benchmark_lines:
# Skip lines that do not start with a comment character.
if line[0] != comment_char:
sys.exit('Cannot determine status of "{}"'.format(benchmark_path))
if expected_exit_status is None:
expected_exit_status = 0
+ if logic_regex:
+ logic_match = re.findall(logic_regex, benchmark_content)
+ if logic_match and len(logic_match) == 1:
+ logic = logic_match[0]
if 'CVC4_REGRESSION_ARGS' in os.environ:
basic_command_line_args += shlex.split(
'--check-proofs' not in all_args and \
'--incremental' not in all_args and \
'--unconstrained-simp' not in all_args and \
+ logic_supported_with_proofs(logic) and \
not cvc4_binary.endswith('pcvc4'):
extra_command_line_args = ['--check-proofs']
if unsat_cores and re.search(r'^(unsat|valid)$', expected_output):