summaryrefslogtreecommitdiff
path: root/src/theory/theory_engine.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2021-08-19 17:40:05 -0500
committerGitHub <noreply@github.com>2021-08-19 22:40:05 +0000
commit09719301db1532093117bc60546e01dca77b59b8 (patch)
tree230245ce4224b5c69df3e8fd19db86298ac76cb6 /src/theory/theory_engine.cpp
parent4cf91341622270e4aaefe926d4be7fe148c6fa74 (diff)
Catch cases where recursive functions reference functions-to-synthesize (#6993)
We previously incorrectly allowed this, leading to problems that were unsolvable but where we would not warn the user this combination is not supported. FYI @polgreen
Diffstat (limited to 'src/theory/theory_engine.cpp')
-rw-r--r--src/theory/theory_engine.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp
index 21c22586b..12d3fccfe 100644
--- a/src/theory/theory_engine.cpp
+++ b/src/theory/theory_engine.cpp
@@ -303,7 +303,16 @@ void TheoryEngine::preRegister(TNode preprocessed) {
// the atom should not have free variables
Debug("theory") << "TheoryEngine::preRegister: " << preprocessed
<< std::endl;
- Assert(!expr::hasFreeVar(preprocessed));
+ if (Configuration::isAssertionBuild())
+ {
+ std::unordered_set<Node> fvs;
+ expr::getFreeVariables(preprocessed, fvs);
+ if (!fvs.empty())
+ {
+ Unhandled() << "Preregistered term with free variable: "
+ << preprocessed << ", fv=" << *fvs.begin();
+ }
+ }
// should not have witness
Assert(!expr::hasSubtermKind(kind::WITNESS, preprocessed));
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback