summaryrefslogtreecommitdiff
path: root/test/api/smt2_compliance.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-11-09 16:51:04 -0600
committerGitHub <noreply@github.com>2020-11-09 16:51:04 -0600
commitb5eb623ea33eeb257d61a18c44e9aa1b2aafabbb (patch)
tree4c1e3ff13161d844569349a17e06761cedfc3ceb /test/api/smt2_compliance.cpp
parentbf98dd46aa92241d33901e84a437536ad5010be1 (diff)
Add symbol manager (#5380)
This add the symbol manager class, which is a Term-level utility, separate of the API. This class manages things like expression and assertion names, which is intentionally done outside the solver. The symbol manager is intended to live at the same level as the Solver. When parsing input, the symbol manager will be used to model any interaction of e.g. named expressions and assertions. It also stores the symbol table of the parser. This PR adds the basic interface for the symbol manager and passes it to the parser. Later PRs will migrate the functionality for named expression out of e.g. SmtEngine and into SymbolManager. Commands will take Solver+SymbolManager instead of Solver. This will allow the parser to be fully migrated to the new API. Marking "complex" since this impacts further design of the parser and the code that lives in src/main. FYI @4tXJ7f
Diffstat (limited to 'test/api/smt2_compliance.cpp')
-rw-r--r--test/api/smt2_compliance.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/api/smt2_compliance.cpp b/test/api/smt2_compliance.cpp
index e5781cfaa..7f9035636 100644
--- a/test/api/smt2_compliance.cpp
+++ b/test/api/smt2_compliance.cpp
@@ -43,7 +43,6 @@ int main()
std::unique_ptr<api::Solver> solver =
std::unique_ptr<api::Solver>(new api::Solver(&opts));
-
testGetInfo(solver.get(), ":error-behavior");
testGetInfo(solver.get(), ":name");
testGetInfo(solver.get(), ":authors");
@@ -61,7 +60,10 @@ int main()
void testGetInfo(api::Solver* solver, const char* s)
{
- ParserBuilder pb(solver, "<internal>", solver->getOptions());
+ std::unique_ptr<parser::SymbolManager> symman(
+ new parser::SymbolManager(solver));
+
+ ParserBuilder pb(solver, symman.get(), "<internal>", solver->getOptions());
Parser* p = pb.withStringInput(string("(get-info ") + s + ")").build();
assert(p != NULL);
Command* c = p->nextCommand();
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback