32 #ifndef _cvc3__expr_stream_h_
33 #define _cvc3__expr_stream_h_
149 std::string newName();
163 void os(std::ostream& os) { d_os = &
os; }
169 int depth()
const {
return d_depth; }
175 bool dagFlag(
bool flag =
true) {
bool old = d_dag; d_dag = flag;
return old; }
269 ExprStream&
push(ExprStream& os);
270 ExprStream&
pop(ExprStream& os);
271 ExprStream&
popSave(ExprStream& os);
273 ExprStream&
reset(ExprStream& os);
274 ExprStream&
space(ExprStream& os);
275 ExprStream&
nodag(ExprStream& os);
276 ExprStream&
pushdag(ExprStream& os);
277 ExprStream&
popdag(ExprStream& os);
ExprStream & popSave(ExprStream &os)
Remember the current indentation and pop to the previous position.
ExprStream & pop(ExprStream &os)
Restore the indentation.
std::ostream * d_os
The ostream to print into.
int d_depth
Printing only upto this depth; -1 == unlimited.
ExprStream & nodag(ExprStream &os)
bool d_indent
Whether to print with indentations.
Data structure of expressions in CVC3.
ExprStream & reset(ExprStream &os)
Reset the indentation to the default at this level.
ostream & operator<<(ostream &os, const Expr &e)
InputLanguage
Different input languages.
bool d_dagBuilt
Flag whether the dagMap is already built.
ExprMap< std::string > d_newDagMap
New subexpressions not yet printed in a LET header.
MS C++ specific settings.
void pushIndent(int pos)
Set the indentation to the given absolute position.
void pushIndent()
Set the indentation to the current column.
ExprStream & space(ExprStream &os)
Insert a single white space separator.
bool d_beginningOfLine
Whether it is a beginning of line (for eating up extra spaces)
ExprManager * d_em
The ExprManager to use.
size_t d_lastDagSize
The smallest size of d_dagPtr the user can `popDag'.
void depth(int d)
Set the printing depth.
int column() const
Return the current column position.
CVC3::ExprStream & endl(CVC3::ExprStream &os)
Print the end-of-line.
ExprStream & pushdag(ExprStream &os)
bool d_nodag
nodag() manipulator has been applied
void lang(InputLanguage l)
Set the output language.
std::vector< size_t > d_dagPtr
Stack of pointers to d_dagStack for pushing/popping shared subexprs.
void lineWidth(int w)
Set the line width.
int d_idCounter
Counter for generating unique LET var names.
ExprMap< std::string > d_dagMap
Mapping subexpressions to names for DAG printing.
void os(std::ostream &os)
Set a new output stream.
ExprStream & pushRestore(ExprStream &os)
Set the indentation to the position saved by popSave()
Abstraction over different operating systems.
Pretty-printing output stream for Expr. READ THE DOCS BEFORE USING!
int depth() const
Get the printing depth.
int d_indentReg
Indentation register for popSave() and pushRestore()
ExprStream & popdag(ExprStream &os)
int d_col
Current column in a line.
int d_currDepth
Current depth of Expr.
Definition of the API to expression package. See class Expr for details.
InputLanguage d_lang
Output language.
size_t d_indentLast
The lowest position of the indent stack the user can pop.
InputLanguage lang() const
Get the current output language.
std::vector< int > d_indentStack
Indentation stack.
bool dagFlag(bool flag=true)
Set the DAG flag (return previous value)
ExprStream & push(ExprStream &os)
Set the indentation to the current position.
std::vector< Expr > d_dagStack
Stack of shared subexpressions (same as in d_dagMap)