00001 //===-- QueryLog.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_OPT_LOGGINGSOLVER_H 00011 #define KLEE_OPT_LOGGINGSOLVER_H 00012 00013 #include "klee/Expr.h" 00014 00015 #include <vector> 00016 00017 namespace klee { 00018 struct Query; 00019 00020 class QueryLogEntry { 00021 public: 00022 enum Type { 00023 Validity, 00024 Truth, 00025 Value, 00026 Cex 00027 }; 00028 00029 typedef std::vector< ref<Expr> > exprs_ty; 00030 exprs_ty exprs; 00031 00032 Type type; 00033 ref<Expr> query; 00034 unsigned instruction; 00035 std::vector<const Array*> objects; 00036 00037 public: 00038 QueryLogEntry() : query(ConstantExpr::alloc(0,Expr::Bool)) {} 00039 QueryLogEntry(const QueryLogEntry &b); 00040 QueryLogEntry(const Query &_query, 00041 Type _type, 00042 const std::vector<const Array*> *objects = 0); 00043 }; 00044 00045 class QueryLogResult { 00046 public: 00047 uint64_t result; 00048 double time; 00049 00050 public: 00051 QueryLogResult() {} 00052 QueryLogResult(bool _success, uint64_t _result, double _time) 00053 : result(_result), time(_time) { 00054 if (!_success) { // la la la 00055 result = 0; 00056 time = -1; 00057 } 00058 } 00059 }; 00060 00061 } 00062 00063 #endif
1.5.8