diff options
author | Morgan Deters <mdeters@gmail.com> | 2010-05-03 22:05:44 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2010-05-03 22:05:44 +0000 |
commit | 2c978719ce07be5f6494934363809a36de6ab24a (patch) | |
tree | 3ba841dc25e8ddca112880bc5180d5cf7cddedd2 /src | |
parent | 0a408cf7648b9b57f9b84ea1e7efa486eb0c2ceb (diff) |
main driver supports .smt2 input, added an smt2 regression (currently broken, so it doesn't run with "make check")
Diffstat (limited to 'src')
-rw-r--r-- | src/main/getopt.cpp | 7 | ||||
-rw-r--r-- | src/main/main.cpp | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/main/getopt.cpp b/src/main/getopt.cpp index 2ad34597e..a09da850d 100644 --- a/src/main/getopt.cpp +++ b/src/main/getopt.cpp @@ -41,9 +41,10 @@ namespace main { static const char lang_help[] = "\ Languages currently supported as arguments to the -L / --lang option:\n\ - auto attempt to automatically determine the input language\n\ - pl | cvc4 CVC4 presentation language\n\ - smt | smtlib SMT-LIB format\n\ + auto attempt to automatically determine the input language\n\ + pl | cvc4 CVC4 presentation language\n\ + smt | smtlib SMT-LIB format 1.2\n\ + smt2 | smtlib2 SMT-LIB format 2.0\n\ "; /** diff --git a/src/main/main.cpp b/src/main/main.cpp index bdf4f882b..a575426fd 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -117,7 +117,9 @@ int runCvc4(int argc, char* argv[]) { if(/*!inputFromStdin && */options.lang == parser::LANG_AUTO) { const char* filename = argv[firstArgIndex]; unsigned len = strlen(filename); - if(len >= 4 && !strcmp(".smt", filename + len - 4)) { + if(len >= 5 && !strcmp(".smt2", filename + len - 5)) { + options.lang = parser::LANG_SMTLIB_V2; + } else if(len >= 4 && !strcmp(".smt", filename + len - 4)) { options.lang = parser::LANG_SMTLIB; } else if(( len >= 4 && !strcmp(".cvc", filename + len - 4) ) || ( len >= 5 && !strcmp(".cvc4", filename + len - 5) )) { |