From 266cc79f26aa8df4718f2309808f77a5426f266c Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Sat, 23 May 2009 02:42:09 +0000 Subject: Changed bout to ktest. Kept "BOUT\n" as the header of test files, for backward compatibility. Also changed KLEE_RUNTEST to KTEST_FILE. Updated tutorial-1. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72312 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/klee/Internal/ADT/BOut.h | 62 --------------------------------------- include/klee/Internal/ADT/KTest.h | 62 +++++++++++++++++++++++++++++++++++++++ include/klee/Interpreter.h | 6 ++-- 3 files changed, 65 insertions(+), 65 deletions(-) delete mode 100644 include/klee/Internal/ADT/BOut.h create mode 100644 include/klee/Internal/ADT/KTest.h (limited to 'include') diff --git a/include/klee/Internal/ADT/BOut.h b/include/klee/Internal/ADT/BOut.h deleted file mode 100644 index 14aeb714..00000000 --- a/include/klee/Internal/ADT/BOut.h +++ /dev/null @@ -1,62 +0,0 @@ -//===-- BOut.h --------------------------------------------------*- C++ -*-===// -// -// The KLEE Symbolic Virtual Machine -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// - -#ifndef __COMMON_BOUT_H__ -#define __COMMON_BOUT_H__ - - -#ifdef __cplusplus -extern "C" { -#endif - - typedef struct BOutObject BOutObject; - struct BOutObject { - char *name; - unsigned numBytes; - unsigned char *bytes; - }; - - typedef struct BOut BOut; - struct BOut { - /* file format version */ - unsigned version; - - unsigned numArgs; - char **args; - - unsigned symArgvs; - unsigned symArgvLen; - - unsigned numObjects; - BOutObject *objects; - }; - - - /* returns the current .bout file format version */ - unsigned bOut_getCurrentVersion(); - - /* return true iff file at path matches BOut header */ - int bOut_isBOutFile(const char *path); - - /* returns NULL on (unspecified) error */ - BOut* bOut_fromFile(const char *path); - - /* returns 1 on success, 0 on (unspecified) error */ - int bOut_toFile(BOut *, const char *path); - - /* returns total number of object bytes */ - unsigned bOut_numBytes(BOut *); - - void bOut_free(BOut *); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/include/klee/Internal/ADT/KTest.h b/include/klee/Internal/ADT/KTest.h new file mode 100644 index 00000000..c6586f9e --- /dev/null +++ b/include/klee/Internal/ADT/KTest.h @@ -0,0 +1,62 @@ +//===-- KTest.h --------------------------------------------------*- C++ -*-===// +// +// The KLEE Symbolic Virtual Machine +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef __COMMON_KTEST_H__ +#define __COMMON_KTEST_H__ + + +#ifdef __cplusplus +extern "C" { +#endif + + typedef struct KTestObject KTestObject; + struct KTestObject { + char *name; + unsigned numBytes; + unsigned char *bytes; + }; + + typedef struct KTest KTest; + struct KTest { + /* file format version */ + unsigned version; + + unsigned numArgs; + char **args; + + unsigned symArgvs; + unsigned symArgvLen; + + unsigned numObjects; + KTestObject *objects; + }; + + + /* returns the current .ktest file format version */ + unsigned kTest_getCurrentVersion(); + + /* return true iff file at path matches KTest header */ + int kTest_isKTestFile(const char *path); + + /* returns NULL on (unspecified) error */ + KTest* kTest_fromFile(const char *path); + + /* returns 1 on success, 0 on (unspecified) error */ + int kTest_toFile(KTest *, const char *path); + + /* returns total number of object bytes */ + unsigned kTest_numBytes(KTest *); + + void kTest_free(KTest *); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/include/klee/Interpreter.h b/include/klee/Interpreter.h index eca6e59e..14e653c1 100644 --- a/include/klee/Interpreter.h +++ b/include/klee/Interpreter.h @@ -14,7 +14,7 @@ #include #include -struct BOut; +struct KTest; namespace llvm { class Function; @@ -102,7 +102,7 @@ public: // supply a test case to replay from. this can be used to drive the // interpretation down a user specified path. use null to reset. - virtual void setReplayOut(const struct BOut *out) = 0; + virtual void setReplayOut(const struct KTest *out) = 0; // supply a list of branch decisions specifying which direction to // take on forks. this can be used to drive the interpretation down @@ -111,7 +111,7 @@ public: // supply a set of symbolic bindings that will be used as "seeds" // for the search. use null to reset. - virtual void useSeeds(const std::vector *seeds) = 0; + virtual void useSeeds(const std::vector *seeds) = 0; virtual void runFunctionAsMain(llvm::Function *f, int argc, -- cgit 1.4.1