summaryrefslogtreecommitdiff
path: root/examples/translator.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/translator.cpp
parentb4d4006d08a32b107257b0edaba95679d0b0c65b (diff)
Plug solver API object into parser. (#2240)
Diffstat (limited to 'examples/translator.cpp')
-rw-r--r--examples/translator.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/translator.cpp b/examples/translator.cpp
index 1de05f65a..5be837e63 100644
--- a/examples/translator.cpp
+++ b/examples/translator.cpp
@@ -2,7 +2,7 @@
/*! \file translator.cpp
** \verbatim
** Top contributors (to current version):
- ** Morgan Deters, Tim King
+ ** Morgan Deters, Tim King, Aina Niemetz
** 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.
@@ -22,6 +22,7 @@
#include <getopt.h>
#include <iostream>
+#include "api/cvc4cpp.h"
#include "expr/expr.h"
#include "expr/expr_iomanip.h"
#include "options/language.h"
@@ -105,7 +106,9 @@ static void readFile(const char* filename, InputLanguage fromLang, OutputLanguag
Options opts;
opts.setInputLanguage(fromLang);
ExprManager exprMgr(opts);
- ParserBuilder parserBuilder(&exprMgr, filename, opts);
+ std::unique_ptr<api::Solver> solver =
+ std::unique_ptr<api::Solver>(new api::Solver(&opts));
+ ParserBuilder parserBuilder(solver.get(), filename, opts);
if(!strcmp(filename, "-")) {
parserBuilder.withFilename("<stdin>");
parserBuilder.withLineBufferedStreamInput(cin);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback