source: CIVL/mods/dev.civl.mc/grammar/Command.g4@ bb03188

main test-branch
Last change on this file since bb03188 was 4ab4ebf, checked in by Alex Wilton <awilton@…>, 16 months ago

Added first iteration of a DPOR algorithm to CIVL

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

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