mirror of
https://github.com/Z3Prover/z3
synced 2026-06-12 03:45:38 +00:00
add EUF plugin framework.
plugin setting allows adding equality saturation within the E-graph propagation without involving externalizing theory solver dispatch. It makes equality saturation independent of SAT integration. Add a special relation operator to support ad-hoc AC symbols.
This commit is contained in:
parent
5784c2da79
commit
b52fd8d954
28 changed files with 3063 additions and 68 deletions
56
src/ast/euf/euf_specrel_plugin.h
Normal file
56
src/ast/euf/euf_specrel_plugin.h
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
/*++
|
||||
Copyright (c) 2023 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
euf_specrel_plugin.h
|
||||
|
||||
Abstract:
|
||||
|
||||
plugin structure for specrel functions
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2023-11-11
|
||||
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <iostream>
|
||||
#include "util/scoped_ptr_vector.h"
|
||||
#include "ast/special_relations_decl_plugin.h"
|
||||
#include "ast/euf/euf_plugin.h"
|
||||
#include "ast/euf/euf_ac_plugin.h"
|
||||
|
||||
namespace euf {
|
||||
|
||||
class specrel_plugin : public plugin {
|
||||
scoped_ptr_vector<ac_plugin> m_plugins;
|
||||
ptr_vector<ac_plugin> m_undo;
|
||||
obj_map<func_decl, ac_plugin*> m_decl2plugin;
|
||||
special_relations_util sp;
|
||||
|
||||
public:
|
||||
|
||||
specrel_plugin(egraph& g);
|
||||
|
||||
~specrel_plugin() override {}
|
||||
|
||||
unsigned get_id() const override { return sp.get_family_id(); }
|
||||
|
||||
void register_node(enode* n) override;
|
||||
|
||||
void merge_eh(enode* n1, enode* n2) override;
|
||||
|
||||
void diseq_eh(enode* eq) override;
|
||||
|
||||
void undo() override;
|
||||
|
||||
void propagate() override;
|
||||
|
||||
std::ostream& display(std::ostream& out) const override;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue