-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheval_maude.sh
More file actions
executable file
·40 lines (33 loc) · 825 Bytes
/
Copy patheval_maude.sh
File metadata and controls
executable file
·40 lines (33 loc) · 825 Bytes
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
32
33
34
35
36
37
38
39
40
#!/bin/bash
# Compiles the file to Maude code and evaluates it with the Maude model.
# Arguments: <filename> <number of warehouses>
set -e
function usage {
echo "Usage: ./eval_maude.sh [run|search] <file.hs> <number of warehouses>"
exit
}
if [ $# -ne 3 ]
then
usage
else
source find-gic.sh
echo "Using GIC=${GIC}"
cp maude/eduction.maude test.maude
${GIC} -cm $2 -wh $3 >> test.maude
if [ "$1" = "search" ]; then
echo "(search init =>! C:Configuration .)" >> test.maude
echo Starting search in Maude...
else
if [ "$1" = "run" ]; then
echo Rewriting in Maude...
else
usage
fi
fi
(maude maude/full-maude26.maude < test.maude) |
sed -e "s/< /\n < /g" |
sed -e "s/notify/\n notify/g" |
sed -e "s/continue/\n continue/g" |
sed -e "s/demand/\n demand/g" |
sed -e "s/regVal/\n regVal/g"
fi