mirror of
https://github.com/Z3Prover/z3
synced 2025-08-21 02:30:23 +00:00
add incremental version of value propagate
This commit is contained in:
parent
decb3d3907
commit
a64c7c5d19
8 changed files with 203 additions and 81 deletions
45
src/ast/simplifiers/propagate_values.h
Normal file
45
src/ast/simplifiers/propagate_values.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
/*++
|
||||
Copyright (c) 2022 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
propagate_values.h
|
||||
|
||||
Abstract:
|
||||
|
||||
relatively cheap value propagation
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2022-11-24
|
||||
|
||||
Notes:
|
||||
incremental version of propagate_values_tactic, to be replaced
|
||||
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ast/simplifiers/dependent_expr_state.h"
|
||||
#include "ast/rewriter/th_rewriter.h"
|
||||
|
||||
|
||||
class propagate_values : public dependent_expr_simplifier {
|
||||
|
||||
struct stats {
|
||||
unsigned m_num_rewrites = 0;
|
||||
void reset() { memset(this, 0, sizeof(*this)); }
|
||||
};
|
||||
|
||||
th_rewriter m_rewriter;
|
||||
stats m_stats;
|
||||
unsigned m_max_rounds = 4;
|
||||
|
||||
public:
|
||||
propagate_values(ast_manager& m, dependent_expr_state& fmls);
|
||||
void reduce() override;
|
||||
void collect_statistics(statistics& st) const override;
|
||||
void reset_statistics() override { m_stats.reset(); }
|
||||
void updt_params(params_ref const& p) override;
|
||||
void collect_param_descrs(param_descrs& r) override;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue