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

main test-branch
Last change on this file since beab7f2 was 1cface7, checked in by Stephen Siegel <siegel@…>, 3 years ago

Added new -fair feature which will ignore unfair cycles during cycle detection. Added some JUnit tests.

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

  • Property mode set to 100644
File size: 3.8 KB
RevLine 
[5af87592]1/**
2* This file defines the syntax of CIVL's command line specification.
[ff7b82c]3* There are totally 7 commands, namely, config, compare, help,
[d8786396]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 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 :
[eaedf89]23 'help' (REPLAY | COMMAND | 'help' | 'config' | 'compare')? NEWLINE # help
[feba684]24 | 'compare' commonOption? specAndImplCommand NEWLINE #compare
[5af87592]25 | (REPLAY | COMMAND) commandBody NEWLINE #normal
[d8786396]26 | 'config' NEWLINE #config
[feba684]27 | REPLAY commonOption? specAndImplCommand NEWLINE #replayCompare
[5af87592]28 ;
29
[feba684]30specAndImplCommand
[5af87592]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
[0bb5e03]72 | STRING
[5af87592]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:
[ff7b82c]101 'verify' | 'run' | 'show'
[5af87592]102 ;
103
104REPLAY
105 :
106 'replay'
107 ;
108
109OPTION_NAME
110 :
[4e86cdd]111 '-_CIVL'
[68ca41d]112 | '-analyze_abs'
[4e86cdd]113 | '-ast'
[22f2e8e]114 | '-checkAssertion'
115 | '-checkDivisionByZero'
[2f8ab7d]116 | '-checkMemoryLeak'
[22f2e8e]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'
[5af87592]133 | '-collectHeaps'
[2255fb2]134 | '-collectOutput'
[5af87592]135 | '-collectProcesses'
136 | '-collectScopes'
[61c391b]137 | '-collectSymbolicConstants'
[5af87592]138 | '-debug'
[b97b5a06]139 | '-disableLocalBlock'
[5af87592]140 | '-enablePrintf'
141 | '-errorBound'
[73090b5]142 | '-errorStateEquiv'
[1cface7]143 | '-fair'
[5af87592]144 | '-guided'
145 | '-id'
[0631a6a]146 | '-int_bit'
[67b3900]147 | '-direct'
[c674c46]148 | '-loop'
[5af87592]149 | '-maxdepth'
150 | '-min'
[f810137]151 | '-mpiContract'
[566a657]152 | '-mpi'
[5af87592]153 | '-ompNoSimplify'
[494390a]154 | '-ompOnlySimplifier'
[4a5679a]155 | '-ompLoopDecomp'
[d36c595]156 | '-preemptionBound'
[5af87592]157 | '-preproc'
[f944ee6]158 | '-procBound'
[5e91373]159 | '-prob'
[0fdc01e]160 | '-maxProcs'
[fa8d574]161 | '-quiet'
[9a8af54]162 | '-intOperationTransformer'
[5af87592]163 | '-random'
[bb92c13]164 | '-runtimeUpdate'
[5af87592]165 | '-saveStates'
166 | '-seed'
[fe805a6]167 | '-showMemoryUnits'
[5af87592]168 | '-showAmpleSet'
169 | '-showAmpleSetWtStates'
170 | '-showInputs'
[fe805a6]171 | '-showMemoryUnits'
[5af87592]172 | '-showModel'
173 | '-showPathCondition'
174 | '-showProgram'
175 | '-showProverQueries'
176 | '-showQueries'
177 | '-showSavedStates'
178 | '-showStates'
[575d92a]179 | '-showTime'
[5af87592]180 | '-showTransitions'
[68ca41d]181 | '-showUnreached'
[5af87592]182 | '-simplify'
[7fd49b0]183 | '-sliceAnalysis'
[5af87592]184 | '-solve'
185 | '-statelessPrintf'
[5abe901]186 | '-strict'
[3fdd732]187 | '-svcomp16'
[f60252e]188 | '-svcomp17'
[5af87592]189 | '-sysIncludePath'
[073200b]190 | '-timeout'
[52d5578]191 | '-testGen'
[5af87592]192 | '-trace'
[a64709d]193 | '-unpreproc'
[5af87592]194 | '-userIncludePath'
195 | '-verbose'
196 | '-web'
[43f5e41]197 | '-witness'
[5af87592]198 ;
199
200VAR
201 :
202 [_a-zA-Z] [_a-zA-Z0-9]*
203 ;
204
205PATH
206 :
[feba684]207 ([_a-zA-Z0-9\.\/])([_:a-zA-Z0-9\-\.\/])*
[5af87592]208 ;
209
210NEWLINE
211 : '\r'? '\n'
212 ;
213
[0bb5e03]214STRING
215 : '"' ~[ =\-\r\n\t]+ '"';
[5af87592]216
217WS
218 : [ \t]+ -> skip
219 ;
Note: See TracBrowser for help on using the repository browser.