source: CIVL/grammar/Command.g4@ 7acd15d

1.23 2.0 main test-branch
Last change on this file since 7acd15d was e7597e1, checked in by Manchun Zheng <zmanchun@…>, 10 years ago

got rid of pthreadOnly option; cleaned up SVCOMP tests accordingly

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

  • Property mode set to 100644
File size: 3.1 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 | '-deadlock'
122 | '-debug'
123 | '-enablePrintf'
124 | '-errorBound'
125 | '-errorStateEquiv'
126 | '-gui'
127 | '-guided'
128 | '-id'
129 | '-maxdepth'
130 | '-min'
131 | '-mpiContract'
132 | '-ompNoSimplify'
133 | '-ompLoopDecomp'
134 | '-preproc'
135 | '-procBound'
136 | '-quiet'
137 | '-random'
138 | '-saveStates'
139 | '-seed'
140 | '-showMemoryUnits'
141 | '-showAmpleSet'
142 | '-showAmpleSetWtStates'
143 | '-showInputs'
144 | '-showMemoryUnits'
145 | '-showModel'
146 | '-showPathCondition'
147 | '-showProgram'
148 | '-showProverQueries'
149 | '-showQueries'
150 | '-showSavedStates'
151 | '-showStates'
152 | '-showTime'
153 | '-showTransitions'
154 | '-showUnreached'
155 | '-simplify'
156 | '-solve'
157 | '-statelessPrintf'
158 | '-strict'
159 | '-svcomp16'
160 | '-sysIncludePath'
161 | '-timeout'
162 | '-trace'
163 | '-userIncludePath'
164 | '-verbose'
165 | '-web'
166 ;
167
168VAR
169 :
170 [_a-zA-Z] [_a-zA-Z0-9]*
171 ;
172
173PATH
174 :
175 ([_a-zA-Z0-9\.\/])([_:a-zA-Z0-9\-\.\/])*
176 ;
177
178NEWLINE
179 : '\r'? '\n'
180 ;
181
182STRING
183 : '"' ~[ =\-\r\n\t]+ '"';
184
185WS
186 : [ \t]+ -> skip
187 ;
Note: See TracBrowser for help on using the repository browser.