diff options
author | ajreynol <andrew.j.reynolds@gmail.com> | 2015-06-12 16:32:32 +0200 |
---|---|---|
committer | ajreynol <andrew.j.reynolds@gmail.com> | 2015-06-12 16:32:32 +0200 |
commit | 61415ee2c5659893055f71d84a38eab8701dc47a (patch) | |
tree | ca7c2f9c5f0dc846dd91d6f96d569855eeee531e /src/printer/smt2 | |
parent | ad0863ae8333c4dcd950153e0db8cd4565a250b3 (diff) |
Make sygus an output language. Parse declare-fun in sygus. Minor improvements to robustness of sygus parsing.
Diffstat (limited to 'src/printer/smt2')
-rw-r--r-- | src/printer/smt2/smt2_printer.cpp | 6 | ||||
-rw-r--r-- | src/printer/smt2/smt2_printer.h | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/printer/smt2/smt2_printer.cpp b/src/printer/smt2/smt2_printer.cpp index 7648a1587..79cb18d92 100644 --- a/src/printer/smt2/smt2_printer.cpp +++ b/src/printer/smt2/smt2_printer.cpp @@ -152,7 +152,11 @@ void Smt2Printer::toStream(std::ostream& out, TNode n, } break; case kind::BITVECTOR_TYPE: - out << "(_ BitVec " << n.getConst<BitVectorSize>().size << ")"; + if(d_variant == sygus_variant ){ + out << "(BitVec " << n.getConst<BitVectorSize>().size << ")"; + }else{ + out << "(_ BitVec " << n.getConst<BitVectorSize>().size << ")"; + } break; case kind::FLOATINGPOINT_TYPE: out << "(_ FloatingPoint " diff --git a/src/printer/smt2/smt2_printer.h b/src/printer/smt2/smt2_printer.h index 4455a053c..ba6276aa2 100644 --- a/src/printer/smt2/smt2_printer.h +++ b/src/printer/smt2/smt2_printer.h @@ -30,7 +30,8 @@ namespace smt2 { enum Variant { no_variant, smt2_0_variant, // old-style 2.0 syntax, when it makes a difference - z3str_variant // old-style 2.0 and also z3str syntax + z3str_variant, // old-style 2.0 and also z3str syntax + sygus_variant // variant for sygus };/* enum Variant */ class Smt2Printer : public CVC4::Printer { |