From: Morgan Deters Date: Thu, 9 Oct 2014 00:18:07 +0000 (-0400) Subject: Add unsat cores support to CVC native language. X-Git-Tag: cvc5-1.0.0~6575 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6a9f767abff6e6c81810cf134253399899a97424;p=cvc5.git Add unsat cores support to CVC native language. --- diff --git a/src/parser/cvc/Cvc.g b/src/parser/cvc/Cvc.g index 151e2ecb6..85939dd22 100644 --- a/src/parser/cvc/Cvc.g +++ b/src/parser/cvc/Cvc.g @@ -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 diff --git a/src/printer/cvc/cvc_printer.cpp b/src/printer/cvc/cvc_printer.cpp index 2b5cc39c8..48f1aadec 100644 --- a/src/printer/cvc/cvc_printer.cpp +++ b/src/printer/cvc/cvc_printer.cpp @@ -874,6 +874,7 @@ void CvcPrinter::toStream(std::ostream& out, const Command* c, tryToStream(out, c, d_cvc3Mode) || tryToStream(out, c, d_cvc3Mode) || tryToStream(out, c, d_cvc3Mode) || + tryToStream(out, c, d_cvc3Mode) || tryToStream(out, c, d_cvc3Mode) || tryToStream(out, c, d_cvc3Mode) || tryToStream(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() << ")"; }