In this section, you find descriptions of file formats in extended
Backus-Nauer-Form (EBNF). The symbols: [ ]
denotes an option,
{ }
a repetition, |
an alternative, `` ''
a string, < >
a syntactic unit, and ::=
is the substitution
symbol. The only particularity is the string ``<cr>''
, which stands for
the end-of-line symbol. Line breaks in the presentation are only used for
formatting purposes, and have no meaning.
These descriptions serve as an interface, which makes it possible for you to attach any (graphical) editor, as long as you know the formats well enough so that you can write a program for translation into the INA -file format.
The .pnt-net file consists of three sections separated by
@
symbols.
The sections contain information about the net structure, the places, and the
transitions, respectively. As a rule, names consist of 16 characters, filled
up with blanks if necessary. Some special symbols like ``_''
are also allowed. The upper bound for integers is system-dependent.
<pnt-file> ::= <netheader> "<cr>"
<netstruct> "<cr>"
"@<cr>"
<placedata> "<cr>"
"@<cr>"
<transdata> "<cr>"
"@<cr>"
<netheader> ::= "P M PRE,POST NETZ " <netid>
<netid> ::= <netnr> [ ":" <netname> ]
<netnr> ::= <number>
<netname> ::= <name>
<netstruct> ::= <placedef>
{ "<cr>" <placedef> }
<placedef> ::= { " " <placenr> " " <tokens> " " [ <prelist> ] [ ", " <postlist> ]
<placenr> ::= <number>
<tokens> ::= <number>
<prelist> ::= { <transnr> [ ": " <arcmult> ] " " }
<postlist> ::= { <transnr> [ ": " <arcmult> ] " " }
<transnr> ::= <number>
<arcmult> ::= <number>
<placedata> ::= "place nr. name capacity time"
{ "<cr> " <placenr> ": " <placename> " " <capacity> <time> }
<placename> ::= <name>
<capacity> ::= " " <nr> | "oo"
<time> ::= <number>
<transdata> ::= "trans nr. name priority time"
{ "<cr> " <transnr> ": " <transname> " " <priority>
<time> }
<transname> ::= <name>
<priority> ::= <number>
Here is the file of net 2.1 ``Three programmers sharing two terminals'':
P M PRE,POST NETZ 1:3_prog_2_term
0 2 4: 2 5 6, 1: 2 2 3
1 0 1, 4
2 0 2, 5
3 0 3, 6
4 1 4, 1
5 1 5, 2
6 1 6, 3
@
place nr. name capacity time
0: terminal_free oo 0
1: prog1_at_term oo 0
2: prog2_at_term oo 0
3: prog3_at_term oo 0
4: prog1_on_break oo 0
5: prog2_on_break oo 0
6: prog3_on_break oo 0
@
trans nr. name priority time
1: login_prog1 0 0
2: login_prog2 0 0
3: login_prog3 0 0
4: logout_prog1 0 0
5: logout_prog2 0 0
6: logout_prog3 0 0
@
The .cnt-net file consists of the unfolded net structure (which describes the place colours, their initial markings, and the relations with the transition colours), and the place and transition colours. So far, there is no difference in the syntax compared to a .pnt-file. But in an additional fourth section, the folding information is included, i.e., the information which coloured places and transitions exist, and what their colours are.
<cnt-file> ::= <pnt-file>
<aggregat> "<cr>"
"@<cr>"
<aggregat> ::= "AGGREGATION:<cr>"
<placeaggr> "<cr>"
"@<cr>"
<transaggr>
<placeaggr> ::= "places:<cr>"
<placecol>
{ "<cr>" <placecol> }
<placecol> ::= " " <placenr>:<placename> " " <placenr> { " " <placenr> }
<transaggr> ::= "transitions:<cr>"
<transcol>
{ "<cr> <transcol> }
<transcol> ::= " " <transnr>:<transname> " " <transnr> { " " <transnr> }
This syntax allows compatibility of the net files; so it is
possible to fold .pnt-files, and to unfold .cnt-files,
i.e.,
to ignore the folding information (see also chapter 2.5.1
on page ).
Here is the file of the coloured net 2.2: ``Five dining philosophers''
P M PRE,POST NETZ 2:Dinner
1 1 16 17, 2 6
2 1 17 18, 3 7
3 1 18 19, 4 8
4 1 19 20, 5 9
5 1 16 20, 1 10
6 0 1, 11
7 0 2, 12
8 0 3, 13
9 0 4, 14
10 0 5, 15
11 0 6, 11
12 0 7, 12
13 0 8, 13
14 0 9, 14
15 0 10, 15
16 0 11, 16
17 0 12, 17
18 0 13, 18
19 0 14, 19
20 0 15, 20
@
place nr. name capacity time
1: fork1 oo 0
2: fork2 oo 0
3: fork3 oo 0
4: fork4 oo 0
5: fork5 oo 0
6: phil1 oo 0
7: phil2 oo 0
8: phil3 oo 0
9: phil4 oo 0
10: phil5 oo 0
11: phil1 oo 0
12: phil2 oo 0
13: phil3 oo 0
14: phil4 oo 0
15: phil5 oo 0
16: phil1 oo 0
17: phil2 oo 0
18: phil3 oo 0
19: phil4 oo 0
20: phil5 oo 0
@
trans nr. name priority time
1: phil1 0 0
2: phil2 0 0
3: phil3 0 0
4: phil4 0 0
5: phil5 0 0
6: phil1 0 0
7: phil2 0 0
8: phil3 0 0
9: phil4 0 0
10: phil5 0 0
11: phil1 0 0
12: phil2 0 0
13: phil3 0 0
14: phil4 0 0
15: phil5 0 0
16: phil1 0 0
17: phil2 0 0
18: phil3 0 0
19: phil4 0 0
20: phil5 0 0
@
AGGREGATION:
places:
1:table 1 2 3 4 5
2:has_left 6 7 8 9 10
3:has_right 11 12 13 14 15
4:is_eating 16 17 18 19 20
@
transitions:
1:take_left 1 2 3 4 5
2:take_right 6 7 8 9 10
3:start_eat 11 12 13 14 15
4:put_back 16 17 18 19 20
@
@
. These
are not read, and will therefore be lost when the net is saved into a different file.
© 1996-99 Prof. Peter H. Starke (starke@informatik.hu-berlin.de) und Stephan Roch (roch@...)
INA Manual Version 2.2 (last changed 1999-04-19)