source: CIVL/grammar/Command.g4@ 0c90cbf

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since 0c90cbf was bb92c13, checked in by Ziqing Luo <ziqing@…>, 7 years ago

merged wenhao's change that adds a new option for disabling runtme info updater

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

  • Property mode set to 100644
File size: 3.4 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'
[494390a]138 | '-ompOnlySimplifier'
[4a5679a]139 | '-ompLoopDecomp'
[5af87592]140 | '-preproc'
[f944ee6]141 | '-procBound'
[5e91373]142 | '-prob'
[0fdc01e]143 | '-maxProcs'
[fa8d574]144 | '-quiet'
[9a8af54]145 | '-intOperationTransformer'
[5af87592]146 | '-random'
[bb92c13]147 | '-runtimeUpdate'
[5af87592]148 | '-saveStates'
149 | '-seed'
[fe805a6]150 | '-showMemoryUnits'
[5af87592]151 | '-showAmpleSet'
152 | '-showAmpleSetWtStates'
153 | '-showInputs'
[fe805a6]154 | '-showMemoryUnits'
[5af87592]155 | '-showModel'
156 | '-showPathCondition'
157 | '-showProgram'
158 | '-showProverQueries'
159 | '-showQueries'
160 | '-showSavedStates'
161 | '-showStates'
[575d92a]162 | '-showTime'
[5af87592]163 | '-showTransitions'
[68ca41d]164 | '-showUnreached'
[5af87592]165 | '-simplify'
[7fd49b0]166 | '-sliceAnalysis'
[5af87592]167 | '-solve'
168 | '-statelessPrintf'
[5abe901]169 | '-strict'
[3fdd732]170 | '-svcomp16'
[f60252e]171 | '-svcomp17'
[5af87592]172 | '-sysIncludePath'
[073200b]173 | '-timeout'
[52d5578]174 | '-testGen'
[5af87592]175 | '-trace'
[a64709d]176 | '-unpreproc'
[5af87592]177 | '-userIncludePath'
178 | '-verbose'
179 | '-web'
[43f5e41]180 | '-witness'
[5af87592]181 ;
182
183VAR
184 :
185 [_a-zA-Z] [_a-zA-Z0-9]*
186 ;
187
188PATH
189 :
[feba684]190 ([_a-zA-Z0-9\.\/])([_:a-zA-Z0-9\-\.\/])*
[5af87592]191 ;
192
193NEWLINE
194 : '\r'? '\n'
195 ;
196
[0bb5e03]197STRING
198 : '"' ~[ =\-\r\n\t]+ '"';
[5af87592]199
200WS
201 : [ \t]+ -> skip
202 ;
Note: See TracBrowser for help on using the repository browser.