mirror of
https://github.com/Z3Prover/z3
synced 2025-08-31 07:14:54 +00:00
[spacer] implement spacer::is_clause() (#4170)
Spacer has a different defintion of is_clause() than ast_util. It is currently only used in assertions. Main difference: x=y where x and y are Bool atoms is considered to be an atom, so that (or (= x y) (not (= z y))) is a literal Co-authored-by: Arie Gurfinkel <arie.gurfinkel@uwaterloo.ca>
This commit is contained in:
parent
799b6131f2
commit
dbfa3dd7f1
4 changed files with 48 additions and 4 deletions
|
@ -926,8 +926,10 @@ void pred_transformer::add_lemma_core(lemma* lemma, bool ground_only)
|
|||
SASSERT(!lemma->is_background());
|
||||
unsigned lvl = lemma->level();
|
||||
expr* l = lemma->get_expr();
|
||||
SASSERT(!lemma->is_ground() || is_clause(m, l));
|
||||
SASSERT(!is_quantifier(l) || is_clause(m, to_quantifier(l)->get_expr()));
|
||||
CTRACE("spacer", !spacer::is_clause(m, l),
|
||||
tout << "Lemma not a clause: " << mk_pp(l, m) << "\n";);
|
||||
SASSERT(!lemma->is_ground() || spacer::is_clause(m, l));
|
||||
SASSERT(!is_quantifier(l) || spacer::is_clause(m, to_quantifier(l)->get_expr()));
|
||||
|
||||
get_context().log_add_lemma(*this, *lemma);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue