-
Notifications
You must be signed in to change notification settings - Fork 0
/
check.sh
executable file
·31 lines (28 loc) · 1.23 KB
/
check.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# Script to invoke Apalache
# For induction checks, the convention is that the provided invariant, e.g. "Inv", is checked inductive relative to "Inv_" (that's the name of the invariant with an underscore at the end).
set -ex
case "$1" in
-typecheck)
shift
FILE="Apa${1}.tla"
$APA/bin/apalache-mc typecheck $FILE
;;
-inductive)
shift
FILE="Apa${2}.tla"
$APA/bin/apalache-mc check --init=Init --inv=$1 --length=0 $FILE
JVM_ARGS="-Xmx25G" $APA/bin/apalache-mc check --tuning-options=search.invariant.mode=after:"search.invariantFilter=1->.*:smt.randomSeed=${RANDOM}" --init=$1 --inv=$1 --length=1 $FILE
;;
-implication)
shift
FILE="Apa${3}.tla"
JVM_ARGS="-Xmx25G" $APA/bin/apalache-mc check --tuning-options=search.invariant.mode=after --init=$1 --inv=$2 --length=0 $FILE
;;
-relative)
shift
FILE="Apa${3}.tla"
JVM_ARGS="-Xmx25G" $APA/bin/apalache-mc check --init=Init --inv=$2 --length=0 $FILE
JVM_ARGS="-Xmx25G" $APA/bin/apalache-mc check --tuning-options=search.invariant.mode=after:"search.invariantFilter=1->.*:smt.randomSeed=${RANDOM}" --init=$1 --inv=$2 --length=1 $FILE
;;
esac