3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-03-07 22:04:53 +00:00

Remove sgraph dependency from seq_plugin, let sgraph register nodes via on_make callback

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-01 23:50:48 +00:00
parent b8656d4fbe
commit 6ef3be4e5e
3 changed files with 44 additions and 27 deletions

View file

@ -70,8 +70,14 @@ namespace euf {
m_egraph(m),
m_exprs(m) {
// create seq_plugin and register it with the egraph
// the seq_plugin gets a reference back to this sgraph
m_egraph.add_plugin(alloc(seq_plugin, m_egraph, *this));
m_egraph.add_plugin(alloc(seq_plugin, m_egraph));
// register on_make callback so sgraph creates snodes for new enodes
std::function<void(enode*)> on_make = [this](enode* n) {
expr* e = n->get_expr();
if (m_seq.is_seq(e) || m_seq.is_re(e))
mk(e);
};
m_egraph.set_on_make(on_make);
}
sgraph::~sgraph() {