3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-13 02:34:43 +00:00

replaced simplifier with rewriter at pull_quant.cpp

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-11-17 20:29:09 -08:00
parent 3e50a65dfc
commit 3711f8e42c
4 changed files with 349 additions and 353 deletions

View file

@ -19,8 +19,7 @@ Notes:
#ifndef _PULL_QUANT_H_
#define _PULL_QUANT_H_
#include"simplifier.h"
#include"var_subst.h"
#include"ast.h"
/**
\brief Pull nested quantifiers in a formula.
@ -32,22 +31,14 @@ Notes:
\remark If pull_quant(F) is a quantifier then its weight is
Min{weight(Q') | Q' is a quantifier nested in F}
*/
class pull_quant : public base_simplifier {
protected:
shift_vars m_shift;
bool visit_children(expr * n);
void reduce1(expr *);
void reduce1_app(app * n);
void reduce1_quantifier(quantifier * q);
class pull_quant {
struct imp;
imp * m_imp;
public:
pull_quant(ast_manager & m);
virtual ~pull_quant() {}
~pull_quant();
void operator()(expr * n, expr_ref & r, proof_ref & p);
void reset() { flush_cache(); }
void pull_quant1(func_decl * d, unsigned num_children, expr * const * children, expr_ref & result);
void pull_quant1(quantifier * q, expr * new_expr, expr_ref & result);
void pull_quant1(expr * n, expr_ref & result);
void reset();
void pull_quant2(expr * n, expr_ref & r, proof_ref & pr);
};
@ -55,13 +46,14 @@ public:
\brief After applying this transformation the formula will not
contain nested quantifiers.
*/
class pull_nested_quant : public simplifier {
pull_quant m_pull;
virtual bool visit_quantifier(quantifier * q);
virtual void reduce1_quantifier(quantifier * q);
class pull_nested_quant {
struct imp;
imp * m_imp;
public:
pull_nested_quant(ast_manager & m):simplifier(m), m_pull(m) { enable_ac_support(false); }
virtual ~pull_nested_quant() {}
pull_nested_quant(ast_manager & m);
~pull_nested_quant();
void operator()(expr * n, expr_ref & r, proof_ref & p);
void reset();
};
#endif /* _PULL_QUANT_H_ */