Skip to content

Commit

Permalink
Reverted theta-start.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi committed Nov 14, 2024
1 parent 9e542df commit 18c1e7a
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions scripts/theta-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,6 @@ grep -o "openjdk $JAVA_VERSION" <<< "$(java --version)" >/dev/null || {
exit 1
}


determine_memlimit() {
cgroup_file="/proc/self/cgroup"
if [[ -f "$cgroup_file" ]]; then
memory_cgroup=$(grep memory "$cgroup_file" | cut -d: -f3)
if [[ ! -z "$memory_cgroup" ]]; then
memory_limit_file="/sys/fs/cgroup/memory${memory_cgroup}/memory.limit_in_bytes"
if [[ -f "$memory_limit_file" ]]; then
cat "$memory_limit_file"
return 0
fi
fi
fi
echo 0
}

remove_property() {
local args=()
local skip=0
Expand All @@ -50,7 +34,7 @@ remove_property() {
}

if [ "$1" == "--version" ]; then
LD_LIBRARY_PATH=$scriptdir/lib java -jar "$scriptdir"/theta.jar --version
LD_LIBRARY_PATH=$scriptdir/lib java -Xss120m -Xmx14210m -jar "$scriptdir"/theta.jar --version
else
modified_args=$(remove_property "${@:2}")
property=$(cat .property && rm .property)
Expand All @@ -72,8 +56,8 @@ else
transformed_property="$property"
fi

echo LD_LIBRARY_PATH="$scriptdir"/lib java -Xss120m -Xmx14210m -jar "$scriptdir"/theta.jar $modified_args --input "$IN" --property "$transformed_property" --smt-home "$scriptdir"/solvers --memlimit "$(determine_memlimit)"
LD_LIBRARY_PATH="$scriptdir"/lib java -Xss120m -Xmx14210m -jar "$scriptdir"/theta.jar $modified_args --input "$IN" --property "$transformed_property" --smt-home "$scriptdir"/solvers --memlimit "$(determine_memlimit)"
echo LD_LIBRARY_PATH="$scriptdir"/lib java -Xss120m -Xmx14210m -jar "$scriptdir"/theta.jar $modified_args --input "$IN" --property "$transformed_property" --smt-home "$scriptdir"/solvers
LD_LIBRARY_PATH="$scriptdir"/lib java -Xss120m -Xmx14210m -jar "$scriptdir"/theta.jar $modified_args --input "$IN" --property "$transformed_property" --smt-home "$scriptdir"/solvers

if [ "$(basename "$property")" == "termination.prp" ]; then
echo "Not yet mapping witnesses from '$transformed_property' to '$property', hoping for the best"
Expand Down

0 comments on commit 18c1e7a

Please sign in to comment.