3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-23 14:23:40 +00:00

Reorganizing code base

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-10-20 16:33:01 -07:00
parent 9a84cba6c9
commit ded42feeb6
62 changed files with 4 additions and 115 deletions

View file

@ -0,0 +1,54 @@
/*++
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