ExprEvaluator.h

Go to the documentation of this file.
00001 //===-- ExprEvaluator.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_EXPREVALUATOR_H
00011 #define KLEE_EXPREVALUATOR_H
00012 
00013 #include "klee/Expr.h"
00014 #include "klee/util/ExprVisitor.h"
00015 
00016 namespace klee {
00017   class ExprEvaluator : public ExprVisitor {
00018   protected:
00019     Action evalRead(const UpdateList &ul, unsigned index);
00020     Action visitRead(const ReadExpr &re);
00021       
00022     Action protectedDivOperation(const BinaryExpr &e);
00023     Action visitUDiv(const UDivExpr &e);
00024     Action visitSDiv(const SDivExpr &e);
00025     Action visitURem(const URemExpr &e);
00026     Action visitSRem(const SRemExpr &e);
00027       
00028   public:
00029     ExprEvaluator() {}
00030 
00031     // override to implement evaluation, this function is called to
00032     // get the initial value for a symbolic byte. if the value is
00033     // unknown then the user can simply return a ReadExpr at version 0
00034     // of this MemoryObject.
00035     virtual ref<Expr> getInitialValue(const Array& os, unsigned index) = 0;
00036   };
00037 }
00038 
00039 #endif

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