mirror of
https://github.com/Z3Prover/z3
synced 2025-08-17 16:52:15 +00:00
move directory
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
42e601483d
commit
afc4c700b1
5 changed files with 4 additions and 4 deletions
53
src/ast/rewriter/cached_var_subst.h
Normal file
53
src/ast/rewriter/cached_var_subst.h
Normal file
|
@ -0,0 +1,53 @@
|
|||
/*++
|
||||
Copyright (c) 2006 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
cached_var_subst.h
|
||||
|
||||
Abstract:
|
||||
|
||||
<abstract>
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo de Moura (leonardo) 2009-01-23.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
#pragma once
|
||||
|
||||
#include "ast/rewriter/var_subst.h"
|
||||
#include "util/map.h"
|
||||
|
||||
class cached_var_subst {
|
||||
struct key {
|
||||
quantifier * m_qa;
|
||||
unsigned m_num_bindings;
|
||||
expr * m_bindings[0];
|
||||
};
|
||||
struct key_hash_proc {
|
||||
unsigned operator()(key * k) const {
|
||||
return string_hash(reinterpret_cast<char const *>(k->m_bindings), sizeof(expr *) * k->m_num_bindings, k->m_qa->get_id());
|
||||
}
|
||||
};
|
||||
struct key_eq_proc {
|
||||
bool operator()(key * k1, key * k2) const;
|
||||
};
|
||||
typedef map<key *, expr *, key_hash_proc, key_eq_proc> instances;
|
||||
ast_manager& m;
|
||||
var_subst m_proc;
|
||||
expr_ref_vector m_refs;
|
||||
instances m_instances;
|
||||
region m_region;
|
||||
ptr_vector<key> m_new_keys; // mapping from num_bindings -> next key
|
||||
key* m_key { nullptr };
|
||||
public:
|
||||
cached_var_subst(ast_manager & m);
|
||||
expr** operator()(quantifier * qa, unsigned num_bindings);
|
||||
expr_ref operator()();
|
||||
void reset();
|
||||
};
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue