diff options
author | Kshitij Bansal <kshitij@cs.nyu.edu> | 2014-04-17 13:03:30 -0400 |
---|---|---|
committer | Kshitij Bansal <kshitij@cs.nyu.edu> | 2014-04-17 13:40:15 -0400 |
commit | f26477575d4328104ee6882c5d7d55740964543d (patch) | |
tree | 8dc248031d8cc213762f0fa30ff13a7b8f851984 /src/theory/quantifiers/term_database.cpp | |
parent | 4b02944c70522de78713f9870d2eccbf348bfcf6 (diff) |
simplify mkSkolem naming system: don't use $$
Short summary: By default NODEID is appeneded, just continue doing what you
were, just don't add the _$$ at the end.
Long summary:
Before this commit there were four (yes!) ways to specify the names for new
skolems, which result in names as given below
1) mkSkolem("name", ..., SKOLEM_FLAG_DEFAULT) -> "name_NODEID"
2) mkSkolem("name", ..., SKOLEM_EXACT_NAME) -> "name"
3) mkSkolem("name_$$", ..., SKOLEM_FLAG_DEFAULT) -> "name_NODEID"
4) mkSkolem("na_$$_me", ..., SKOLEM_FLAG_DEFAULT) -> "na_NODEID_me"
After this commit, only 1) and 2) stay.
90% usage is of 1) or 3), which results in exact same behavior (and
looking at the source code it doesn't look like everyone realized that
the _$$ is just redundant).
Almost no one used 4), which is the only reason to even have $$. Post this
commit if you really want a number in the middle, manually construct the
name and use the SKOLEM_EXACT_NAME flag.
Diffstat (limited to 'src/theory/quantifiers/term_database.cpp')
-rw-r--r-- | src/theory/quantifiers/term_database.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/theory/quantifiers/term_database.cpp b/src/theory/quantifiers/term_database.cpp index ea1231e7a..cf183dd18 100644 --- a/src/theory/quantifiers/term_database.cpp +++ b/src/theory/quantifiers/term_database.cpp @@ -413,7 +413,7 @@ Node TermDb::getSkolemizedBody( Node f ){ if( d_skolem_body.find( f )==d_skolem_body.end() ){ std::vector< Node > vars; for( int i=0; i<(int)f[0].getNumChildren(); i++ ){ - Node skv = NodeManager::currentNM()->mkSkolem( "skv_$$", f[0][i].getType(), "is a termdb-created skolemized body" ); + Node skv = NodeManager::currentNM()->mkSkolem( "skv", f[0][i].getType(), "is a termdb-created skolemized body" ); d_skolem_constants[ f ].push_back( skv ); vars.push_back( f[0][i] ); //carry information for sort inference @@ -441,7 +441,7 @@ Node TermDb::getFreeVariableForInstConstant( Node n ){ Rational z(0); d_free_vars[tn] = NodeManager::currentNM()->mkConst( z ); }else{ - d_free_vars[tn] = NodeManager::currentNM()->mkSkolem( "freevar_$$", tn, "is a free variable created by termdb" ); + d_free_vars[tn] = NodeManager::currentNM()->mkSkolem( "freevar", tn, "is a free variable created by termdb" ); Trace("mkVar") << "FreeVar:: Make variable " << d_free_vars[tn] << " : " << tn << std::endl; } } |