Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore fixes and convenient run script #152

Merged
merged 3 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,12 @@ unset(_flags)
configure_file(${CMAKE_SOURCE_DIR}/include/klee/Config/config.h.cmin
${CMAKE_BINARY_DIR}/include/klee/Config/config.h)

################################################################################
# Generate `klee/klee.h` and `klee-test-comp.c`
################################################################################
configure_file(${CMAKE_SOURCE_DIR}/include/klee/klee.h ${CMAKE_BINARY_DIR}/include/klee/klee.h COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/include/klee-test-comp.c ${CMAKE_BINARY_DIR}/include/klee-test-comp.c COPYONLY)

################################################################################
# Generate `CompileTimeInfo.h`
################################################################################
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ KLEEF Symbolic Virtual Machine
[![Build Status](https://github.com/UnitTestBot/klee/workflows/CI/badge.svg)](https://github.com/UnitTestBot/klee/actions?query=workflow%3ACI)
[![Coverage](https://codecov.io/gh/UnitTestBot/klee/branch/main/graph/badge.svg)](https://codecov.io/gh/UnitTestBot/klee)

`KLEEF` is a complete overhaul of the KLEE symbolic execution engine for LLVM, fine-tuned for a robust analysis of industrial C/C++ code.

`KLEEF`` is a complete overhaul of the KLEE symbolic execution engine for LLVM, fine-tuned for a robust analysis of industrial C/C++ code.
For further information, see the [webpage](https://toolchain-labs.com/projects/kleef.html).
5 changes: 4 additions & 1 deletion include/klee-test-comp.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@
//
//===----------------------------------------------------------------------===//

#include <stdint.h>
#ifdef EXTERNAL
#include "klee.h"
#include <assert.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#else
void klee_make_symbolic(void *addr, unsigned int nbytes, const char *name);
void klee_assume(_Bool condition);
__attribute__((noreturn)) void klee_silent_exit(int status);
void __assert_fail(const char *assertion, const char *file, unsigned int line,
const char *function);
void klee_prefer_cex(void *, uintptr_t);
#endif

int __VERIFIER_nondet_int(void) {
Expand All @@ -35,11 +36,13 @@ unsigned int __VERIFIER_nondet_uint(void) {
return x;
}

#ifdef __x86_64__
unsigned __int128 __VERIFIER_nondet_uint128(void) {
unsigned __int128 x;
klee_make_symbolic(&x, sizeof(x), "unsigned __int128");
return x;
}
#endif

unsigned __VERIFIER_nondet_unsigned(void) {
unsigned x;
Expand Down
Loading
Loading