-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathseq_synth_conf1.sh
executable file
·27 lines (27 loc) · 1022 Bytes
/
seq_synth_conf1.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
#!/bin/bash
DIR=`dirname $0`/
TRANSLATED=${DIR}temp/
mkdir -p ${TRANSLATED}
# $1 contains the input filename (the name of the TLSF-file).
# we need to call syfco to create the ltl and part files for acacia
INPUT_FILE=$1
BASE_FILE=$(basename $INPUT_FILE)
BASE_FILE_NOEXT="${BASE_FILE%.*}"
COMMAND="${DIR}binary/syfco -f acacia-specs -o ${TRANSLATED}${BASE_FILE}.ltl -pf ${TRANSLATED}${BASE_FILE}.part ${INPUT_FILE}"
$COMMAND
# we can now feed the files to acacia and determine if it is realizable or not
COMMAND="python ${DIR}binary/acacia_plus.py --ltl ${TRANSLATED}${BASE_FILE} --part ${TRANSLATED}${BASE_FILE}.part --player 1 --check REAL --syn COMP --nbw COMP --v 0 --kbound 5000 --kstep 1"
$COMMAND
res=$?
if [[ $res == 10 ]]; then
#echo "REALIZABLE"
COMMAND="${DIR}binary/acacia2aig.native ${TRANSLATED}${BASE_FILE_NOEXT}.txt"
$COMMAND
elif [[ $res == 20 ]]; then
echo "UNREALIZABLE"
elif [[ $res == 15 ]]; then
echo "Acacia does not know :("
else
echo "Strange exit code ${res}"
fi
exit $res