Skip to content

Commit

Permalink
Finalized merge after chc-related code
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi committed Jul 7, 2023
2 parents d766661 + fe7cf15 commit a0cae79
Show file tree
Hide file tree
Showing 19 changed files with 1,878 additions and 21 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildscript {

allprojects {
group = "hu.bme.mit.theta"
version = "4.2.5"
version = "4.3.0"

apply(from = rootDir.resolve("gradle/shared-with-buildSrc/mirrors.gradle.kts"))
}
Expand Down
33 changes: 33 additions & 0 deletions scripts/starexec_run_default.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
scriptdir=$(dirname $(realpath "$0"))

JAVA_FALLBACK_PATH="/usr/lib/jvm/java-17/bin/java"
JAVA=$(java --version 2>&1 | grep "openjdk 17" >/dev/null && echo "java" || echo $JAVA_FALLBACK_PATH)
$JAVA --version >/dev/null || exit

input="$1"
output="$2/$(basename $1 smt2)out"

configurations=("--domain PRED_SPLIT --refinement BW_BIN_ITP --predsplit WHOLE"
"--domain PRED_CART --refinement BW_BIN_ITP --predsplit WHOLE"
"--domain EXPL --refinement SEQ_ITP")

SECONDS=0

for i in ${!configurations[@]}; do
flags=${configurations[$i]}
remaining=$(((1800-$SECONDS)/(3-i)))
echo "Running config ($i) for $remaining seconds..." >> "$output"
echo LD_LIBRARY_PATH=$scriptdir/../lib $JAVA -Xss120m -Xmx28G -Dfile.encoding=UTF-8 -jar $scriptdir/../theta.jar --chc --input $1 $flags --maxenum 1 --initprec EMPTY --smt-home $scriptdir/../solvers --loglevel RESULT >> "$output"
result=$(LD_LIBRARY_PATH=$scriptdir/../lib timeout $remaining $JAVA -Xss120m -Xmx28G -Dfile.encoding=UTF-8 -jar $scriptdir/../theta.jar --chc --input $1 $flags --maxenum 1 --initprec EMPTY --smt-home $scriptdir/../solvers --loglevel RESULT 2>&1 | tee -a "$output" | grep SafetyResult)

if [[ $result == *"Unsafe"* ]]; then
echo "unsat"
exit
elif [[ $result == *"Safe"* ]]; then
echo "sat"
exit
fi
done

echo "unknown"
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ include(
"common/grammar",

"frontends/c-frontend",
"frontends/chc-frontend",

"cfa/cfa",
"cfa/cfa-analysis",
Expand Down
11 changes: 11 additions & 0 deletions subprojects/frontends/chc-frontend/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
plugins {
id("java-common")
id("antlr-grammar")
}

dependencies {
implementation(project(":theta-core"))
implementation(project(":theta-common"))
implementation(project(":theta-xcfa"))
implementation(project(":theta-solver-smtlib"))
}
Loading

0 comments on commit a0cae79

Please sign in to comment.