Skip to content

Commit

Permalink
change signed projection to include root object.
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed Mar 23, 2024
1 parent 80642e5 commit c18a42c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
11 changes: 10 additions & 1 deletion src/nlsat/nlsat_explain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1744,7 +1744,16 @@ namespace nlsat {
solve_eq(x, eq_index, ps);
}
else {
project_pairs(x, eq_index, ps);
add_zero_assumption(p);

for (unsigned j = 0; j < ps.size(); ++j) {
if (j == eq_index)
continue;
p = ps.get(j);
int s = sign(p);
atom::kind k = (s == 0)?(atom::EQ):((s < 0)?(atom::LT):(atom::GT));
add_simple_assumption(k, p, false);
}
}
return;
}
Expand Down
6 changes: 4 additions & 2 deletions src/qe/nlqsat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,8 +480,10 @@ namespace qe {
num_scopes = 2*(level()/2);
}
else {
SASSERT(clevel.max() + 2 <= level());
num_scopes = level() - clevel.max();
if (clevel.max() + 2 <= level())
num_scopes = level() - clevel.max();
else
num_scopes = 2; // the projection contains auxiliary variables from root objects.
SASSERT(num_scopes >= 2);
}

Expand Down

0 comments on commit c18a42c

Please sign in to comment.