mirror of
https://github.com/Z3Prover/z3
synced 2025-08-19 01:32:17 +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
53
src/ast/euf/euf_arith_plugin.h
Normal file
53
src/ast/euf/euf_arith_plugin.h
Normal file
|
@ -0,0 +1,53 @@
|
|||
/*++
|
||||
Copyright (c) 2023 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
euf_arith_plugin.h
|
||||
|
||||
Abstract:
|
||||
|
||||
plugin structure for arithetic
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2023-11-11
|
||||
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ast/arith_decl_plugin.h"
|
||||
#include "ast/euf/euf_plugin.h"
|
||||
#include "ast/euf/euf_ac_plugin.h"
|
||||
|
||||
namespace euf {
|
||||
|
||||
class egraph;
|
||||
|
||||
class arith_plugin : public plugin {
|
||||
enum undo_t { undo_add, undo_mul };
|
||||
arith_util a;
|
||||
svector<undo_t> m_undo;
|
||||
ac_plugin m_add, m_mul;
|
||||
|
||||
public:
|
||||
arith_plugin(egraph& g);
|
||||
|
||||
~arith_plugin() override {}
|
||||
|
||||
unsigned get_id() const override { return a.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