mirror of
https://github.com/Z3Prover/z3
synced 2025-04-29 11:55:51 +00:00
refactor occurrence utility for common use (to be used in ctx_simplifier) per Nuno's suggestion
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
9743c188da
commit
03a0a6f6a1
3 changed files with 138 additions and 82 deletions
38
src/tactic/core/collect_occs.h
Normal file
38
src/tactic/core/collect_occs.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
/*++
|
||||
Copyright (c) 2011 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
collect_cccs.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Collect variables by occurrences.
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo (leonardo) 2011-10-22
|
||||
|
||||
Notes:
|
||||
|
||||
--*/
|
||||
#ifndef COLLECT_OCCS_H_
|
||||
#define COLLECT_OCCS_H_
|
||||
|
||||
class collect_occs {
|
||||
expr_fast_mark1 m_visited;
|
||||
expr_fast_mark2 m_more_than_once;
|
||||
typedef std::pair<expr *, unsigned> frame;
|
||||
svector<frame> m_stack;
|
||||
ptr_vector<app> m_vars;
|
||||
|
||||
bool visit(expr * t);
|
||||
void process(expr * t);
|
||||
|
||||
public:
|
||||
|
||||
void operator()(goal const & g, obj_hashtable<expr> & r);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue