-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finalized merge after chc-related code
- Loading branch information
Showing
19 changed files
with
1,878 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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")) | ||
} |
Oops, something went wrong.