summaryrefslogtreecommitdiff
path: root/src/main/driver_unified.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/driver_unified.cpp')
-rw-r--r--src/main/driver_unified.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/main/driver_unified.cpp b/src/main/driver_unified.cpp
index b999fe4b0..be2d0a0f8 100644
--- a/src/main/driver_unified.cpp
+++ b/src/main/driver_unified.cpp
@@ -181,16 +181,15 @@ int runCvc4(int argc, char* argv[], Options& opts) {
// important even for muzzled builds (to get result output right)
(*(opts.getOut())) << language::SetLanguage(opts.getOutputLanguage());
- // Create the expression manager using appropriate options
- std::unique_ptr<api::Solver> solver;
- solver.reset(new api::Solver(&opts));
- pExecutor = new CommandExecutor(solver.get(), opts);
+ // Create the command executor to execute the parsed commands
+ pExecutor = new CommandExecutor(opts);
std::unique_ptr<Parser> replayParser;
if (opts.getReplayInputFilename() != "")
{
std::string replayFilename = opts.getReplayInputFilename();
- ParserBuilder replayParserBuilder(solver.get(), replayFilename, opts);
+ ParserBuilder replayParserBuilder(
+ pExecutor->getSolver(), replayFilename, opts);
if( replayFilename == "-") {
if( inputFromStdin ) {
@@ -229,7 +228,7 @@ int runCvc4(int argc, char* argv[], Options& opts) {
pExecutor->doCommand(cmd);
delete cmd;
}
- InteractiveShell shell(solver.get());
+ InteractiveShell shell(pExecutor->getSolver());
if(opts.getInteractivePrompt()) {
Message() << Configuration::getPackageName()
<< " " << Configuration::getVersionString();
@@ -282,7 +281,7 @@ int runCvc4(int argc, char* argv[], Options& opts) {
// delete cmd;
}
- ParserBuilder parserBuilder(solver.get(), filename, opts);
+ ParserBuilder parserBuilder(pExecutor->getSolver(), filename, opts);
if( inputFromStdin ) {
#if defined(CVC4_COMPETITION_MODE) && !defined(CVC4_SMTCOMP_APPLICATION_TRACK)
@@ -443,7 +442,7 @@ int runCvc4(int argc, char* argv[], Options& opts) {
delete cmd;
}
- ParserBuilder parserBuilder(solver.get(), filename, opts);
+ ParserBuilder parserBuilder(pExecutor->getSolver(), filename, opts);
if( inputFromStdin ) {
#if defined(CVC4_COMPETITION_MODE) && !defined(CVC4_SMTCOMP_APPLICATION_TRACK)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback