summaryrefslogtreecommitdiff
path: root/src/main/driver_unified.cpp
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@cs.nyu.edu>2014-10-23 03:11:18 -0400
committerMorgan Deters <mdeters@cs.nyu.edu>2014-10-23 19:40:41 -0400
commitc6436566dec99c0ed6794fa34b9b67a7e47918b0 (patch)
tree5555462cd38a49a9b6bed760d7af728d59371ee4 /src/main/driver_unified.cpp
parent1c8d1d7c5831baebc0a59a7dcf36f942504e5556 (diff)
Parsing and infrastructure support for SMT-LIBv2.5 input and output languages.
* support for new commands meta-info, declare-const, echo, get-model, reset, and reset-assertions * support for set-option :global-declarations * support for set-option :produce-assertions * support for set-option :reproducible-resource-limit * support for get-info :assertion-stack-levels * support for set-info :smt-lib-version 2.5 * ascribe types for abstract values (the new 2.5 standard clarifies that this is required) * SMT-LIB v2.5 string literals (we still support 2.0 string literals when in 2.0 mode) What's still to do: * check-sat-assumptions/get-unsat-assumptions (still being hotly debated). Also set-option :produce-unsat-assumptions. * define-fun-rec doesn't allow mutual recursion * All options should be restored to defaults with (reset) command. (Currently :incremental and maybe others get "stuck" due to late driver integration.)
Diffstat (limited to 'src/main/driver_unified.cpp')
-rw-r--r--src/main/driver_unified.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/main/driver_unified.cpp b/src/main/driver_unified.cpp
index 5fbd5aff5..f9b222b2b 100644
--- a/src/main/driver_unified.cpp
+++ b/src/main/driver_unified.cpp
@@ -35,9 +35,11 @@
#include "util/configuration.h"
#include "options/options.h"
#include "main/command_executor.h"
-# ifdef PORTFOLIO_BUILD
-# include "main/command_executor_portfolio.h"
-# endif
+
+#ifdef PORTFOLIO_BUILD
+# include "main/command_executor_portfolio.h"
+#endif
+
#include "main/options.h"
#include "smt/options.h"
#include "util/output.h"
@@ -185,7 +187,7 @@ int runCvc4(int argc, char* argv[], Options& opts) {
} else {
unsigned len = strlen(filename);
if(len >= 5 && !strcmp(".smt2", filename + len - 5)) {
- opts.set(options::inputLanguage, language::input::LANG_SMTLIB_V2);
+ opts.set(options::inputLanguage, language::input::LANG_SMTLIB_V2_5);
} else if(len >= 4 && !strcmp(".smt", filename + len - 4)) {
opts.set(options::inputLanguage, language::input::LANG_SMTLIB_V1);
} else if(len >= 5 && !strcmp(".smt1", filename + len - 5)) {
@@ -373,6 +375,10 @@ int runCvc4(int argc, char* argv[], Options& opts) {
}
status = pExecutor->doCommand(cmd);
needReset = true;
+ } else if(dynamic_cast<ResetCommand*>(cmd) != NULL) {
+ pExecutor->doCommand(cmd);
+ allCommands.clear();
+ allCommands.push_back(vector<Command*>());
} else {
// We shouldn't copy certain commands, because they can cause
// an error on replay since there's no associated sat/unsat check
@@ -382,7 +388,10 @@ int runCvc4(int argc, char* argv[], Options& opts) {
dynamic_cast<GetValueCommand*>(cmd) == NULL &&
dynamic_cast<GetModelCommand*>(cmd) == NULL &&
dynamic_cast<GetAssignmentCommand*>(cmd) == NULL &&
- dynamic_cast<GetInstantiationsCommand*>(cmd) == NULL) {
+ dynamic_cast<GetInstantiationsCommand*>(cmd) == NULL &&
+ dynamic_cast<GetAssertionsCommand*>(cmd) == NULL &&
+ dynamic_cast<GetInfoCommand*>(cmd) == NULL &&
+ dynamic_cast<GetOptionCommand*>(cmd) == NULL) {
Command* copy = cmd->clone();
allCommands.back().push_back(copy);
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback