summaryrefslogtreecommitdiff
path: root/examples/nra-translate/smt2info.cpp
diff options
context:
space:
mode:
authorAina Niemetz <aina.niemetz@gmail.com>2018-08-08 19:21:47 -0700
committerGitHub <noreply@github.com>2018-08-08 19:21:47 -0700
commit91d85704313de6be9fd382833f5cedd39e24a6fa (patch)
tree057adfdad9d586428482d9bd58e9c8124bddc47b /examples/nra-translate/smt2info.cpp
parentb4d4006d08a32b107257b0edaba95679d0b0c65b (diff)
Plug solver API object into parser. (#2240)
Diffstat (limited to 'examples/nra-translate/smt2info.cpp')
-rw-r--r--examples/nra-translate/smt2info.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/examples/nra-translate/smt2info.cpp b/examples/nra-translate/smt2info.cpp
index 1ece6a86d..55ddb0997 100644
--- a/examples/nra-translate/smt2info.cpp
+++ b/examples/nra-translate/smt2info.cpp
@@ -2,7 +2,7 @@
/*! \file smt2info.cpp
** \verbatim
** Top contributors (to current version):
- ** Dejan Jovanovic, Tim King, Morgan Deters
+ ** Dejan Jovanovic, Aina Niemetz, Tim King
** This file is part of the CVC4 project.
** Copyright (c) 2009-2018 by the authors listed in the file AUTHORS
** in the top-level source directory) and their institutional affiliations.
@@ -21,6 +21,7 @@
#include <typeinfo>
#include <vector>
+#include "api/cvc4cpp.h"
#include "expr/expr.h"
#include "options/options.h"
#include "parser/parser.h"
@@ -78,10 +79,11 @@ int main(int argc, char* argv[])
// Create the expression manager
Options options;
options.setInputLanguage(language::input::LANG_SMTLIB_V2);
- ExprManager exprManager(options);
+ std::unique_ptr<api::Solver> solver =
+ std::unique_ptr<api::Solver>(new api::Solver(&options));
// Create the parser
- ParserBuilder parserBuilder(&exprManager, input, options);
+ ParserBuilder parserBuilder(solver.get(), input, options);
Parser* parser = parserBuilder.build();
// Variables and assertions
@@ -122,7 +124,9 @@ int main(int argc, char* argv[])
unsigned total_degree = 0;
for (unsigned i = 0; i < assertions.size(); ++ i) {
- total_degree = std::max(total_degree, compute_degree(exprManager, assertions[i]));
+ total_degree =
+ std::max(total_degree,
+ compute_degree(*solver->getExprManager(), assertions[i]));
}
cout << "degree: " << total_degree << endl;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback