summaryrefslogtreecommitdiff
path: root/src/expr
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr')
-rw-r--r--src/expr/datatype.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/expr/datatype.cpp b/src/expr/datatype.cpp
index 3b925d0b1..5e1343bb0 100644
--- a/src/expr/datatype.cpp
+++ b/src/expr/datatype.cpp
@@ -180,7 +180,10 @@ void Datatype::addSygusConstructor(Expr op,
{
Debug("dt-sygus") << "--> Add constructor " << cname << " to " << getName() << std::endl;
Debug("dt-sygus") << " sygus op : " << op << std::endl;
- std::string name = getName() + "_" + cname;
+ // avoid name clashes
+ std::stringstream ss;
+ ss << getName() << "_" << getNumConstructors() << "_" << cname;
+ std::string name = ss.str();
std::string testerId("is-");
testerId.append(name);
unsigned cweight = weight >= 0 ? weight : (cargs.empty() ? 0 : 1);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback