summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-02-03 10:19:44 -0600
committerGitHub <noreply@github.com>2020-02-03 10:19:44 -0600
commit5b010143cce0cace27e2556e26221f69ae43f688 (patch)
tree40c67ef477bd2b6fa48b57ad55890d8da088ac17
parent1cec37904f1d770d7756d5661ff9b86fbca6d7ac (diff)
Fix invariant template inference for trivially infeasible conjecture (#3693)
-rw-r--r--src/theory/quantifiers/sygus/ce_guided_single_inv.cpp7
-rw-r--r--test/regress/CMakeLists.txt1
-rw-r--r--test/regress/regress0/sygus/pbe-pred-contra.sy7
3 files changed, 14 insertions, 1 deletions
diff --git a/src/theory/quantifiers/sygus/ce_guided_single_inv.cpp b/src/theory/quantifiers/sygus/ce_guided_single_inv.cpp
index 0e7606276..f81d2455c 100644
--- a/src/theory/quantifiers/sygus/ce_guided_single_inv.cpp
+++ b/src/theory/quantifiers/sygus/ce_guided_single_inv.cpp
@@ -163,7 +163,12 @@ void CegSingleInv::initialize(Node q)
std::vector<Node> sivars;
d_sip->getSingleInvocationVariables(sivars);
Node invariant = d_sip->getFunctionInvocationFor(prog);
- Assert(!invariant.isNull());
+ if (invariant.isNull())
+ {
+ // the conjecture did not have an instance of the invariant
+ // (e.g. it is trivially true/false).
+ return;
+ }
invariant = invariant.substitute(sivars.begin(),
sivars.end(),
prog_templ_vars.begin(),
diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt
index 3bcdec380..cea7b60ad 100644
--- a/test/regress/CMakeLists.txt
+++ b/test/regress/CMakeLists.txt
@@ -948,6 +948,7 @@ set(regress_0_tests
regress0/sygus/no-syntax-test.sy
regress0/sygus/parity-AIG-d0.sy
regress0/sygus/parse-bv-let.sy
+ regress0/sygus/pbe-pred-contra.sy
regress0/sygus/pLTL-sygus-syntax-err.sy
regress0/sygus/real-si-all.sy
regress0/sygus/sygus-no-wf.sy
diff --git a/test/regress/regress0/sygus/pbe-pred-contra.sy b/test/regress/regress0/sygus/pbe-pred-contra.sy
new file mode 100644
index 000000000..22fc12e60
--- /dev/null
+++ b/test/regress/regress0/sygus/pbe-pred-contra.sy
@@ -0,0 +1,7 @@
+; COMMAND_LINE: --cegqi-si=none --sygus-out=status
+; EXPECT: unknown
+(set-logic LIA)
+(synth-fun P ((x Int)) Bool)
+(constraint (P 54))
+(constraint (not (P 54)))
+(check-synth)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback