3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00

remove trc

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-04-17 10:47:46 -07:00
parent 502b29c424
commit 86b98e3477
9 changed files with 28 additions and 71 deletions

View file

@ -1,4 +1,19 @@
/**
/*++
Copyright (c) 2019 Microsoft Corporation
Module Name:
theory_array_bapa.cpp
Abstract:
Saturation procedure for BAPA predicates.
Assume there is a predicate
Size(S, n) for S : Array(T, Bool) and n : Int
The predicate is true if S is a set of size n.
Size(S, n), Size(T, m)
S, T are intersecting. n != m or S != T
@ -54,6 +69,12 @@ Finite domains:
Model construction for infinite domains when all Size(S, m) are negative for S.
Author:
Nikolaj Bjorner 2019-04-13
Revision History:
*/
#include "ast/ast_util.h"
@ -470,8 +491,12 @@ namespace smt {
};
theory_array_bapa::theory_array_bapa(theory_array_full& th) { m_imp = alloc(imp, th); }
theory_array_bapa::~theory_array_bapa() { dealloc(m_imp); }
void theory_array_bapa::internalize_size(app* term) { m_imp->internalize_size(term); }
final_check_status theory_array_bapa::final_check() { return m_imp->final_check(); }
void theory_array_bapa::init_model() { m_imp->init_model(); }
}

View file

@ -1,5 +1,5 @@
/*++
Copyright (c) 2006 Microsoft Corporation
Copyright (c) 2019 Microsoft Corporation
Module Name:

View file

@ -322,9 +322,6 @@ namespace smt {
// we need reachability in the R graph not R* graph
theory_var r1 = get_representative(a.v1());
theory_var r2 = get_representative(a.v2());
if (r.m_property == sr_trc && r1 == r2) {
continue;
}
if (r_graph.can_reach(r1, r2)) {
TRACE("special_relations",
tout << a.v1() << ": " << mk_pp(arg1, m) << " -> "
@ -397,13 +394,6 @@ namespace smt {
return final_check_po(r);
}
lbool theory_special_relations::final_check_trc(relation& r) {
//
// reflexivity is enforced from propagation.
// enforce transitivity.
//
return final_check_tc(r);
}
lbool theory_special_relations::final_check_to(relation& r) {
uint_set visited, target;
@ -510,9 +500,6 @@ namespace smt {
case sr_tc:
res = final_check_tc(r);
break;
case sr_trc:
res = final_check_trc(r);
break;
default:
UNREACHABLE();
res = l_undef;
@ -525,7 +512,6 @@ namespace smt {
bool theory_special_relations::extract_equalities(relation& r) {
switch (r.m_property) {
case sr_tc:
case sr_trc:
return false;
default:
break;
@ -593,30 +579,6 @@ namespace smt {
return res;
}
/**
\brief ensure that reflexivity is enforce for Transitive Reflexive closures
!TRC(R)xy => x != y
*/
lbool theory_special_relations::propagate_trc(atom& a) {
lbool res = l_true;
if (a.phase()) {
VERIFY(a.enable());
relation& r = a.get_relation();
r.m_uf.merge(a.v1(), a.v2());
}
else {
literal lit(a.var(), true);
context& ctx = get_context();
expr* arg1 = get_expr(a.v1());
expr* arg2 = get_expr(a.v2());
literal consequent = ~mk_eq(arg1, arg2, false);
justification* j = ctx.mk_justification(theory_propagation_justification(get_id(), ctx.get_region(), 1, &lit, consequent));
ctx.assign(consequent, j);
res = l_false;
}
return res;
}
lbool theory_special_relations::propagate_tc(atom& a) {
if (a.phase()) {
VERIFY(a.enable());
@ -670,9 +632,6 @@ namespace smt {
res = propagate_po(a);
break;
case sr_tc:
res = propagate_trc(a);
break;
case sr_trc:
res = propagate_tc(a);
break;
default:
@ -1165,9 +1124,6 @@ namespace smt {
case sr_tc:
init_model_po(*kv.m_value, m, true);
break;
case sr_trc:
init_model_po(*kv.m_value, m, true);
break;
default:
// other 28 combinations of 0x1F
NOT_IMPLEMENTED_YET();

View file

@ -144,7 +144,6 @@ namespace smt {
lbool final_check_plo(relation& r);
lbool final_check_to(relation& r);
lbool final_check_tc(relation& r);
lbool final_check_trc(relation& r);
lbool propagate(relation& r);
lbool enable(atom& a);
bool extract_equalities(relation& r);
@ -153,7 +152,6 @@ namespace smt {
lbool propagate_plo(atom& a);
lbool propagate_po(atom& a);
lbool propagate_tc(atom& a);
lbool propagate_trc(atom& a);
theory_var mk_var(expr* e);
void count_children(graph const& g, unsigned_vector& num_children);
void ensure_strict(graph& g);