3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-11 09:44:43 +00:00

port bit-blaster to simplifiers

inc_sat_solver uses bit-blaster, card2bv and max_bv_sharing.
By turning these into simplifiers it will be possible to remove
dependencies on tactics and goals in inc_sat_simplifier and instead use a modular and general incremental pre-processing infrastructure.
This commit is contained in:
Nikolaj Bjorner 2022-11-25 13:37:16 +07:00
parent f0570fbc0e
commit a152f9cfd6
3 changed files with 132 additions and 0 deletions

View file

@ -0,0 +1,51 @@
/*++
Copyright (c) 2011 Microsoft Corporation
Module Name:
bit_blaster.h
Abstract:
Apply bit-blasting
Author:
Leonardo (leonardo) 2011-10-25
--*/
#include "ast/rewriter/bit_blaster/bit_blaster_rewriter.h"
#include "ast/ast_pp.h"
#include "model/model_pp.h"
#include "ast/rewriter/rewriter_types.h"
#include "ast/simplifiers/dependent_expr_state.h"
class bit_blaster : public dependent_expr_simplifier {
bit_blaster_rewriter m_rewriter;
unsigned m_num_steps = 0;
params_ref m_params;
public:
bit_blaster(ast_manager & m, params_ref const & p, dependent_expr_state& s):
dependent_expr_simplifier(m, s),
m_rewriter(m, p) {
updt_params(p);
}
void updt_params(params_ref const & p) override;
void collect_param_descrs(param_descrs & r) override;
void reduce() override;
void collect_statistics(statistics& st) const override;
void push() override;
void pop(unsigned n) override;
/*
* Expose the bit-blaster rewriter so that assumptions and implied bit-vectors can be reconstructed
* after bit-blasting.
*/
bit_blaster_rewriter& rewriter() { return m_rewriter; }
};