source: CIVL/grammar/Command.g4@ cc8e265

1.23 2.0 main test-branch
Last change on this file since cc8e265 was d36c595, checked in by Stephen Siegel <siegel@…>, 5 years ago

the .project changed again for unknown reasons. Added missing option to the CommandLine grammar.

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

  • Property mode set to 100644
File size: 3.3 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 | '-checkDivisionByZero'
113 | '-analyze_abs'
114 | '-ast'
115 | '-checkMemoryLeak'
116 | '-collectHeaps'
117 | '-collectOutput'
118 | '-collectProcesses'
119 | '-collectScopes'
120 | '-collectSymbolicConstants'
121 | '-cyclesViolate'
122 | '-deadlock'
123 | '-debug'
124 | '-enablePrintf'
125 | '-errorBound'
126 | '-errorStateEquiv'
127 | '-guided'
128 | '-id'
129 | '-int_bit'
130 | '-direct'
131 | '-loop'
132 | '-maxdepth'
133 | '-min'
134 | '-mpiContract'
135 | '-ompNoSimplify'
136 | '-ompOnlySimplifier'
137 | '-ompLoopDecomp'
138 | '-preemptionBound'
139 | '-preproc'
140 | '-procBound'
141 | '-prob'
142 | '-maxProcs'
143 | '-quiet'
144 | '-intOperationTransformer'
145 | '-random'
146 | '-runtimeUpdate'
147 | '-saveStates'
148 | '-seed'
149 | '-showMemoryUnits'
150 | '-showAmpleSet'
151 | '-showAmpleSetWtStates'
152 | '-showInputs'
153 | '-showMemoryUnits'
154 | '-showModel'
155 | '-showPathCondition'
156 | '-showProgram'
157 | '-showProverQueries'
158 | '-showQueries'
159 | '-showSavedStates'
160 | '-showStates'
161 | '-showTime'
162 | '-showTransitions'
163 | '-showUnreached'
164 | '-simplify'
165 | '-sliceAnalysis'
166 | '-solve'
167 | '-statelessPrintf'
168 | '-strict'
169 | '-svcomp16'
170 | '-svcomp17'
171 | '-sysIncludePath'
172 | '-timeout'
173 | '-testGen'
174 | '-trace'
175 | '-unpreproc'
176 | '-userIncludePath'
177 | '-verbose'
178 | '-web'
179 | '-witness'
180 ;
181
182VAR
183 :
184 [_a-zA-Z] [_a-zA-Z0-9]*
185 ;
186
187PATH
188 :
189 ([_a-zA-Z0-9\.\/])([_:a-zA-Z0-9\-\.\/])*
190 ;
191
192NEWLINE
193 : '\r'? '\n'
194 ;
195
196STRING
197 : '"' ~[ =\-\r\n\t]+ '"';
198
199WS
200 : [ \t]+ -> skip
201 ;
Note: See TracBrowser for help on using the repository browser.