From 558e2a06bdd961d906c265c4fbd3abbc85ed48a3 Mon Sep 17 00:00:00 2001 From: Gereon Kremer Date: Fri, 14 Jan 2022 19:17:29 -0800 Subject: [PATCH] Change how RANs are printed (#7955) This PR adds real algebraic number as a special case in the smt2 printer. --- src/printer/smt2/smt2_printer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/printer/smt2/smt2_printer.cpp b/src/printer/smt2/smt2_printer.cpp index eb1afb5c8..fd7825ac1 100644 --- a/src/printer/smt2/smt2_printer.cpp +++ b/src/printer/smt2/smt2_printer.cpp @@ -52,6 +52,7 @@ #include "util/floatingpoint.h" #include "util/iand.h" #include "util/indexed_root_predicate.h" +#include "util/real_algebraic_number.h" #include "util/regexp.h" #include "util/smt2_quote_string.h" #include "util/string.h" @@ -651,6 +652,13 @@ void Smt2Printer::toStream(std::ostream& out, out << "(_ divisible " << n.getOperator().getConst().k << ")"; stillNeedToPrintParams = false; break; + case kind::REAL_ALGEBRAIC_NUMBER: + { + const RealAlgebraicNumber& ran = n.getOperator().getConst(); + out << "(_ real_algebraic_number " << ran << ")"; + stillNeedToPrintParams = false; + break; + } case kind::INDEXED_ROOT_PREDICATE_OP: { const IndexedRootPredicate& irp = n.getConst(); -- 2.30.2