mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 10:52:02 +00:00
parent
bcbc774b79
commit
6761bf1495
3 changed files with 17 additions and 1 deletions
|
@ -880,6 +880,17 @@ namespace datalog {
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool context::is_monotone() {
|
||||||
|
try {
|
||||||
|
m_rule_properties.check_for_negated_predicates();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (...) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
lbool context::query_from_lvl (expr* query, unsigned lvl) {
|
lbool context::query_from_lvl (expr* query, unsigned lvl) {
|
||||||
m_mc = mk_skip_model_converter();
|
m_mc = mk_skip_model_converter();
|
||||||
m_last_status = OK;
|
m_last_status = OK;
|
||||||
|
|
|
@ -528,6 +528,8 @@ namespace datalog {
|
||||||
*/
|
*/
|
||||||
model_ref get_model();
|
model_ref get_model();
|
||||||
|
|
||||||
|
bool is_monotone();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief retrieve proof from derivation of the query.
|
\brief retrieve proof from derivation of the query.
|
||||||
|
|
||||||
|
|
|
@ -266,7 +266,10 @@ class horn_tactic : public tactic {
|
||||||
switch (is_reachable) {
|
switch (is_reachable) {
|
||||||
case l_true: {
|
case l_true: {
|
||||||
// goal is unsat
|
// goal is unsat
|
||||||
if (produce_proofs) {
|
if (!m_ctx.is_monotone()) {
|
||||||
|
is_reachable = l_undef;
|
||||||
|
}
|
||||||
|
else if (produce_proofs) {
|
||||||
proof_ref proof = m_ctx.get_proof();
|
proof_ref proof = m_ctx.get_proof();
|
||||||
pc = proof2proof_converter(m, proof);
|
pc = proof2proof_converter(m, proof);
|
||||||
g->assert_expr(m.get_fact(proof), proof, nullptr);
|
g->assert_expr(m.get_fact(proof), proof, nullptr);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue