This repository has been archived on 2023-06-18. You can view files and clone it, but cannot push or open issues or pull requests.
soft-an04/ReversalModel/verify.sh

28 lines
525 B
Bash
Raw Normal View History

2023-05-08 12:15:13 +00:00
#!/bin/bash
2023-05-08 17:10:41 +00:00
set -e
SCRIPT_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)
2023-05-08 12:15:13 +00:00
if [ $# -ne 1 ]; then
echo "LTL property name required" > /dev/stderr
exit 1
else
userid="$1"
fi
set -e
2023-05-08 17:10:41 +00:00
m4 -I"$SCRIPT_DIR" reversal.pml.m4 > reversal.pml
2023-05-08 12:15:13 +00:00
spin -a reversal.pml
2023-05-08 13:22:41 +00:00
gcc-13 -Wno-format-overflow -DPRINTF -o pan pan.c
2023-05-08 14:15:17 +00:00
./pan -a -N "$1"
2023-05-08 12:15:13 +00:00
exitcode="$?"
if [ "$exitcode" -ne 0 ]; then
echo "Terminated with status: $exitcode" > /dev/stderr
exit "$exitcode"
else
echo "Terminated successfully"
fi