internal variables (skolems) aren't printed as part of the model
authorMorgan Deters <mdeters@gmail.com>
Fri, 30 Nov 2012 21:43:11 +0000 (21:43 +0000)
committerMorgan Deters <mdeters@gmail.com>
Fri, 30 Nov 2012 21:43:11 +0000 (21:43 +0000)
(this commit was certified error- and warning-free by the test-and-commit script.)

src/printer/cvc/cvc_printer.cpp
src/printer/smt2/smt2_printer.cpp

index a9d439a0fb151f3aee4bae25b0aa46f13a184591..c375c76c4f811aae46dab56fa27d08c272795513 100644 (file)
@@ -828,6 +828,10 @@ void CvcPrinter::toStream(std::ostream& out, Model& m, const Command* c) const t
     }
   } else if(dynamic_cast<const DeclareFunctionCommand*>(c) != NULL) {
     Node n = Node::fromExpr( ((const DeclareFunctionCommand*)c)->getFunction() );
+    if(n.getKind() == kind::SKOLEM) {
+      // don't print out internal stuff
+      return;
+    }
     TypeNode tn = n.getType();
     out << n << " : ";
     /* Boolean terms functionality needs to be merged in
index ae589eba69f81479110f6ca260268d8c364529a1..2b282433414ebeeeb8315e8b12a8fe29d329e77d 100644 (file)
@@ -563,6 +563,10 @@ void Smt2Printer::toStream(std::ostream& out, Model& m, const Command* c) const
     }
   } else if(dynamic_cast<const DeclareFunctionCommand*>(c) != NULL) {
     Node n = Node::fromExpr( ((const DeclareFunctionCommand*)c)->getFunction() );
+    if(n.getKind() == kind::SKOLEM) {
+      // don't print out internal stuff
+      return;
+    }
     Node val = tm.getValue( n );
     if(val.getKind() == kind::LAMBDA) {
       out << "(define-fun " << n << " " << val[0]