source: CIVL/grammar/Command.g4@ bd6628e

1.23 2.0 main test-branch
Last change on this file since bd6628e was 1bd5b18, checked in by Ziqing Luo <ziqing@…>, 7 years ago

fixed ticket 932 about cycle detection

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

  • Property mode set to 100644
File size: 3.3 KB
RevLine 
[5af87592]1/**
2* This file defines the syntax of CIVL's command line specification.
[d8786396]3* There are totally 8 commands, namely, config, compare, gui, help,
4* replay, run, show, and verify.
[5af87592]5* There are a number of options to be chosen as well.
6*
7* The usage of the commands are as follows:
[d8786396]8* civl config
[5af87592]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 :
[eaedf89]24 'help' (REPLAY | COMMAND | 'help' | 'config' | 'compare')? NEWLINE # help
[feba684]25 | 'compare' commonOption? specAndImplCommand NEWLINE #compare
[5af87592]26 | (REPLAY | COMMAND) commandBody NEWLINE #normal
[d8786396]27 | 'config' NEWLINE #config
[feba684]28 | REPLAY commonOption? specAndImplCommand NEWLINE #replayCompare
[5af87592]29 ;
30
[feba684]31specAndImplCommand
[5af87592]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
[0bb5e03]73 | STRING
[5af87592]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 :
[4e86cdd]112 '-_CIVL'
[5671da8]113 | '-checkDivisionByZero'
[68ca41d]114 | '-analyze_abs'
[4e86cdd]115 | '-ast'
[2f8ab7d]116 | '-checkMemoryLeak'
[5af87592]117 | '-collectHeaps'
[2255fb2]118 | '-collectOutput'
[5af87592]119 | '-collectProcesses'
120 | '-collectScopes'
[61c391b]121 | '-collectSymbolicConstants'
[1bd5b18]122 | '-cyclesViolate'
[5af87592]123 | '-deadlock'
124 | '-debug'
125 | '-enablePrintf'
126 | '-errorBound'
[73090b5]127 | '-errorStateEquiv'
[5af87592]128 | '-gui'
129 | '-guided'
130 | '-id'
[0631a6a]131 | '-int_bit'
[67b3900]132 | '-direct'
[c674c46]133 | '-loop'
[5af87592]134 | '-maxdepth'
135 | '-min'
[f810137]136 | '-mpiContract'
[5af87592]137 | '-ompNoSimplify'
[4a5679a]138 | '-ompLoopDecomp'
[5af87592]139 | '-preproc'
[f944ee6]140 | '-procBound'
[5e91373]141 | '-prob'
[0fdc01e]142 | '-maxProcs'
[fa8d574]143 | '-quiet'
[9a8af54]144 | '-intOperationTransformer'
[5af87592]145 | '-random'
146 | '-saveStates'
147 | '-seed'
[fe805a6]148 | '-showMemoryUnits'
[5af87592]149 | '-showAmpleSet'
150 | '-showAmpleSetWtStates'
151 | '-showInputs'
[fe805a6]152 | '-showMemoryUnits'
[5af87592]153 | '-showModel'
154 | '-showPathCondition'
155 | '-showProgram'
156 | '-showProverQueries'
157 | '-showQueries'
158 | '-showSavedStates'
159 | '-showStates'
[575d92a]160 | '-showTime'
[5af87592]161 | '-showTransitions'
[68ca41d]162 | '-showUnreached'
[5af87592]163 | '-simplify'
[7fd49b0]164 | '-sliceAnalysis'
[5af87592]165 | '-solve'
166 | '-statelessPrintf'
[5abe901]167 | '-strict'
[3fdd732]168 | '-svcomp16'
[f60252e]169 | '-svcomp17'
[5af87592]170 | '-sysIncludePath'
[073200b]171 | '-timeout'
[52d5578]172 | '-testGen'
[5af87592]173 | '-trace'
[a64709d]174 | '-unpreproc'
[5af87592]175 | '-userIncludePath'
176 | '-verbose'
177 | '-web'
[43f5e41]178 | '-witness'
[5af87592]179 ;
180
181VAR
182 :
183 [_a-zA-Z] [_a-zA-Z0-9]*
184 ;
185
186PATH
187 :
[feba684]188 ([_a-zA-Z0-9\.\/])([_:a-zA-Z0-9\-\.\/])*
[5af87592]189 ;
190
191NEWLINE
192 : '\r'? '\n'
193 ;
194
[0bb5e03]195STRING
196 : '"' ~[ =\-\r\n\t]+ '"';
[5af87592]197
198WS
199 : [ \t]+ -> skip
200 ;
Note: See TracBrowser for help on using the repository browser.