File: property.html

package info (click to toggle)
maria 1.3.4-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,956 kB
  • ctags: 5,485
  • sloc: cpp: 43,267; yacc: 8,080; sh: 460; ansic: 436; lisp: 395; makefile: 288; perl: 21
file content (277 lines) | stat: -rw-r--r-- 8,361 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">

<HTML><HEAD>
<TITLE>The property automaton translator interface</TITLE>
<LINK REV=MADE HREF="mailto:msmakela@tcs.hut.fi">
</HEAD>

<BODY>

<H1>The property automaton translator interface</H1>

<P>Maria relies on external programs translating LTL formulae into
generalised Bchi automata or finite-word automata.  It communicates
with these programs by writing a formula to the standard input of the
translator and by reading the translated automaton from the standard
output of the translator.  Each formula is translated in a separate
run of the external program.  The program is invoked without
arguments.</P>

<H1>Grammar Definitions</H1>

<P>The grammars are presented in Backus-Naur Form, one grammar rule
per line.  Comments delimited by the symbols <EM>/*</EM> and
<EM>*/</EM> are not part of the formal grammar.  Non-terminal symbols
are enclosed within single quotes or presented as <A
HREF="http://www.gnu.org/software/flex/flex.html">Flex</A>-style
regular-expressions.</P>

<H2>Output format for LTL formulae</H2>

<P>Currently, Maria does not make use of the implication, equivalence
or exclusive disjunction operators, but they might be generated in the
future.</P>

<H3>Propositional operators</H3>

<TABLE>
<TR>
 <TD><A NAME="f">&lt;f&gt;</A> ::=</TD>
 <TD><CODE>'t'</CODE></TD>
 <TD><EM>/* true */</EM></TD>
</TR>
<TR>
 <TD>&lt;f&gt; ::=</TD>
 <TD><CODE>'f'</CODE></TD>
 <TD><EM>/* false */</EM></TD>
</TR>
<TR>
 <TD>&lt;f&gt; ::=</TD>
 <TD><CODE>'p'[0-9]+</CODE></TD>
 <TD><EM>/* proposition */</EM></TD>
</TR>
<TR>
 <TD>&lt;f&gt; ::=</TD>
 <TD><CODE>'!'</CODE>
 &lt;<A HREF="#f">f</A>&gt;</TD>
 <TD><EM>/* negation */</EM></TD>
</TR>
<TR>
 <TD>&lt;f&gt; ::=</TD>
 <TD><CODE>'|'</CODE>
 &lt;<A HREF="#f">f</A>&gt;
 &lt;<A HREF="#f">f</A>&gt;</TD>
 <TD><EM>/* disjunction */</EM></TD>
</TR>
<TR>
 <TD>&lt;f&gt; ::=</TD>
 <TD><CODE>'&'</CODE>
 &lt;<A HREF="#f">f</A>&gt;
 &lt;<A HREF="#f">f</A>&gt;</TD>
 <TD><EM>/* conjunction */</EM></TD>
</TR>
<TR>
 <TD>&lt;f&gt; ::=</TD>
 <TD><CODE>'i'</CODE>
 &lt;<A HREF="#f">f</A>&gt;
 &lt;<A HREF="#f">f</A>&gt;</TD>
 <TD><EM>/* implication:
 <CODE>"i &lt;f1&gt; &lt;f2&gt;"</CODE> is short-hand for
 <CODE>"| ! &lt;f1&gt; &lt;f2&gt;"</CODE> */</EM></TD>
</TR>
<TR>
 <TD>&lt;f&gt; ::=</TD>
 <TD><CODE>'e'</CODE>
 &lt;<A HREF="#f">f</A>&gt;
 &lt;<A HREF="#f">f</A>&gt;</TD>
 <TD><EM>/* equivalence */</EM></TD>
</TR>
<TR>
 <TD>&lt;f&gt; ::=</TD>
 <TD><CODE>'^'</CODE>
 &lt;<A HREF="#f">f</A>&gt;
 &lt;<A HREF="#f">f</A>&gt;</TD>
 <TD><EM>/* exclusive disjunction (xor) */</EM></TD>
</TR>
<TR>
 <TD>&lt;f&gt; ::=</TD>
 <TD><CODE>[ \t\n\r\v\f]</CODE> &lt;<A HREF="#f">f</A>&gt;</TD>
 <TD><EM>/* white space is ignored */</EM></TD>
</TR>
<TR>
 <TD>&lt;f&gt; ::=</TD>
 <TD>&lt;<A HREF="#f">f</A>&gt; <CODE>[ \t\n\r\v\f]</CODE></TD>
 <TD><EM>/* white space is ignored */</EM></TD>
</TR>
</TABLE>

<H3>Temporal operators</H3>

<TABLE>
<TR>
 <TD>&lt;f&gt; ::=</TD>
 <TD><CODE>'X'</CODE>
 &lt;<A HREF="#f">f</A>&gt;</TD>
 <TD><EM>/* next */</EM></TD>
</TR>
<TR>
 <TD>&lt;f&gt; ::=</TD>
 <TD><CODE>'F'</CODE>
 &lt;<A HREF="#f">f</A>&gt;</TD>
 <TD><EM>/* finally, eventually */</EM></TD>
</TR>
<TR>
 <TD>&lt;f&gt; ::=</TD>
 <TD><CODE>'G'</CODE>
 &lt;<A HREF="#f">f</A>&gt;</TD>
 <TD><EM>/* globally, henceforth */</EM></TD>
</TR>
<TR>
 <TD>&lt;f&gt; ::=</TD>
 <TD><CODE>'U'</CODE>
 &lt;<A HREF="#f">f</A>&gt;
 &lt;<A HREF="#f">f</A>&gt;</TD>
 <TD><EM>/* until */</EM></TD>
</TR>
<TR>
 <TD>&lt;f&gt; ::=</TD>
 <TD><CODE>'V'</CODE>
 &lt;<A HREF="#f">f</A>&gt;
 &lt;<A HREF="#f">f</A>&gt;</TD>
 <TD><EM>/* release */</EM></TD>
</TR>
</TABLE>

<H2>Input format for automata</H2>

<P>The same grammar is used for both finite automata (safety
properties) and for generalised Bchi automata (liveness properties).
A finite automaton has zero acceptance sets and exactly one final
state that does not have any successor states.  A generalised Bchi
automaton has no final state.  If the number of acceptance sets of a
generalised Bchi automaton is zero, this means that the automaton has
one acceptance set to which all states belong.</P>

<TABLE>
<TR>
 <TD><A NAME="automaton">&lt;automaton&gt;</A> ::=</TD>
 <TD><CODE>[0-9]+</CODE> &lt;<A HREF="#space">space</A>&gt;
 <CODE>[0-9]+</CODE>
 &lt;<A HREF="#states">states</A>&gt;
 </TD>
 <TD><EM>/* first the number of states, then the number of acceptance sets
 (if the latter is 0, it is a generalised Bchi automaton whose all states
 accept, or a finite automaton) */</EM></TD>
</TR>
<TR>
 <TD><A NAME="space">&lt;space&gt;</A> ::=</TD>
 <TD><CODE>[ \n]+</CODE></TD>
</TR>
<TR>
 <TD><A NAME="states">&lt;states&gt;</A> ::=</TD>
 <TD><EM>/* empty */</EM></TD>
</TR>
<TR>
 <TD>&lt;states&gt; ::=</TD>
 <TD>&lt;<A HREF="#states">states</A>&gt; &lt;<A HREF="#space">space</A>&gt;
 &lt;<A HREF="#state">state</A>&gt;</TD>
</TR>
<TR>
 <TD><A NAME="state">&lt;state&gt;</A> ::=</TD>
 <TD><CODE>[0-9]+</CODE> &lt;<A HREF="#space">space</A>&gt;
 &lt;<A HREF="#finitial">finitial?</A>&gt; &lt;<A HREF="#space">space</A>&gt;
 &lt;<A HREF="#acceptance sets">acceptance sets</A>&gt; '-1'
 &lt;<A HREF="#transitions">transitions</A>&gt; '-1'</TD>
 <TD><EM>/* state identifiers can be arbitrary unsigned integers */</EM></TD>
</TR>
<TR>
 <TD><A NAME="finitial">&lt;finitial?&gt;</A> ::=</TD>
 <TD><CODE>'0'</CODE></TD>
 <TD><EM>/* not an initial or a final state */</EM></TD>
</TR>
<TR>
 <TD>&lt;finitial?&gt; ::=</TD>
 <TD><CODE>'1'</CODE></TD>
 <TD><EM>/* initial state (exactly one state must be initial) */</EM></TD>
</TR>
<TR>
 <TD>&lt;finitial?&gt; ::=</TD>
 <TD><CODE>'2'</CODE></TD>
 <TD><EM>/* final state (exactly one state must be final for finite automata) */</EM></TD>
</TR>
<TR>
 <TD><A NAME="acceptance sets">&lt;acceptance sets&gt;</A> ::=</TD>
 <TD><EM>/* empty */</EM></TD>
</TR>
<TR>
 <TD>&lt;acceptance sets&gt; ::=</TD>
 <TD>&lt;<A HREF="#acceptance sets">acceptance sets</A>&gt;
 <CODE>[0-9]+</CODE> &lt;<A HREF="#space">space</A>&gt;</TD>
 <TD><EM>/* acceptance set identifiers can be arbitrary unsigned integers */</EM></TD>
</TR>
<TR>
 <TD><A NAME="transitions">&lt;transitions&gt;</A> ::=</TD>
 <TD><EM>/* empty */</EM></TD>
</TR>
<TR>
 <TD>&lt;transitions&gt; ::=</TD>
 <TD>&lt;<A HREF="#transitions">transitions</A>&gt;
 &lt;<A HREF="#space">space</A>&gt;
 &lt;<A HREF="#transition">transition</A>&gt;</TD>
</TR>
<TR>
 <TD><A NAME="transition">&lt;transition&gt;</A> ::=</TD>
 <TD><CODE>[0-9]+</CODE> &lt;<A HREF="#space">space</A>&gt;
 <CODE>'t'</CODE></TD>
 <TD><EM>/* constantly enabled transition to
 a <A HREF="#state">state</A> */</EM></TD>
</TR>
<TR>
 <TD><A NAME="transition">&lt;transition&gt;</A> ::=</TD>
 <TD><CODE>[0-9]+</CODE> &lt;<A HREF="#space">space</A>&gt;
 &lt;<A HREF="#gate">gate</A>&gt;</TD>
 <TD><EM>/* conditionally enabled transition to
 a <A HREF="#state">state</A> */</EM></TD>
</TR>
<TR>
 <TD><A NAME="gate">&lt;gate&gt;</A> ::=</TD>
 <TD><CODE>'p'[0-9]+</CODE></TD>
 <TD><EM>/* proposition */</EM></TD>
</TR>
<TR>
 <TD>&lt;gate&gt; ::=</TD>
 <TD><CODE>'!'</CODE> &lt;<A HREF="#space">space</A>&gt;
 &lt;<A HREF="#gate">gate</A>&gt;</TD>
 <TD><EM>/* negation */</EM></TD>
</TR>
<TR>
 <TD>&lt;gate&gt; ::=</TD>
 <TD><CODE>'|'</CODE> &lt;<A HREF="#space">space</A>&gt;
 &lt;<A HREF="#gate">gate</A>&gt; &lt;<A HREF="#space">space</A>&gt;
 &lt;<A HREF="#gate">gate</A>&gt;</TD>
 <TD><EM>/* disjunction */</EM></TD>
</TR>
<TR>
 <TD>&lt;gate&gt; ::=</TD>
 <TD><CODE>'&'</CODE> &lt;<A HREF="#space">space</A>&gt;
 &lt;<A HREF="#gate">gate</A>&gt; &lt;<A HREF="#space">space</A>&gt;
 &lt;<A HREF="#gate">gate</A>&gt;</TD>
 <TD><EM>/* conjunction */</EM></TD>
</TR>
</TABLE>

<H1>Hints for Debugging</H1>

<P>Maria maps the state numbers in the property automata to a
contiguous sequence.  If you want to see the automata after this
mapping, define the preprocessor symbol <CODE>DEBUG_AUTOMATON</CODE>
when compiling the file <CODE>Property.C</CODE>.  In that way, Maria
will dump the mapped automaton to the standard output.  The automaton
can be visualised with the <CODE>lbt2dot</CODE> tool of <A
HREF="http://www.tcs.hut.fi/Software/maria/tools/lbt/">LBT</A>.</P>

<P>To grab the formula sent by Maria to the external translator, write
a wrapper shell script for the translator that does something like
<CODE>tee formula.txt | exec the-real-translator</CODE>.</P>

</BODY></HTML>