3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-09-03 00:28:06 +00:00

make self-contained bind-variables

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2014-09-24 14:30:30 -07:00
parent 918d52f1b0
commit 6457654e2e
5 changed files with 231 additions and 61 deletions

View file

@ -0,0 +1,51 @@
/*++
Copyright (c) 2013 Microsoft Corporation
Module Name:
bind_variables.h
Abstract:
Utility to find constants that are declard as varaibles.
Author:
Nikolaj Bjorner (nbjorner) 9-24-2014
Notes:
--*/
#ifndef _BIND_VARIABLES_H_
#define _BIND_VARIABLES_H_
#include"ast.h"
class bind_variables {
typedef obj_map<app, var*> var2bound;
typedef obj_map<expr, expr*> cache_t;
ast_manager& m;
app_ref_vector m_vars;
obj_map<expr, expr*> m_cache;
var2bound m_var2bound;
expr_ref_vector m_pinned;
ptr_vector<sort> m_bound;
svector<symbol> m_names;
ptr_vector<expr> m_todo;
ptr_vector<expr> m_args;
expr_ref abstract(expr* fml, cache_t& cache, unsigned scope);
public:
bind_variables(ast_manager & m);
~bind_variables();
expr_ref operator()(expr* fml, bool is_forall);
void add_var(app* v);
};
#endif /* _BIND_VARIABLES_H_ */