~verifypn-cpn/verifypn/dynamicExport

« back to all changes in this revision

Viewing changes to Scripts/MCC15/classicMC.sh

  • Committer: Jiri Srba
  • Date: 2015-04-22 13:40:30 UTC
  • mto: This revision was merged to the branch mainline in revision 56.
  • Revision ID: srba@cs.aau.dk-20150422134030-lc7iih8449c5711q
added MCC15 scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
# This is the initialization script for the participation of TAPAAL
 
4
# untimed engine verifypn in the Petri net competition 2014.
 
5
 
 
6
# BK_EXAMINATION: it is a string that identifies your "examination"
 
7
 
 
8
export PATH="$PATH:/home/mcc/BenchKit/bin/"
 
9
#VERIFYPN=$HOME/BenchKit/bin/verifypn
 
10
VERIFYPN=/Users/srba/dev/MCC-15/Testing/verifypn
 
11
TIMEOUT=10
 
12
 
 
13
if [ ! -f iscolored ]; then
 
14
        echo "File 'iscolored' not found!"
 
15
else
 
16
        if [ "TRUE" = `cat iscolored` ]; then
 
17
                echo "TAPAAL does not support colored nets."
 
18
                echo "DO_NOT_COMPETE" 
 
19
                exit 0
 
20
        fi
 
21
fi
 
22
 
 
23
if [ ! -f model.pnml ]; then
 
24
        echo "File 'model.pnml' not found!"
 
25
        exit 1
 
26
fi
 
27
 
 
28
function verify {
 
29
        if [ ! -f $2 ]; then
 
30
                echo "File '$2' not found!" 
 
31
                exit 1 
 
32
        fi
 
33
        local NUMBER=`cat $2 | grep "<property>" | wc -l`
 
34
 
 
35
        seq 1 $NUMBER | 
 
36
        parallel --will-cite -j2 -- "gtimeout $TIMEOUT $VERIFYPN $1 "-x" {} "model.pnml" $2 ; RETVAL=\$? ;\
 
37
                if [ \$RETVAL = 124 ] || [ \$RETVAL =  125 ] || [ \$RETVAL =  126 ] || [ \$RETVAL =  127 ] || [ \$RETVAL =  137 ] ; then echo -ne \"CANNOT_COMPUTE\n\"; fi"
 
38
 
39
 
 
40
 
 
41
case "$BK_EXAMINATION" in
 
42
 
 
43
        StateSpace)
 
44
                echo            
 
45
                echo "*****************************************"
 
46
                echo "*  TAPAAL performing StateSpace search  *"
 
47
                echo "*****************************************"
 
48
                gtimeout $TIMEOUT $VERIFYPN -n -d -e model.pnml 
 
49
                ;;
 
50
 
 
51
        ReachabilityComputeBounds)      
 
52
                echo            
 
53
                echo "***********************************************"
 
54
                echo "*  TAPAAL verifying ReachabilityComputeBounds *"
 
55
                echo "***********************************************"
 
56
                verify "-n -r 1" "ReachabilityComputeBounds.xml"
 
57
                ;;
 
58
 
 
59
        ReachabilityDeadlock)
 
60
                echo            
 
61
                echo "**********************************************"
 
62
                echo "*  TAPAAL checking for ReachabilityDeadlock  *"
 
63
                echo "**********************************************"
 
64
                TIMEOUT=10
 
65
                verify "-n -r 1" "ReachabilityDeadlock.xml"
 
66
                ;;
 
67
 
 
68
        ReachabilityCardinality)
 
69
                echo            
 
70
                echo "**********************************************"
 
71
                echo "*  TAPAAL verifying ReachabilityCardinality  *"
 
72
                echo "**********************************************"
 
73
                verify "-n -r 1" "ReachabilityCardinality.xml"
 
74
                ;;
 
75
 
 
76
        ReachabilityFireability)
 
77
                echo            
 
78
                echo "**********************************************"
 
79
                echo "*  TAPAAL verifying ReachabilityFireability  *"
 
80
                echo "**********************************************"
 
81
                verify "-n -r 1" "ReachabilityFireability.xml"
 
82
                ;;
 
83
 
 
84
        ReachabilityFireabilitySimple)
 
85
                echo
 
86
                echo "****************************************************"
 
87
                echo "*  TAPAAL verifying ReachabilityFireabilitySimple  *"
 
88
                echo "****************************************************"
 
89
                verify "-n -r 1" "ReachabilityFireabilitySimple.xml"
 
90
                ;;
 
91
 
 
92
        *)
 
93
                echo "DO_NOT_COMPETE"   
 
94
                exit 0
 
95
                ;;
 
96
esac