3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-20 10:10:21 +00:00

wip - dependent expr simpliifer

- simplify iterator over current indices
- add more simplifiers used by asserted_formulas
- improve diagnostics printing
This commit is contained in:
Nikolaj Bjorner 2022-11-30 13:41:40 +07:00
parent bec3acd146
commit b084821a0c
25 changed files with 553 additions and 158 deletions

View file

@ -0,0 +1,46 @@
/*++
Copyright (c) 2022 Microsoft Corporation
Module Name:
pull_nested_quantifiers.h
Abstract:
pull nested quantifiers
Author:
Nikolaj Bjorner (nbjorner) 2022-11-24
--*/
#pragma once
#include "ast/simplifiers/dependent_expr_state.h"
#include "ast/normal_forms/pull_quant.h"
class pull_nested_quantifiers_simplifier : public dependent_expr_simplifier {
pull_nested_quant m_pull;
public:
pull_nested_quantifiers_simplifier(ast_manager& m, params_ref const& p, dependent_expr_state& fmls):
dependent_expr_simplifier(m, fmls),
m_pull(m) {
}
char const* name() const override { return "pull-nested-quantifiers"; }
void reduce() override {
if (!m_fmls.has_quantifiers())
return;
expr_ref new_curr(m);
proof_ref new_pr(m);
for (unsigned idx : indices()) {
auto d = m_fmls[idx];
m_pull(d.fml(), new_curr, new_pr);
m_fmls.update(idx, dependent_expr(m, new_curr, d.dep()));
}
}
};