3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-11 03:33:35 +00:00
z3/lib/expr_substitution.h
Leonardo de Moura e9eab22e5c Z3 sources
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-10-02 11:35:25 -07:00

55 lines
1.4 KiB
C++

/*++
Copyright (c) 2011 Microsoft Corporation
Module Name:
expr_substitution.h
Abstract:
expr -> expr substitution
Author:
Leonardo (leonardo) 2011-04-29
Notes:
--*/
#ifndef _EXPR_SUBSTITUTION_H_
#define _EXPR_SUBSTITUTION_H_
#include"ast.h"
class expr_substitution {
ast_manager & m_manager;
obj_map<expr, expr*> m_subst;
scoped_ptr<obj_map<expr, proof*> > m_subst_pr;
scoped_ptr<obj_map<expr, expr_dependency*> > m_subst_dep;
unsigned m_cores_enabled:1;
unsigned m_proofs_enabled:1;
void init();
public:
expr_substitution(ast_manager & m);
expr_substitution(ast_manager & m, bool cores_enabled);
expr_substitution(ast_manager & m, bool cores_enabled, bool proofs_enabled);
~expr_substitution();
ast_manager & m() const { return m_manager; }
bool proofs_enabled() const { return m_proofs_enabled; }
bool unsat_core_enabled() const { return m_cores_enabled; }
bool empty() const { return m_subst.empty(); }
void insert(expr * s, expr * def, proof * def_pr = 0, expr_dependency * def_dep = 0);
void erase(expr * s);
bool find(expr * s, expr * & def, proof * & def_pr);
bool find(expr * s, expr * & def, proof * & def_pr, expr_dependency * & def_dep);
void reset();
void cleanup();
};
#endif