mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 12:08:18 +00:00
add counter to theory_str::mk_fresh_const()
This commit is contained in:
parent
169295c9ba
commit
bf147556a6
|
@ -60,6 +60,7 @@ namespace smt {
|
||||||
totalCacheAccessCount(0),
|
totalCacheAccessCount(0),
|
||||||
cacheHitCount(0),
|
cacheHitCount(0),
|
||||||
cacheMissCount(0),
|
cacheMissCount(0),
|
||||||
|
m_fresh_id(0),
|
||||||
m_find(*this),
|
m_find(*this),
|
||||||
m_trail_stack(*this)
|
m_trail_stack(*this)
|
||||||
{
|
{
|
||||||
|
@ -441,7 +442,12 @@ namespace smt {
|
||||||
}
|
}
|
||||||
|
|
||||||
app * theory_str::mk_fresh_const(char const* name, sort* s) {
|
app * theory_str::mk_fresh_const(char const* name, sort* s) {
|
||||||
return u.mk_skolem(symbol(name), 0, 0, s);
|
string_buffer<64> buffer;
|
||||||
|
buffer << name;
|
||||||
|
buffer << "!tmp";
|
||||||
|
buffer << m_fresh_id;
|
||||||
|
m_fresh_id++;
|
||||||
|
return u.mk_skolem(symbol(buffer.c_str()), 0, 0, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -350,6 +350,8 @@ protected:
|
||||||
unsigned long cacheHitCount;
|
unsigned long cacheHitCount;
|
||||||
unsigned long cacheMissCount;
|
unsigned long cacheMissCount;
|
||||||
|
|
||||||
|
unsigned m_fresh_id;
|
||||||
|
|
||||||
// cache mapping each string S to Length(S)
|
// cache mapping each string S to Length(S)
|
||||||
obj_map<expr, app*> length_ast_map;
|
obj_map<expr, app*> length_ast_map;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue