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:
parent
b8656d4fbe
commit
6ef3be4e5e
3 changed files with 44 additions and 27 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue