3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00

first cut of fpa solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-10-01 07:18:36 -07:00
parent 4cb07a539b
commit 2087c01cac
7 changed files with 601 additions and 31 deletions

View file

@ -18,6 +18,7 @@ Notes:
--*/
#pragma once
#include "util/trail.h"
#include "ast/fpa_decl_plugin.h"
#include "ast/bv_decl_plugin.h"
#include "ast/rewriter/th_rewriter.h"
@ -69,3 +70,21 @@ public:
array_model convert_array_func_interp(model_core * mc, func_decl * f, func_decl * bv_f);
};
template <typename T>
class fpa2bv_conversion_trail_elem : public trail<T> {
ast_manager& m;
obj_map<expr, expr*>& m_map;
expr_ref key;
public:
fpa2bv_conversion_trail_elem(ast_manager& m, obj_map<expr, expr*>& map, expr* e) :
m(m), m_map(map), key(e, m) { }
~fpa2bv_conversion_trail_elem() override { }
void undo(T& s) override {
expr* val = m_map.find(key);
m_map.remove(key);
m.dec_ref(key);
m.dec_ref(val);
key = nullptr;
}
};