From f26477575d4328104ee6882c5d7d55740964543d Mon Sep 17 00:00:00 2001 From: Kshitij Bansal Date: Thu, 17 Apr 2014 13:03:30 -0400 Subject: 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. --- src/expr/node_manager.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/expr/node_manager.h') diff --git a/src/expr/node_manager.h b/src/expr/node_manager.h index 15c49efd8..f533d3ab9 100644 --- a/src/expr/node_manager.h +++ b/src/expr/node_manager.h @@ -424,12 +424,11 @@ public: /** * Create a skolem constant with the given name, type, and comment. * - * @param name the name of the new skolem variable. This name can - * contain the special character sequence "$$", in which case the - * $$ is replaced with the Node ID. That way a family of skolem - * variables can be made with unique identifiers, used in dump, - * tracing, and debugging output. By convention, you should probably - * call mkSkolem() with a custom name appended with "_$$". + * @param prefix the name of the new skolem variable is the prefix + * appended with the Node ID. This way a family of skolem variables + * can be made with unique identifiers, used in dump, tracing, and + * debugging output. Use SKOLEM_EXECT_NAME flag if you don't want + * Node ID appended and use prefix as the name. * * @param type the type of the skolem variable to create * @@ -440,7 +439,7 @@ public: * @param flags an optional mask of bits from SkolemFlags to control * mkSkolem() behavior */ - Node mkSkolem(const std::string& name, const TypeNode& type, + Node mkSkolem(const std::string& prefix, const TypeNode& type, const std::string& comment = "", int flags = SKOLEM_DEFAULT); /** Create a instantiation constant with the given type. */ -- cgit v1.2.3