summaryrefslogtreecommitdiff
path: root/src/parser/parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser/parser.cpp')
-rw-r--r--src/parser/parser.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp
index 32d555718..664fa209d 100644
--- a/src/parser/parser.cpp
+++ b/src/parser/parser.cpp
@@ -515,6 +515,22 @@ Expr Parser::mkHoApply(Expr expr, std::vector<Expr>& args)
return expr;
}
+api::Term Parser::mkChain(api::Kind k, const std::vector<api::Term>& args)
+{
+ if (args.size() == 2)
+ {
+ // if this is the case exactly 1 pair will be generated so the
+ // AND is not required
+ return d_solver->mkTerm(k, args[0], args[1]);
+ }
+ std::vector<api::Term> children;
+ for (size_t i = 0, nargsmo = args.size() - 1; i < nargsmo; i++)
+ {
+ children.push_back(d_solver->mkTerm(k, args[i], args[i + 1]));
+ }
+ return d_solver->mkTerm(api::AND, children);
+}
+
bool Parser::isDeclared(const std::string& name, SymbolType type) {
switch (type) {
case SYM_VARIABLE:
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback