mirror of
https://github.com/Z3Prover/z3
synced 2026-03-23 04:49:11 +00:00
make simple solver a reference
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
3e3c3f106d
commit
c98ea6dc21
3 changed files with 8 additions and 22 deletions
|
|
@ -241,11 +241,7 @@ namespace seq {
|
|||
// nielsen_graph
|
||||
// -----------------------------------------------
|
||||
|
||||
nielsen_graph::nielsen_graph(euf::sgraph& sg):
|
||||
m_sg(sg) {
|
||||
}
|
||||
|
||||
nielsen_graph::nielsen_graph(euf::sgraph& sg, simple_solver* solver):
|
||||
nielsen_graph::nielsen_graph(euf::sgraph& sg, simple_solver& solver):
|
||||
m_sg(sg),
|
||||
m_solver(solver) {
|
||||
}
|
||||
|
|
@ -2394,20 +2390,13 @@ namespace seq {
|
|||
if (constraints.empty())
|
||||
return true; // no integer constraints, trivially feasible
|
||||
|
||||
if (!m_solver) {
|
||||
// No solver provided: skip arithmetic feasibility checking.
|
||||
// This makes the Nielsen graph unsound with respect to integer constraints
|
||||
// but is acceptable for contexts (e.g., unit tests) that only exercise
|
||||
// string equality patterns without arithmetic path constraints.
|
||||
return true;
|
||||
}
|
||||
|
||||
m_solver->push();
|
||||
m_solver.push();
|
||||
for (auto const& ic : constraints)
|
||||
m_solver->assert_expr(int_constraint_to_expr(ic));
|
||||
m_solver.assert_expr(int_constraint_to_expr(ic));
|
||||
|
||||
lbool result = m_solver->check();
|
||||
m_solver->pop(1);
|
||||
lbool result = m_solver.check();
|
||||
m_solver.pop(1);
|
||||
return result != l_false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue