summaryrefslogtreecommitdiff
path: root/src/parser
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2019-11-25 17:59:51 -0600
committerHaniel Barbosa <hanielbbarbosa@gmail.com>2019-11-25 20:59:51 -0300
commit89e00fbfffdbf3f7acde46623bf7a54f455614b5 (patch)
tree701cf4218158c294e7cc5e499865a033abc8d5c4 /src/parser
parenteff8e6a30d348e2418f805602d3dd41ac2bc795b (diff)
Better front-end type checking for SyGuS (#3496)
Diffstat (limited to 'src/parser')
-rw-r--r--src/parser/smt2/smt2.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parser/smt2/smt2.cpp b/src/parser/smt2/smt2.cpp
index b693eae5b..6dc29b8fe 100644
--- a/src/parser/smt2/smt2.cpp
+++ b/src/parser/smt2/smt2.cpp
@@ -1435,6 +1435,10 @@ void Smt2::addSygusConstructorTerm(Datatype& dt,
std::map<Expr, Type>& ntsToUnres) const
{
Trace("parser-sygus2") << "Add sygus cons term " << term << std::endl;
+ // Ensure that we do type checking here to catch sygus constructors with
+ // malformed builtin operators. The argument "true" to getType here forces
+ // a recursive well-typedness check.
+ term.getType(true);
// purify each occurrence of a non-terminal symbol in term, replace by
// free variables. These become arguments to constructors. Notice we must do
// a tree traversal in this function, since unique paths to the same term
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback