00001 //===-- KTest.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 __COMMON_KTEST_H__ 00011 #define __COMMON_KTEST_H__ 00012 00013 00014 #ifdef __cplusplus 00015 extern "C" { 00016 #endif 00017 00018 typedef struct KTestObject KTestObject; 00019 struct KTestObject { 00020 char *name; 00021 unsigned numBytes; 00022 unsigned char *bytes; 00023 }; 00024 00025 typedef struct KTest KTest; 00026 struct KTest { 00027 /* file format version */ 00028 unsigned version; 00029 00030 unsigned numArgs; 00031 char **args; 00032 00033 unsigned symArgvs; 00034 unsigned symArgvLen; 00035 00036 unsigned numObjects; 00037 KTestObject *objects; 00038 }; 00039 00040 00041 /* returns the current .ktest file format version */ 00042 unsigned kTest_getCurrentVersion(); 00043 00044 /* return true iff file at path matches KTest header */ 00045 int kTest_isKTestFile(const char *path); 00046 00047 /* returns NULL on (unspecified) error */ 00048 KTest* kTest_fromFile(const char *path); 00049 00050 /* returns 1 on success, 0 on (unspecified) error */ 00051 int kTest_toFile(KTest *, const char *path); 00052 00053 /* returns total number of object bytes */ 00054 unsigned kTest_numBytes(KTest *); 00055 00056 void kTest_free(KTest *); 00057 00058 #ifdef __cplusplus 00059 } 00060 #endif 00061 00062 #endif
1.5.8