summaryrefslogtreecommitdiff
path: root/src/printer
diff options
context:
space:
mode:
Diffstat (limited to 'src/printer')
-rw-r--r--src/printer/cvc/cvc_printer.cpp30
-rw-r--r--src/printer/smt2/smt2_printer.cpp3
2 files changed, 20 insertions, 13 deletions
diff --git a/src/printer/cvc/cvc_printer.cpp b/src/printer/cvc/cvc_printer.cpp
index 22a491af5..f8448f1e9 100644
--- a/src/printer/cvc/cvc_printer.cpp
+++ b/src/printer/cvc/cvc_printer.cpp
@@ -24,11 +24,12 @@
#include <typeinfo>
#include <vector>
-#include "expr/expr.h" // for ExprSetDepth etc..
-#include "expr/node_manager_attributes.h" // for VarNameAttr
-#include "options/language.h" // for LANG_AST
-#include "printer/dagification_visitor.h"
+#include "expr/dtype.h"
+#include "expr/expr.h" // for ExprSetDepth etc..
+#include "expr/node_manager_attributes.h" // for VarNameAttr
+#include "options/language.h" // for LANG_AST
#include "options/smt_options.h"
+#include "printer/dagification_visitor.h"
#include "smt/command.h"
#include "smt/smt_engine.h"
#include "smt_util/node_visitor.h"
@@ -179,7 +180,9 @@ void CvcPrinter::toStream(
break;
case kind::DATATYPE_TYPE: {
- const Datatype& dt = (NodeManager::currentNM()->getDatatypeForIndex( n.getConst< DatatypeIndexConstant >().getIndex() ));
+ const Datatype& dt =
+ NodeManager::currentNM()->toExprManager()->getDatatypeForIndex(
+ n.getConst<DatatypeIndexConstant>().getIndex());
if( dt.isTuple() ){
out << '[';
for (unsigned i = 0; i < dt[0].getNumArgs(); ++ i) {
@@ -347,14 +350,17 @@ void CvcPrinter::toStream(
// DATATYPES
case kind::PARAMETRIC_DATATYPE: {
- const Datatype & dt = (NodeManager::currentNM()->getDatatypeForIndex( n[0].getConst< DatatypeIndexConstant >().getIndex() ));
- out << dt.getName() << '[';
- for(unsigned i = 1; i < n.getNumChildren(); ++i) {
- if(i > 1) {
- out << ',';
- }
- out << n[i];
+ const DType& dt = NodeManager::currentNM()->getDTypeForIndex(
+ n[0].getConst<DatatypeIndexConstant>().getIndex());
+ out << dt.getName() << '[';
+ for (unsigned i = 1; i < n.getNumChildren(); ++i)
+ {
+ if (i > 1)
+ {
+ out << ',';
}
+ out << n[i];
+ }
out << ']';
}
return;
diff --git a/src/printer/smt2/smt2_printer.cpp b/src/printer/smt2/smt2_printer.cpp
index 006895df7..f0a1e740f 100644
--- a/src/printer/smt2/smt2_printer.cpp
+++ b/src/printer/smt2/smt2_printer.cpp
@@ -21,6 +21,7 @@
#include <typeinfo>
#include <vector>
+#include "expr/dtype.h"
#include "expr/node_manager_attributes.h"
#include "options/bv_options.h"
#include "options/language.h"
@@ -246,7 +247,7 @@ void Smt2Printer::toStream(std::ostream& out,
case kind::DATATYPE_TYPE:
{
- const Datatype& dt = (NodeManager::currentNM()->getDatatypeForIndex(
+ const DType& dt = (NodeManager::currentNM()->getDTypeForIndex(
n.getConst<DatatypeIndexConstant>().getIndex()));
if (dt.isTuple())
{
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback