diff options
author | Morgan Deters <mdeters@gmail.com> | 2011-04-20 05:37:38 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2011-04-20 05:37:38 +0000 |
commit | 12c1e41862e4b12c3953272416a1edc103d299ee (patch) | |
tree | 9c7d3a044c33ffc3be177e6ca692eb4149add27c /src/printer | |
parent | 08df44e6b61999a14dd24a7a134146694dcb3596 (diff) |
Tuesday end-of-day commit.
Expected performance impact outside of datatypes/CVC parser is
negligible.
* CVC language LAMBDA, functional LET, type LET, precedence fixes,
bitvectors, and arrays, with partial parsing support also for
quantifiers, tuples, subranges, subtypes, and records
* support for complex recursive DATATYPE selectors, e.g.
tree = node(children:ARRAY INT OF tree) | leaf(data:INT)
these are complicated because they have to be left unresolved
at parse time and dealt with in a second pass.
* bugfix for Exprs/Types that occurred when setting them to null
(not Nodes/TypeNodes, just Exprs/Types).
* Cleanup/code review items
Diffstat (limited to 'src/printer')
-rw-r--r-- | src/printer/cvc/cvc_printer.cpp | 18 | ||||
-rw-r--r-- | src/printer/smt2/smt2_printer.cpp | 3 |
2 files changed, 19 insertions, 2 deletions
diff --git a/src/printer/cvc/cvc_printer.cpp b/src/printer/cvc/cvc_printer.cpp index 97f434e9b..409518fcf 100644 --- a/src/printer/cvc/cvc_printer.cpp +++ b/src/printer/cvc/cvc_printer.cpp @@ -85,6 +85,24 @@ void CvcPrinter::toStream(std::ostream& out, TNode n, out << '(' << rat.getNumerator() << '/' << rat.getDenominator() << ')'; break; } + case kind::TYPE_CONSTANT: + switch(TypeConstant tc = n.getConst<TypeConstant>()) { + case REAL_TYPE: + out << "REAL"; + break; + case INTEGER_TYPE: + out << "INT"; + break; + case BOOLEAN_TYPE: + out << "BOOLEAN"; + break; + case KIND_TYPE: + out << "TYPE"; + break; + default: + Unhandled(tc); + } + break; case kind::BUILTIN: switch(Kind k = n.getConst<Kind>()) { case kind::EQUAL: out << '='; break; diff --git a/src/printer/smt2/smt2_printer.cpp b/src/printer/smt2/smt2_printer.cpp index 9bad4c7b5..3f7eb58c0 100644 --- a/src/printer/smt2/smt2_printer.cpp +++ b/src/printer/smt2/smt2_printer.cpp @@ -178,7 +178,6 @@ void Smt2Printer::toStream(std::ostream& out, TNode n, if(toDepth != 0) { n.getOperator().toStream(out, toDepth < 0 ? toDepth : toDepth - 1, types, language::output::LANG_SMTLIB_V2); - out << " "; } else { out << "(...)"; } @@ -207,7 +206,7 @@ void printBvParameterizedOp(std::ostream& out, TNode n) { switch(n.getKind()) { case kind::BITVECTOR_EXTRACT: { BitVectorExtract p = n.getOperator().getConst<BitVectorExtract>(); - out << "extract " << p.high << " " << p.low; + out << "extract " << p.high << ' ' << p.low; break; } case kind::BITVECTOR_REPEAT: |