* @return the string representation of this type.
*/
inline std::string toString() const {
- return d_nv->toString();
+ std::stringstream ss;
+ OutputLanguage outlang = (this == &s_null) ? language::output::LANG_AST : options::outputLanguage();
+ d_nv->toStream(ss, -1, false, 0,
+ outlang == language::output::LANG_AUTO ?
+ language::output::LANG_AST :
+ outlang);
+ return ss.str();
}
/**
* given stream
*
* @param out the stream to serialize this node to
- * @param toDepth the depth to which to print this expression, or -1 to
- * print it fully
- * @param types set to true to ascribe types to the output expressions
- * (might break language compliance, but good for debugging expressions)
* @param language the language in which to output
*/
- inline void toStream(std::ostream& out, int toDepth = -1, bool types = false, size_t dag = 1,
- OutputLanguage language = language::output::LANG_AST) const {
- d_nv->toStream(out, toDepth, types, dag, language);
+ inline void toStream(std::ostream& out, OutputLanguage language = language::output::LANG_AST) const {
+ d_nv->toStream(out, -1, false, 0, language);
}
/**
* @return the stream
*/
inline std::ostream& operator<<(std::ostream& out, const TypeNode& n) {
- n.toStream(out,
- Node::setdepth::getDepth(out),
- Node::printtypes::getPrintTypes(out),
- Node::dag::getDag(out),
- Node::setlanguage::getLanguage(out));
+ n.toStream(out, Node::setlanguage::getLanguage(out));
return out;
}
*/
std::vector<std::string> parseOptions(int argc, char* argv[]) throw(OptionException);
- /**
- * Set the output language based on the given string.
- */
- void setOutputLanguage(const char* str) throw(OptionException);
-
- /**
- * Set the input language based on the given string.
- */
- void setInputLanguage(const char* str) throw(OptionException);
-
};/* class Options */
}/* CVC4 namespace */
public:
- class Keyword : protected std::string {
+ class CVC4_PUBLIC Keyword : protected std::string {
public:
Keyword(const std::string& s) : std::string(s) {}
const std::string& getString() const { return *this; }
- };/* class Keyword */
+ };/* class SExpr::Keyword */
SExpr() :
d_sexprType(SEXPR_STRING),