source: CIVL/grammar/Command.g4@ d2e6cf6

1.23 2.0 main test-branch
Last change on this file since d2e6cf6 was c674c46, checked in by Ziqing Luo <ziqing@…>, 8 years ago

Add -loop option for loop invariants settings

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@4751 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 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 | '-loop'
133 | '-maxdepth'
134 | '-min'
135 | '-mpiContract'
136 | '-ompNoSimplify'
137 | '-ompLoopDecomp'
138 | '-preproc'
139 | '-procBound'
140 | '-prob'
141 | '-maxProcs'
142 | '-quiet'
143 | '-intOperationTransformer'
144 | '-random'
145 | '-saveStates'
146 | '-seed'
147 | '-showMemoryUnits'
148 | '-showAmpleSet'
149 | '-showAmpleSetWtStates'
150 | '-showInputs'
151 | '-showMemoryUnits'
152 | '-showModel'
153 | '-showPathCondition'
154 | '-showProgram'
155 | '-showProverQueries'
156 | '-showQueries'
157 | '-showSavedStates'
158 | '-showStates'
159 | '-showTime'
160 | '-showTransitions'
161 | '-showUnreached'
162 | '-simplify'
163 | '-sliceAnalysis'
164 | '-solve'
165 | '-statelessPrintf'
166 | '-strict'
167 | '-svcomp16'
168 | '-svcomp17'
169 | '-sysIncludePath'
170 | '-timeout'
171 | '-trace'
172 | '-unpreproc'
173 | '-userIncludePath'
174 | '-verbose'
175 | '-web'
176 | '-witness'
177 ;
178
179VAR
180 :
181 [_a-zA-Z] [_a-zA-Z0-9]*
182 ;
183
184PATH
185 :
186 ([_a-zA-Z0-9\.\/])([_:a-zA-Z0-9\-\.\/])*
187 ;
188
189NEWLINE
190 : '\r'? '\n'
191 ;
192
193STRING
194 : '"' ~[ =\-\r\n\t]+ '"';
195
196WS
197 : [ \t]+ -> skip
198 ;
Note: See TracBrowser for help on using the repository browser.