//===-- AssignmentGenerator.h ---------------------------------------------===// // // The KLEE Symbolic Virtual Machine // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// #ifndef KLEE_ASSIGNMENTGENERATOR_H #define KLEE_ASSIGNMENTGENERATOR_H #include "klee/Expr/Expr.h" #include "klee/util/Ref.h" #include namespace klee { class Assignment; } /* namespace klee */ namespace klee { class Expr; template class ref; class AssignmentGenerator { public: static bool generatePartialAssignment(const ref &e, ref &val, Assignment *&a); private: static bool helperGenerateAssignment(const ref &e, ref &val, Assignment *&a, Expr::Width width, bool sign); static bool isReadExprAtOffset(ref e, const ReadExpr *base, ref offset); static ReadExpr *hasOrderedReads(ref e); static ref createSubExpr(const ref &l, ref &r); static ref createAddExpr(const ref &l, ref &r); static ref createMulExpr(const ref &l, ref &r); static ref createDivExpr(const ref &l, ref &r, bool sign); static ref createDivRem(const ref &l, ref &r, bool sign); static ref createShlExpr(const ref &l, ref &r); static ref createLShrExpr(const ref &l, ref &r); static ref createAndExpr(const ref &l, ref &r); static ref createExtractExpr(const ref &l, ref &r); static ref createExtendExpr(const ref &l, ref &r); static std::vector getByteValue(ref &val); static std::vector getIndexedValue(const std::vector &c_val, ConstantExpr &index, const unsigned int size); }; } // namespace klee #endif /* KLEE_ASSIGNMENTGENERATOR_H */