summaryrefslogtreecommitdiff
path: root/src/theory/arith
diff options
context:
space:
mode:
authorKshitij Bansal <kshitij@cs.nyu.edu>2014-04-17 13:03:30 -0400
committerKshitij Bansal <kshitij@cs.nyu.edu>2014-04-17 13:40:15 -0400
commitf26477575d4328104ee6882c5d7d55740964543d (patch)
tree8dc248031d8cc213762f0fa30ff13a7b8f851984 /src/theory/arith
parent4b02944c70522de78713f9870d2eccbf348bfcf6 (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/arith')
-rw-r--r--src/theory/arith/arith_ite_utils.cpp2
-rw-r--r--src/theory/arith/theory_arith_private.cpp8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/theory/arith/arith_ite_utils.cpp b/src/theory/arith/arith_ite_utils.cpp
index 4f182fb69..d5dcae726 100644
--- a/src/theory/arith/arith_ite_utils.cpp
+++ b/src/theory/arith/arith_ite_utils.cpp
@@ -418,7 +418,7 @@ bool ArithIteUtils::solveBinOr(TNode binor){
Node cnd = findIteCnd(binor[0], binor[1]);
- Node sk = nm->mkSkolem("deor$$", nm->booleanType());
+ Node sk = nm->mkSkolem("deor", nm->booleanType());
Node ite = sk.iteNode(otherL, otherR);
d_skolems.insert(sk, cnd);
d_skolemsAdded.push_back(sk);
diff --git a/src/theory/arith/theory_arith_private.cpp b/src/theory/arith/theory_arith_private.cpp
index a63de446c..0c8ca7507 100644
--- a/src/theory/arith/theory_arith_private.cpp
+++ b/src/theory/arith/theory_arith_private.cpp
@@ -226,7 +226,7 @@ Node TheoryArithPrivate::getRealDivideBy0Func(){
if(d_realDivideBy0Func.isNull()){
TypeNode realType = NodeManager::currentNM()->realType();
- d_realDivideBy0Func = skolemFunction("/by0_$$", realType, realType);
+ d_realDivideBy0Func = skolemFunction("/by0", realType, realType);
}
return d_realDivideBy0Func;
}
@@ -237,7 +237,7 @@ Node TheoryArithPrivate::getIntDivideBy0Func(){
if(d_intDivideBy0Func.isNull()){
TypeNode intType = NodeManager::currentNM()->integerType();
- d_intDivideBy0Func = skolemFunction("divby0_$$", intType, intType);
+ d_intDivideBy0Func = skolemFunction("divby0", intType, intType);
}
return d_intDivideBy0Func;
}
@@ -248,7 +248,7 @@ Node TheoryArithPrivate::getIntModulusBy0Func(){
if(d_intModulusBy0Func.isNull()){
TypeNode intType = NodeManager::currentNM()->integerType();
- d_intModulusBy0Func = skolemFunction("modby0_$$", intType, intType);
+ d_intModulusBy0Func = skolemFunction("modby0", intType, intType);
}
return d_intModulusBy0Func;
}
@@ -1498,7 +1498,7 @@ Node TheoryArithPrivate::axiomIteForTotalIntDivision(Node int_div_like){
Polynomial qp = Polynomial::parsePolynomial(q);
Node abs_d = (n.isConstant()) ?
- d.getHead().getConstant().abs().getNode() : mkIntSkolem("abs_$$");
+ d.getHead().getConstant().abs().getNode() : mkIntSkolem("abs");
Node eq = Comparison::mkComparison(EQUAL, n, d * qp + rp).getNode();
Node leq0 = currNM->mkNode(LEQ, zero, r);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback