3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-05-21 17:39:36 +00:00

simplification to value reconstruction

use the fact that dependencies are already present in the model-value object.
There is no need for fragile code to reconstruct the mapping from enodes to values.
This commit is contained in:
Nikolaj Bjorner 2026-05-16 10:27:06 -07:00
parent b77d2b3360
commit b8052d67cb
2 changed files with 32 additions and 71 deletions

View file

@ -101,15 +101,11 @@ namespace smt {
// Returns a concrete Z3 expression.
// Optionally uses pre-evaluated model values for
// enode dependencies (provided by model_generator).
expr_ref snode_to_value(euf::snode* n, expr_ref_vector const& values);
expr_ref snode_to_value(euf::snode *n, ptr_vector<smt::enode> const &nodes, expr_ref_vector const &values);
// Collect enode dependencies required to evaluate an snode value.
void collect_dependencies(euf::snode* n, ptr_vector<enode>& deps) const;
// reconstruct value based on bindings for extracted dependencies.
// The values vector is expected to be in the
// same order as the dependencies collected by collect_dependencies_rec.
expr_ref mk_value_with_dependencies(euf::snode* n, expr_ref_vector const &values);
// register all string literals appearing in the constraint store
// with the factory to avoid collisions with fresh values.