#!/bin/bash set -e SCRIPT_DIR=$(cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd) cc="gcc-13" if [ "$#" -ne 4 ]; then echo "$0: [ltl-prop] [n] [length] [r]" > /dev/stderr exit 1 fi id="${1}_${2}_${3}_${4}" filename="reversal_$id.pml" pan_name="pan_$id" compile_dir="$(mktemp -d)" cp "$SCRIPT_DIR/reversal.pml.m4" "$compile_dir" cd "$compile_dir" echo "Compiling in: $compile_dir" m4 -DN="$2" -DLENGTH="$3" -DR="$4" -DLTL="$1" reversal.pml.m4 > "$filename" spin -a "$filename" "$cc" -Wno-format-overflow -o "$pan_name" pan.c "./$pan_name" -a -N "$1" cd "$SCRIPT_DIR" rm -rf "$compile_dir"