source: CIVL/grammar/Command.g4@ be334f1

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since be334f1 was 9a8af54, checked in by Ziqing Luo <ziqing@…>, 9 years ago

Temporarily fixed the Util.difference method, but the method itself doesn't really make sense. Computing the difference of two sets is not very efficient.

Add equals method for statement implementations

merge Yihao's branch for add an option to disable intDIv

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@4065 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 3.2 KB
Line 
1/**
2* This file defines the syntax of CIVL's command line specification.
3* There are totally 8 commands, namely, config, compare, gui, help,
4* replay, run, show, and verify.
5* There are a number of options to be chosen as well.
6*
7* The usage of the commands are as follows:
8* civl config
9* civl compare [option]* -spec [option]* file+ -impl [option]* file+
10* civl gui (no options needed)
11* civl help [command]
12* civl replay [option]* file+ (replay for one program)
13* civl replay [option]* -spec [option]* file+ -impl [option]* file+
14* (replay for the comparison of two programs.)
15* civl run [option]* file+
16* civl show [option]* file+
17* civl verify [option]* file+
18*/
19grammar Command;
20
21/* The top-level rule */
22start
23 :
24 'help' (REPLAY | COMMAND | 'help' | 'config' | 'compare')? NEWLINE # help
25 | 'compare' commonOption? specAndImplCommand NEWLINE #compare
26 | (REPLAY | COMMAND) commandBody NEWLINE #normal
27 | 'config' NEWLINE #config
28 | REPLAY commonOption? specAndImplCommand NEWLINE #replayCompare
29 ;
30
31specAndImplCommand
32 : specCommand implCommand
33 | implCommand specCommand
34 ;
35
36commonOption
37 :
38 option+
39 ;
40
41specCommand
42 :
43 SPEC commandBody
44 ;
45
46implCommand
47 :
48 IMPL commandBody
49 ;
50
51commandBody
52 :
53 option* file+
54 ;
55
56option
57 :
58 OPTION_NAME ('=' value )? # normalOption
59 | INPUT VAR '=' value # inputOption
60 | MACRO VAR ('=' value)? # macroOption
61 ;
62
63file
64 :
65 PATH
66 ;
67
68value
69 : BOOLEAN
70 | VAR
71 | NUMBER
72 | PATH
73 | STRING
74 ;
75
76BOOLEAN
77 : 'true' | 'false'
78 ;
79
80NUMBER
81 :
82 [\-\+]?[0-9]+
83 ;
84
85SPEC
86 :'-spec'
87 ;
88
89IMPL
90 :'-impl'
91 ;
92
93INPUT
94 : '-input'
95 ;
96
97MACRO
98 : '-D'
99 ;
100
101COMMAND:
102 'verify' | 'run' | 'show' | 'gui'
103 ;
104
105REPLAY
106 :
107 'replay'
108 ;
109
110OPTION_NAME
111 :
112 '-_CIVL'
113 | '-checkDivisionByZero'
114 | '-analyze_abs'
115 | '-ast'
116 | '-checkMemoryLeak'
117 | '-collectHeaps'
118 | '-collectOutput'
119 | '-collectProcesses'
120 | '-collectScopes'
121 | '-collectSymbolicConstants'
122 | '-deadlock'
123 | '-debug'
124 | '-enablePrintf'
125 | '-errorBound'
126 | '-errorStateEquiv'
127 | '-gui'
128 | '-guided'
129 | '-id'
130 | '-int_bit'
131 | '-direct'
132 | '-maxdepth'
133 | '-min'
134 | '-mpiContract'
135 | '-ompNoSimplify'
136 | '-ompLoopDecomp'
137 | '-preproc'
138 | '-procBound'
139 | '-quiet'
140 | '-intOperationTransformer'
141 | '-random'
142 | '-saveStates'
143 | '-seed'
144 | '-showMemoryUnits'
145 | '-showAmpleSet'
146 | '-showAmpleSetWtStates'
147 | '-showInputs'
148 | '-showMemoryUnits'
149 | '-showModel'
150 | '-showPathCondition'
151 | '-showProgram'
152 | '-showProverQueries'
153 | '-showQueries'
154 | '-showSavedStates'
155 | '-showStates'
156 | '-showTime'
157 | '-showTransitions'
158 | '-showUnreached'
159 | '-simplify'
160 | '-sliceAnalysis'
161 | '-solve'
162 | '-statelessPrintf'
163 | '-strict'
164 | '-svcomp16'
165 | '-svcomp17'
166 | '-sysIncludePath'
167 | '-timeout'
168 | '-trace'
169 | '-unpreproc'
170 | '-userIncludePath'
171 | '-verbose'
172 | '-web'
173 | '-witness'
174 ;
175
176VAR
177 :
178 [_a-zA-Z] [_a-zA-Z0-9]*
179 ;
180
181PATH
182 :
183 ([_a-zA-Z0-9\.\/])([_:a-zA-Z0-9\-\.\/])*
184 ;
185
186NEWLINE
187 : '\r'? '\n'
188 ;
189
190STRING
191 : '"' ~[ =\-\r\n\t]+ '"';
192
193WS
194 : [ \t]+ -> skip
195 ;
Note: See TracBrowser for help on using the repository browser.