diff options
author | Tim King <taking@cs.nyu.edu> | 2010-02-03 19:41:14 +0000 |
---|---|---|
committer | Tim King <taking@cs.nyu.edu> | 2010-02-03 19:41:14 +0000 |
commit | 03ca7cdb382216ef995665cc59a07b4125241965 (patch) | |
tree | 925c78bc8c9b64a53adc898d508f267c917d4996 /src/expr/expr.cpp | |
parent | 14b035cd792b43ec1dc5655882378631235732ff (diff) |
By popular demand, I also added a printAst to Expr.
Diffstat (limited to 'src/expr/expr.cpp')
-rw-r--r-- | src/expr/expr.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/expr/expr.cpp b/src/expr/expr.cpp index 50c9edcd2..578eaf2f5 100644 --- a/src/expr/expr.cpp +++ b/src/expr/expr.cpp @@ -17,6 +17,8 @@ #include "expr/node.h" #include "util/Assert.h" +#include "util/output.h" + namespace CVC4 { std::ostream& operator<<(std::ostream& out, const Expr& e) { @@ -168,4 +170,14 @@ Expr BoolExpr::iteExpr(const Expr& then_e, const Expr& else_e) const { return d_em->mkExpr(ITE, *this, then_e, else_e); } +void Expr::printAst(std::ostream & o, int indent) const{ + getNode().printAst(o,indent); +} + +void Expr::debugPrint(){ + printAst(Warning()); + Warning().flush(); +} + + } // End namespace CVC4 |