diff --git a/README.md b/README.md new file mode 100644 index 0000000..69f478e --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# JavaBoolector + +JavaBoolector allows you to call [Boolector](https://github.com/boolector/boolector) from Java + +## Build + +Build jar with all the dependencies: + +```shell +$ mvn clean package +``` + +## Adding new bindings + + 1) Add your native method to the Native class + + 2) Generate JavaBoolector.h: +```shell +$ cd JavaBoolector/java +$ ./gen_native_h.sh +``` + 3) And implement your method in JavaBoolector.c diff --git a/java/gen_native_h.sh b/java/gen_native_h.sh new file mode 100755 index 0000000..9747728 --- /dev/null +++ b/java/gen_native_h.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +java=$(pwd) +c=$java/../c +javac -h $c $java/src/main/java/org/jetbrains/research/boolector/Native.java +native=$c/org_jetbrains_research_boolector_Native.h + +if [ -f $native ] +then + mv $native $c/JavaBoolector.h +else + echo "Header not generated" +fi