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

Bitwuzla update to 0.2.0-dev #135

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
20 changes: 10 additions & 10 deletions ksmt-bitwuzla/bindings-native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@ PROJECT(bitwuzla_jni)
FIND_PACKAGE(JNI REQUIRED)

SET(CXX_STANDARD 17)
SET(BITWUZLA_ROOT "${PROJECT_SOURCE_DIR}/bitwuzla")

# Path to bitwuzla.h
SET(BITWUZLA_INCLUDE "${PROJECT_SOURCE_DIR}/bitwuzla/include")
# Path to bitwuzla.h, enums.h, option.h
SET(BITWUZLA_INCLUDE "${BITWUZLA_ROOT}/include")

# Path to Bitwuzla sources root (required for extensions)
SET(BITWUZLA_SRC_ROOT "${PROJECT_SOURCE_DIR}/bitwuzla/src")
# Path to bitwuzla library (libbitwuzla.so)
SET(BITWUZLA_LIB "${BITWUZLA_ROOT}/build/src/${CMAKE_SHARED_LIBRARY_PREFIX}bitwuzla${CMAKE_SHARED_LIBRARY_SUFFIX}")

# Path to bitwuzla library (libbitwuzla.so)
SET(BITWUZLA_LIB "${PROJECT_SOURCE_DIR}/bitwuzla/lib/${CMAKE_SHARED_LIBRARY_PREFIX}bitwuzla${CMAKE_SHARED_LIBRARY_SUFFIX}")
ADD_LIBRARY (bitwuzla_jni SHARED bitwuzla_jni.cpp bitwuzla_extension.cpp)

ADD_LIBRARY (bitwuzla_jni SHARED bitwuzla_jni.cpp bitwuzla_extension.c)
message(${BITWUZLA_INCLUDE})

TARGET_INCLUDE_DIRECTORIES(bitwuzla_jni PRIVATE ${JNI_INCLUDE_DIRS})
TARGET_INCLUDE_DIRECTORIES(bitwuzla_jni PRIVATE "./include"})
TARGET_INCLUDE_DIRECTORIES(bitwuzla_jni PRIVATE ${BITWUZLA_INCLUDE})

SET(BITWUZLA_SRC_INCLUDE "${BITWUZLA_SRC_ROOT}/bitwuzla/src")
TARGET_INCLUDE_DIRECTORIES(bitwuzla_jni PRIVATE ${BITWUZLA_SRC_INCLUDE})

SET(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)

# For Windows build, comment the first line, and uncomment the second one (link statically with libstdc++, ligbcc, lpthreads)
TARGET_LINK_LIBRARIES(bitwuzla_jni PRIVATE ${BITWUZLA_LIB})
#TARGET_LINK_LIBRARIES(bitwuzla_jni PRIVATE ${BITWUZLA_LIB} -static-libstdc++ -static-libgcc -Wl,-Bstatic -lstdc++ -lpthread -Wl,-Bdynamic)
56 changes: 0 additions & 56 deletions ksmt-bitwuzla/bindings-native/bitwuzla_extension.c

This file was deleted.

27 changes: 27 additions & 0 deletions ksmt-bitwuzla/bindings-native/bitwuzla_extension.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include "bitwuzla/c/bitwuzla.h"
#include <bitwuzla_extension.hpp>


#if __cplusplus
extern "C" {
#endif

void bitwuzla_extension_sort_dec_ref(BitwuzlaSort sort_id) {
bitwuzla_sort_dec_ref(sort_id);
}

void bitwuzla_extension_term_dec_ref(BitwuzlaTerm term_id) {
bitwuzla_term_dec_ref(term_id);
}

uint64_t bitwuzla_extension_bv_value_uint64(BitwuzlaTerm term) {
return bitwuzla_bv_value_uint64(term);
}

const char *bitwuzla_extension_bv_value_str(BitwuzlaTerm term, uint32_t base) {
return bitwuzla_bv_value_str(term, base);
}

#if __cplusplus
}
#endif
51 changes: 0 additions & 51 deletions ksmt-bitwuzla/bindings-native/bitwuzla_extension.h

This file was deleted.

Loading