source: caseStudy_Huffmann/huffmann/huff_original/script_grade.sh

Last change on this file was 105, checked in by cecile, 12 years ago

Hufmann case study

  • Property svn:executable set to *
File size: 4.2 KB
Line 
1#!/bin/bash
2#path to the tool
3tool=/dsk/l1/misc/cecile/bin/vis
4
5#parameter 1 : name of the model file
6fichier=$1
7
8# time limit
9ulimit -t 28800
10
11# name of the output file
12result=resultat_grading_xun1
13
14# file containing the register to analyse
15register=register.reg
16# file containing output and register to protect are supposed to be already
17# generated and name :
18#  protect_output.reg , protect_golde.reg
19
20echo " " > $result
21echo "Fichier : $fichier"
22while read line
23do
24        echo "*******************************" >> $result
25        echo ${fichier}.mv >> $result
26        echo "*******************************" >> $result
27        echo "REG = ${line}" 
28        echo "REG = ${line}" >> $result 
29        echo "*******************************" >> $result
30
31        cat protect_output.reg > protect_grade_rob4.reg
32        echo $line >>  protect_grade_rob4.reg
33        cat protect_golden.reg > protect_grade_rob3.reg
34        for out in $(cat protect_output.reg)
35        do
36                echo "faulty.$out" >> protect_grade_rob3.reg
37        done
38    for m in $line
39    do
40          echo "faulty.$m" >>  protect_grade_rob3.reg
41    done
42     
43        echo read_blif_mv ${fichier}.mv > vis_rob_script1
44        echo "init_verify" >> vis_rob_script1
45        echo "dynamic_var_ordering -f sift" >> vis_rob_script1
46
47    #ROB 4
48    cat vis_rob_script1 > vis_rob_usut
49        echo "echo Class USUT ROB4  ${line}" >> vis_rob_usut
50        echo "set_init -v 1 -m usut -g  protect_grade_rob4.reg" >> vis_rob_usut
51        echo "robustness -v 1" >> vis_rob_usut
52    echo "quit -s" >> vis_rob_usut
53    $tool < vis_rob_usut >> $result
54#       echo "echo Class USMT ROB4 ${line}" >> vis_rob_script1
55#       echo "set_init -v 1 -m usmt -g  protect_grade_rob4.reg" >> vis_rob_script1
56#       echo "robustness -v 1" >> vis_rob_script1
57
58    cat vis_rob_script1 > vis_rob_usmt
59        echo "echo  Class MSUT ROB4 ${line}" >> vis_rob_usmt
60        echo "set_init -v 1  -m msut -g  protect_grade_rob4.reg" >> vis_rob_usmt
61        echo "robustness -v 1" >> vis_rob_usmt
62    $tool < vis_rob_usmt >> $result
63
64
65    cat vis_rob_script1 > vis_rob_msmt
66        echo "echo Class MSMT ROB4  ${line}" >> vis_rob_msmt
67        echo "set_init -v 1 -m msmt -g  protect_grade_rob4.reg" >> vis_rob_msmt
68        echo "robustness -v 1" >> vis_rob_msmt
69    $tool < vis_rob_msmt >> $result
70
71    #ROB 3
72        echo "compose_golden" >> vis_rob_script1
73        echo "init_verify" >> vis_rob_script1
74        echo "protect_golden" >> vis_rob_script1
75    cat vis_rob_script1 > vis_rob_usut
76        echo "echo Class  USUT  ROB3 ${line}" >> vis_rob_usut
77        echo "set_init -v 1 -m usut -g protect_grade_rob3.reg" >> vis_rob_usut
78        echo "robustness -v 1" >> vis_rob_usut
79    $tool < vis_rob_usut >> $result
80
81#    cat vis_rob_script1 > vis_rob_usmt
82#       echo "echo Class USMT ROB3 ${line}" >> vis_rob_usmt
83#       echo "set_init -v 1 -m usmt -g protect_grade_rob3.reg" >> vis_rob_usmt
84#       echo "robustness -v 1" >> vis_rob_usmt
85#    $tool < vis_rob_usmt >> $result
86
87    cat vis_rob_script1 > vis_rob_msut
88        echo "echo Class MSUT ROB3 ${line}" >> vis_rob_msut
89        echo "set_init -v 1  -m msut -g protect_grade_rob3.reg " >> vis_rob_msut
90        echo "robustness -v 1" >> vis_rob_msut
91    $tool < vis_rob_msut >> $result
92
93    cat vis_rob_script1 > vis_rob_msmt
94        echo "echo Class MSMT ROB3 ${line}" >> vis_rob_msmt
95        echo "set_init -v 1 -m msmt -g protect_grade_rob3.reg" >> vis_rob_msmt
96        echo "robustness -v 1" >> vis_rob_msmt
97
98    #ROB 1
99    echo "set_safe safe_rob1.ctl" >> vis_rob_script1
100
101    cat vis_rob_script1 > vis_rob_usut
102        echo "echo Class USUT ROB1 ${line}" >> vis_rob_usut
103        echo "set_init -v 1 -m usut -g protect_grade_rob3.reg" >> vis_rob_usut
104        echo "robustness -v 1 -r 1" >> vis_rob_usut
105    $tool < vis_rob_usut >> $result
106
107#    cat vis_rob_script1 > vis_rob_usmt
108#       echo "echo Class USMT ROB1 ${line}" >> vis_rob_usmt
109#       echo "set_init -v 1 -m usmt -g protect_grade_rob3.reg" >> vis_rob_usmt
110#       echo "robustness -v 1 -r 1" >> vis_rob_usmt
111#    $tool < vis_rob_usmt >> $result
112
113    cat vis_rob_script1 > vis_rob_msut
114        echo "echo Class MSUT ROB1 ${line}" >> vis_rob_msut
115        echo "set_init -v 1 -m msut -g protect_grade_rob3.reg" >> vis_rob_msut
116        echo "robustness -v 1 -r 1" >> vis_rob_msut
117    $tool < vis_rob_msut >> $result
118
119    cat vis_rob_script1 > vis_rob_msmt
120        echo "echo Class MSMT ROB1  ${line}" >> vis_rob_msmt
121        echo "set_init -v 1 -m msmt -g protect_grade_rob3.reg" >> vis_rob_msmt
122        echo "robustness -v 1 -r 1" >> vis_rob_msmt
123
124        echo "quit -s" >> vis_rob_msmt
125     ${tool} <vis_rob_msmt >> $result
126       
127done < $register
128
129       
130
131
Note: See TracBrowser for help on using the repository browser.