Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Minor update to distributing cheap OR during skolemization.
  • Loading branch information
aman-goel committed Jun 26, 2020
1 parent 128e49e commit a92a668
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/exists_forall/ef_skolemize.c
Expand Up @@ -653,11 +653,6 @@ static sk_pair_t *ef_skolemize_term(ef_skolemize_t *sk, term_t t) {
ivector_push(&args, u);
}
result = ef_update_composite(sk, unsigned_term(t), &args);

d = or_term_desc(terms, result);
if (ef_distribute_is_cheap(sk->analyzer, d)) {
result = ef_flatten_distribute(sk->analyzer, d, &sk->aux);
}
break;

case FORALL_TERM:
Expand Down Expand Up @@ -704,6 +699,12 @@ static sk_pair_t *ef_skolemize_term(ef_skolemize_t *sk, term_t t) {

assert(result != NULL_TERM);

if (is_pos_term(result) && term_kind(terms, result) == OR_TERM) {
d = or_term_desc(terms, result);
if (ef_distribute_is_cheap(sk->analyzer, d)) {
result = ef_flatten_distribute(sk->analyzer, d, &sk->aux);
}
}

#if TRACE
printf("Original (%d): %s\nSkolemized: %s\n", resultq, yices_term_to_string(t, 120, 1, 0), yices_term_to_string(result, 120, 1, 0));
Expand Down
6 changes: 6 additions & 0 deletions tests/regress/efsmt/mbqi/issue256.smt2
@@ -0,0 +1,6 @@
(set-logic UF)
(declare-fun _substvar_41_ () Bool)
(declare-const v6 Bool)
(declare-const v7 Bool)
(assert (=> (and (=> v6 false) (=> v7 v6) v7) _substvar_41_))
(check-sat)
1 change: 1 addition & 0 deletions tests/regress/efsmt/mbqi/issue256.smt2.gold
@@ -0,0 +1 @@
sat

0 comments on commit a92a668

Please sign in to comment.