Term term, bint glbl) except +
Term defineFunsRec(vector[Term]& funs, vector[vector[Term]]& bound_vars,
vector[Term]& terms, bint glbl) except +
+ string getProof() except +
vector[Term] getLearnedLiterals() except +
vector[Term] getAssertions() except +
string getInfo(const string& flag) except +
for t in terms:
vf.push_back((<Term?> t).cterm)
+ def getProof(self):
+ """Get the refutation proof
+
+ SMT-LIB:
+
+ .. code-block:: smtlib
+
+ (get-proof)
+
+ Requires to enable option
+ :ref:`produce-proofs <lbl-option-produce-proofs>`.
+
+ :return: a string representing the proof, according to the value of
+ proof-format-mode.
+ """
+ return self.csolver.getProof()
+
def getLearnedLiterals(self):
"""Get a list of literals that are entailed by the current set of assertions
solver.getUnsatCore()
-def test_get_unsat_core3(solver):
+def test_get_unsat_core_and_proof(solver):
solver.setOption("incremental", "true")
solver.setOption("produce-unsat-cores", "true")
+ solver.setOption("produce-proofs", "true");
uSort = solver.mkUninterpretedSort("u")
intSort = solver.getIntegerSort()
solver.assertFormula(t)
res = solver.checkSat()
assert res.isUnsat()
+ solver.getProof()
def test_learned_literals(solver):
solver.setOption("produce-learned-literals", "true")