summaryrefslogtreecommitdiff
path: root/src/parser
diff options
context:
space:
mode:
authorHaniel Barbosa <hanielbbarbosa@gmail.com>2019-12-10 17:17:00 -0300
committerAndrew Reynolds <andrew.j.reynolds@gmail.com>2019-12-10 14:17:00 -0600
commitd19c52821bb911413ff3dd4494c08a42a1db1e22 (patch)
treeaa91cb7bbc7aa66521b7bbfc528ab67394944616 /src/parser
parentee5fed52332ec6baddc8ecd8f8e04a644990bf29 (diff)
Fix ufho issues (#3551)
Diffstat (limited to 'src/parser')
-rw-r--r--src/parser/smt2/smt2.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/parser/smt2/smt2.cpp b/src/parser/smt2/smt2.cpp
index 73dea766a..151ecbfb4 100644
--- a/src/parser/smt2/smt2.cpp
+++ b/src/parser/smt2/smt2.cpp
@@ -1763,7 +1763,6 @@ Expr Smt2::applyParseOp(ParseOp& p, std::vector<Expr>& args)
}
}
}
-
// Second phase: apply the arguments to the parse op
ExprManager* em = getExprManager();
// handle special cases
@@ -1833,6 +1832,19 @@ Expr Smt2::applyParseOp(ParseOp& p, std::vector<Expr>& args)
}
else if (isBuiltinOperator)
{
+ if (!em->getOptions().getUfHo()
+ && (kind == kind::EQUAL || kind == kind::DISTINCT))
+ {
+ // need --uf-ho if these operators are applied over function args
+ for (std::vector<Expr>::iterator i = args.begin(); i != args.end(); ++i)
+ {
+ if ((*i).getType().isFunction())
+ {
+ parseError(
+ "Cannot apply equalty to functions unless --uf-ho is set.");
+ }
+ }
+ }
if (args.size() > 2)
{
if (kind == kind::INTS_DIVISION || kind == kind::XOR
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback