Skip to content
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
2 changes: 2 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ env:
SQLITE_VERSION: 3400100
BITWUZLA_VERSION: main
BITWUZLA_COMMIT: 80ef7cd803e1c71b5939c3eb951f1736388f7090
JSON_VERSION: v3.11.3
OPTIONAL_VERSION: v3.5.0

jobs:
Linux:
Expand Down
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,8 @@ configure_file(${CMAKE_SOURCE_DIR}/include/klee/Config/CompileTimeInfo.h.cmin
################################################################################
include_directories("${CMAKE_BINARY_DIR}/include")
include_directories("${CMAKE_SOURCE_DIR}/include")
include_directories("${CMAKE_SOURCE_DIR}/json/include")
include_directories("${CMAKE_SOURCE_DIR}/optional/include")
include_directories("${OPTIONAL_SRC_DIR}/include")
include_directories("${JSON_SRC_DIR}/include")
# set(KLEE_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/include ${CMAKE_BINARY_DIR}/include)

################################################################################
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ ENV Z3_VERSION=4.8.15
ENV USE_LIBCXX=1
ENV KLEE_RUNTIME_BUILD="Debug+Asserts"
ENV SQLITE_VERSION=3400100
ENV JSON_VERSION=v3.11.3
ENV OPTIONAL_VERSION=v3.5.0
LABEL maintainer="KLEE Developers"

# TODO remove adding sudo package
Expand Down
8 changes: 7 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ SOLVERS=BITWUZLA:Z3:STP
## Google Test Required options
GTEST_VERSION=1.11.0

## json options
JSON_VERSION=v3.11.3

## optional options
OPTIONAL_VERSION=v3.5.0

## UClibC Required options
UCLIBC_VERSION=klee_uclibc_v1.3
# LLVM_VERSION is also required for UClibC
Expand All @@ -53,4 +59,4 @@ MINISAT_VERSION=master
BITWUZLA_VERSION=main
BITWUZLA_COMMIT=80ef7cd803e1c71b5939c3eb951f1736388f7090

BASE="$BASE" KLEE_RUNTIME_BUILD=$KLEE_RUNTIME_BUILD COVERAGE=$COVERAGE ENABLE_DOXYGEN=$ENABLE_DOXYGEN USE_TCMALLOC=$USE_TCMALLOC USE_LIBCXX=$USE_LIBCXX LLVM_VERSION=$LLVM_VERSION ENABLE_OPTIMIZED=$ENABLE_OPTIMIZED ENABLE_DEBUG=$ENABLE_DEBUG DISABLE_ASSERTIONS=$DISABLE_ASSERTIONS REQUIRES_RTTI=$REQUIRES_RTTI SOLVERS=$SOLVERS GTEST_VERSION=$GTEST_VERSION UCLIBC_VERSION=$UCLIBC_VERSION STP_VERSION=$STP_VERSION MINISAT_VERSION=$MINISAT_VERSION Z3_VERSION=$Z3_VERSION BITWUZLA_VERSION=$BITWUZLA_VERSION BITWUZLA_COMMIT=$BITWUZLA_COMMIT SQLITE_VERSION=$SQLITE_VERSION ./scripts/build/build.sh klee --install-system-deps
BASE="$BASE" KLEE_RUNTIME_BUILD=$KLEE_RUNTIME_BUILD COVERAGE=$COVERAGE ENABLE_DOXYGEN=$ENABLE_DOXYGEN USE_TCMALLOC=$USE_TCMALLOC USE_LIBCXX=$USE_LIBCXX LLVM_VERSION=$LLVM_VERSION ENABLE_OPTIMIZED=$ENABLE_OPTIMIZED ENABLE_DEBUG=$ENABLE_DEBUG DISABLE_ASSERTIONS=$DISABLE_ASSERTIONS REQUIRES_RTTI=$REQUIRES_RTTI SOLVERS=$SOLVERS GTEST_VERSION=$GTEST_VERSION UCLIBC_VERSION=$UCLIBC_VERSION STP_VERSION=$STP_VERSION MINISAT_VERSION=$MINISAT_VERSION Z3_VERSION=$Z3_VERSION BITWUZLA_VERSION=$BITWUZLA_VERSION BITWUZLA_COMMIT=$BITWUZLA_COMMIT SQLITE_VERSION=$SQLITE_VERSION JSON_VERSION=$JSON_VERSION OPTIONAL_VERSION=$OPTIONAL_VERSION ./scripts/build/build.sh klee --install-system-deps
1 change: 0 additions & 1 deletion json
Submodule json deleted from 6af826
1 change: 0 additions & 1 deletion optional
Submodule optional deleted from 0723ab
15 changes: 15 additions & 0 deletions scripts/build/p-json-linux-ubuntu.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
install_build_dependencies_json() {
source "${DIR}/common-functions"
with_sudo apt update -y

dependencies=(
ca-certificates
wget
unzip
git
)

#Install essential dependencies
with_sudo apt -y --no-install-recommends install "${dependencies[@]}"
}
6 changes: 6 additions & 0 deletions scripts/build/p-json-osx.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
install_build_dependencies_json() {
# Install essential dependency
# Ignore if already installed
brew install wget || /usr/bin/true
}
46 changes: 46 additions & 0 deletions scripts/build/p-json.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env bash
setup_build_variables_json() {
JSON_INSTALL_PATH="${BASE}/json-${JSON_VERSION}"
json_url="https://github.com/nlohmann/json.git"
return 0
}

download_json() {
source "${DIR}/common-functions"
# Download json
git_clone_or_update "${json_url}" "${JSON_INSTALL_PATH}" "${JSON_VERSION}"
touch "${JSON_INSTALL_PATH}"/.is_installed
}

build_json() {
return 0
}

install_json() {
return 0
}

is_installed_json() {
(
setup_build_variables_json
[[ -f "${JSON_INSTALL_PATH}"/.is_installed ]]
) || return 1
}

get_build_artifacts_json() {
(
setup_build_variables_json
echo "${JSON_INSTALL_PATH}"
)
}

setup_artifact_variables_json() {
setup_build_variables_json
}

get_docker_config_id_json() {
(
setup_build_variables_json
echo "${JSON_VERSION}"
)
}
4 changes: 3 additions & 1 deletion scripts/build/p-klee.inc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ build_klee() {
local CMAKE_ARGUMENTS=(
"-DLLVM_DIR=${LLVM_INSTALL}"
"-DGTEST_SRC_DIR=${GTEST_INSTALL_PATH}"
"-DJSON_SRC_DIR=${JSON_INSTALL_PATH}"
"-DOPTIONAL_SRC_DIR=${OPTIONAL_INSTALL_PATH}"
"-DENABLE_UNIT_TESTS=TRUE"
"-DENABLE_SYSTEM_TESTS=TRUE"
"-DENABLE_DOXYGEN=${ENABLE_DOXYGEN}"
Expand Down Expand Up @@ -254,4 +256,4 @@ is_installed_klee() {

setup_artifact_variables_klee() {
setup_build_variables_klee
}
}
15 changes: 15 additions & 0 deletions scripts/build/p-optional-linux-ubuntu.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
install_build_dependencies_optional() {
source "${DIR}/common-functions"
with_sudo apt update -y

dependencies=(
ca-certificates
wget
unzip
git
)

#Install essential dependencies
with_sudo apt -y --no-install-recommends install "${dependencies[@]}"
}
6 changes: 6 additions & 0 deletions scripts/build/p-optional-osx.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
install_build_dependencies_optional() {
# Install essential dependency
# Ignore if already installed
brew install wget || /usr/bin/true
}
46 changes: 46 additions & 0 deletions scripts/build/p-optional.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/env bash
setup_build_variables_optional() {
OPTIONAL_INSTALL_PATH="${BASE}/optional-${OPTIONAL_VERSION}"
optional_url="https://github.com/martinmoene/optional-lite.git"
return 0
}

download_optional() {
source "${DIR}/common-functions"
# Download optional
git_clone_or_update "${optional_url}" "${OPTIONAL_INSTALL_PATH}" "${OPTIONAL_VERSION}"
touch "${OPTIONAL_INSTALL_PATH}"/.is_installed
}

build_optional() {
return 0
}

install_optional() {
return 0
}

is_installed_optional() {
(
setup_build_variables_optional
[[ -f "${OPTIONAL_INSTALL_PATH}"/.is_installed ]]
) || return 1
}

get_build_artifacts_optional() {
(
setup_build_variables_optional
echo "${OPTIONAL_INSTALL_PATH}"
)
}

setup_artifact_variables_optional() {
setup_build_variables_optional
}

get_docker_config_id_optional() {
(
setup_build_variables_optional
echo "${OPTIONAL_VERSION}"
)
}
10 changes: 10 additions & 0 deletions scripts/build/v-json.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
# shellcheck disable=SC2034

# Build information for json
required_variables_json=(
"JSON_VERSION"
)

# Artifacts json depends on
artifact_dependency_json=("")
4 changes: 2 additions & 2 deletions scripts/build/v-klee.inc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ required_variables_check_klee() {

# On which artifacts does KLEE depend on
artifact_dependency_klee(){
local dependencies=("llvm" "solvers" "gtest" "sqlite" "cmake")
local dependencies=("llvm" "solvers" "gtest" "sqlite" "cmake" "json" "optional")
if [[ "${OS}" != "osx" ]]; then
dependencies+=(uclibc)
fi
Expand All @@ -34,7 +34,7 @@ runtime_artifact_dependency_klee(){
if [[ "${OS}" != "osx" ]]; then
echo "uclibc"
fi
dependencies+=("llvm" "solvers" "gtest" "sqlite")
dependencies+=("llvm" "solvers" "gtest" "sqlite" "json" "optional")

[[ "${USE_TCMALLOC:-}" -eq 1 ]] && dependencies+=("tcmalloc")
[[ "${USE_LIBCXX:-}" -eq 1 ]] && dependencies+=("libcxx")
Expand Down
10 changes: 10 additions & 0 deletions scripts/build/v-optional.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
# shellcheck disable=SC2034

# Build information for optional
required_variables_optional=(
"OPTIONAL_VERSION"
)

# Artifacts optional depends on
artifact_dependency_optional=("")