ExprPPrinter.h

Go to the documentation of this file.
00001 //===-- ExprPPrinter.h ------------------------------------------*- C++ -*-===//
00002 //
00003 //                     The KLEE Symbolic Virtual Machine
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 
00010 #ifndef KLEE_EXPRPPRINTER_H
00011 #define KLEE_EXPRPPRINTER_H
00012 
00013 #include "klee/Expr.h"
00014 
00015 namespace klee {
00016   class ConstraintManager;
00017 
00018   class ExprPPrinter {
00019   protected:
00020     ExprPPrinter() {}
00021     
00022   public:
00023     static ExprPPrinter *create(std::ostream &os);
00024 
00025     virtual ~ExprPPrinter() {}
00026 
00027     virtual void setNewline(const std::string &newline) = 0;
00028     virtual void reset() = 0;
00029     virtual void scan(const ref<Expr> &e) = 0;
00030     virtual void print(const ref<Expr> &e, unsigned indent=0) = 0;
00031 
00032     // utility methods
00033 
00034     template<class Container>
00035     void scan(Container c) {
00036       scan(c.begin(), c.end());
00037     }
00038 
00039     template<class InputIterator>
00040     void scan(InputIterator it, InputIterator end) {
00041       for (; it!=end; ++it)
00042         scan(*it);
00043     }
00044 
00047     static void printOne(std::ostream &os, const char *message, 
00048                          const ref<Expr> &e);
00049 
00057     static void printSingleExpr(std::ostream &os, const ref<Expr> &e);
00058 
00059     static void printConstraints(std::ostream &os,
00060                                  const ConstraintManager &constraints);
00061 
00062     static void printQuery(std::ostream &os,
00063                            const ConstraintManager &constraints,
00064                            const ref<Expr> &q,
00065                            const ref<Expr> *evalExprsBegin = 0,
00066                            const ref<Expr> *evalExprsEnd = 0,
00067                            const Array * const* evalArraysBegin = 0,
00068                            const Array * const* evalArraysEnd = 0);
00069   };
00070 
00071 }
00072 
00073 #endif

Generated on Fri Jun 5 03:31:31 2009 for klee by  doxygen 1.5.8