From: Morgan Deters Date: Sun, 22 Jun 2014 00:12:42 +0000 (-0400) Subject: Fix to the compatibility library (this does fix the build). X-Git-Tag: cvc5-1.0.0~6748 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3264f3bb76944129074c2a3204a94f0b02740e23;p=cvc5.git Fix to the compatibility library (this does fix the build). --- diff --git a/src/compat/cvc3_compat.cpp b/src/compat/cvc3_compat.cpp index ee96f79ec..b4ab57283 100644 --- a/src/compat/cvc3_compat.cpp +++ b/src/compat/cvc3_compat.cpp @@ -389,6 +389,18 @@ bool Expr::isRawList() const { return false; } +bool Expr::isAtomic() const { + if (getType().isBool()) { + return isBoolConst(); + } + for (int k = 0; k < arity(); ++k) { + if (!(*this)[k].isAtomic()) { + return false; + } + } + return true; +} + bool Expr::isAtomicFormula() const { if (!getType().isBool()) { return false; @@ -459,16 +471,8 @@ std::string Expr::getUid() const { } std::string Expr::getString() const { - if(getKind() == CVC4::kind::SEXPR) { - CVC4::SExpr s = getConst(); - if(s.isString() || s.isKeyword()) { - return s.getValue(); - } - } else if(getKind() == CVC4::kind::CONST_STRING) { - return getConst().toString(); - } - - CVC4::CheckArgument(false, *this, "CVC3::Expr::getString(): not a string Expr: `%s'", toString().c_str()); + CVC4::CheckArgument(getKind() == CVC4::kind::CONST_STRING, *this, "CVC3::Expr::getString(): not a string Expr: `%s'", toString().c_str()); + return getConst().toString(); } std::vector Expr::getVars() const {