fix sets-translate
authorKshitij Bansal <kshitij@cs.nyu.edu>
Tue, 30 Jun 2015 05:47:10 +0000 (01:47 -0400)
committerKshitij Bansal <kshitij@cs.nyu.edu>
Tue, 30 Jun 2015 05:47:10 +0000 (01:47 -0400)
examples/sets-translate/sets_translate.cpp

index fbec42829e46b7973ce2e30ffa14a97cba3bf880..acf0fcafe84901653c54ec9e3bae3692822d77a4 100644 (file)
@@ -94,8 +94,13 @@ class Mapper {
       setTypes.insert(t);
 
       Type elementType = t.getElementType();
-      string elementTypeAsString = elementType.toString();
-      remove_if(elementTypeAsString.begin(), elementTypeAsString.end(), nonsense);
+      ostringstream oss_type;
+      oss_type << Expr::setlanguage(language::output::LANG_SMTLIB_V2)
+               << elementType;
+      string elementTypeAsString = oss_type.str();
+      elementTypeAsString.erase(
+        remove_if(elementTypeAsString.begin(), elementTypeAsString.end(), nonsense),
+        elementTypeAsString.end());
 
       // define-sort
       ostringstream oss_name;