From f10f495cbb3784cfed51779836f49f7a06b4f289 Mon Sep 17 00:00:00 2001 From: Alex Ozdemir Date: Mon, 30 Dec 2019 20:13:48 -0800 Subject: [proof] ITE translation fix (#3484) * Bugfix: convert ifte arms to formulas for printing We have two kinds of ITEs in our LFSC proofs: * ite: for sort-typed expressions * ifte: for formulas Say that we have a Bool-sorted ITE. We had machinery for emitting an `ifte` for it, but this machinery didn't actually convert the arms of the ITE into formulas... Facepalm. Fixed now. * Test the lifting of ITEs from arithmetic. This test verifies that booleans ITEs are correctly lifted to formula ITEs in LRA proofs. It used to fail, but now passes. * clang-format * Typos. * Add test to CMake * Set --check-proofs in test * Address Yoni * Expand printsAsBool documentation * Assert ITE typing soundness * Assert a subtype relation for ITEs, not equality * Update src/proof/arith_proof.h Thanks Yoni! Co-Authored-By: yoni206 Co-authored-by: yoni206 --- test/regress/CMakeLists.txt | 1 + test/regress/regress0/arith/ite-lift.smt2 | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 test/regress/regress0/arith/ite-lift.smt2 (limited to 'test') diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt index c85065ef9..e27cff94d 100644 --- a/test/regress/CMakeLists.txt +++ b/test/regress/CMakeLists.txt @@ -28,6 +28,7 @@ set(regress_0_tests regress0/arith/issue1399.smt2 regress0/arith/issue3412.smt2 regress0/arith/issue3413.smt2 + regress0/arith/ite-lift.smt2 regress0/arith/leq.01.smtv1.smt2 regress0/arith/miplib.cvc regress0/arith/miplib2.cvc diff --git a/test/regress/regress0/arith/ite-lift.smt2 b/test/regress/regress0/arith/ite-lift.smt2 new file mode 100644 index 000000000..bd2df3def --- /dev/null +++ b/test/regress/regress0/arith/ite-lift.smt2 @@ -0,0 +1,15 @@ +; COMMAND-LINE: --check-proofs +(set-option :incremental false) +(set-info :status unsat) +(set-info :category "crafted") +(set-info :difficulty "0") +(set-logic QF_LRA) + +(declare-fun x_0 () Real) +(declare-fun x_1 () Real) +(declare-fun b_f () Bool) +(assert (<= x_0 0)) +(assert (<= x_1 0)) +(assert (not b_f)) +(assert (ite b_f b_f (>= (+ x_0 x_1) 1))) +(check-sat) -- cgit v1.2.3