Add unsat cores support to CVC native language.
authorMorgan Deters <mdeters@cs.nyu.edu>
Thu, 9 Oct 2014 00:18:07 +0000 (20:18 -0400)
committerMorgan Deters <mdeters@cs.nyu.edu>
Thu, 9 Oct 2014 00:18:30 +0000 (20:18 -0400)
src/parser/cvc/Cvc.g
src/printer/cvc/cvc_printer.cpp

index 151e2ecb61b7c5b0426316ae3c77fb72238175f6..85939dd22725688c129be243e2576809d3c019fe 100644 (file)
@@ -65,6 +65,7 @@ tokens {
   EXIT_TOK = 'EXIT';
   INCLUDE_TOK = 'INCLUDE';
   DUMP_PROOF_TOK = 'DUMP_PROOF';
+  DUMP_UNSAT_CORE_TOK = 'DUMP_UNSAT_CORE';
   DUMP_ASSUMPTIONS_TOK = 'DUMP_ASSUMPTIONS';
   DUMP_SIG_TOK = 'DUMP_SIG';
   DUMP_TCC_TOK = 'DUMP_TCC';
@@ -795,6 +796,9 @@ mainCommand[CVC4::Command*& cmd]
   | DUMP_PROOF_TOK
     { cmd = new GetProofCommand(); }
 
+  | DUMP_UNSAT_CORE_TOK
+    { cmd = new GetUnsatCoreCommand(); }
+
   | ( DUMP_ASSUMPTIONS_TOK
     | DUMP_SIG_TOK
     | DUMP_TCC_TOK
index 2b5cc39c82a9ddaf7c8e34fdda31487194d13c79..48f1aadecb94e6d7d850e126194abb9572999783 100644 (file)
@@ -874,6 +874,7 @@ void CvcPrinter::toStream(std::ostream& out, const Command* c,
      tryToStream<GetAssignmentCommand>(out, c, d_cvc3Mode) ||
      tryToStream<GetAssertionsCommand>(out, c, d_cvc3Mode) ||
      tryToStream<GetProofCommand>(out, c, d_cvc3Mode) ||
+     tryToStream<GetUnsatCoreCommand>(out, c, d_cvc3Mode) ||
      tryToStream<SetBenchmarkStatusCommand>(out, c, d_cvc3Mode) ||
      tryToStream<SetBenchmarkLogicCommand>(out, c, d_cvc3Mode) ||
      tryToStream<SetInfoCommand>(out, c, d_cvc3Mode) ||
@@ -1149,6 +1150,10 @@ static void toStream(std::ostream& out, const GetProofCommand* c, bool cvc3Mode)
   out << "DUMP_PROOF;";
 }
 
+static void toStream(std::ostream& out, const GetUnsatCoreCommand* c, bool cvc3Mode) throw() {
+  out << "DUMP_UNSAT_CORE;";
+}
+
 static void toStream(std::ostream& out, const SetBenchmarkStatusCommand* c, bool cvc3Mode) throw() {
   out << "% (set-info :status " << c->getStatus() << ")";
 }