The machine-dependent disk-based reachability graph files are
handled by the class Graph
. There are three files: a directory (having a suffix .rgd
), the state file (.rgs
), containing the global
marking of the Petri Net in each state (node of the reachability
graph), and the arc file (.rga
),
containing the events leading from one state to another.
.rgd
)The directory begins with a magic cookie and the command line
arguments of the reachability analyzer that were used to generate the
initial version of the reachability graph. Following them is an index
to all states of the net, and a list of states whose analysis has not
been completed (the search list, class SearchList
).
Item | Size |
---|---|
magic cookie (text) | sizeof magic (a NUL-terminated string) |
argument count (argc ) |
sizeof (card_t) |
command line arguments | argc NUL-terminated strings |
name of the Petri Net | a NUL-terminated string |
number of states generated (numStates ) |
sizeof (card_t) |
hash value and offset in the state file The most significant bit of offset indicates an erroneous state. |
numStates * (sizeof (size_t) + sizeof (long)) |
size of the search list (numSearch ) |
sizeof (card_t) |
number and hash value of the states in search list | numSearch * (sizeof (card_t) + sizeof (size_t)) |
.rgs
)The state file contains the encoded representations of the states
(contents of BitPacker::myBuf
), stored in whole units of
word_t
. The file is accessed by seeking to the offset
recorded in the graph directory.
.rga
)The arc file contains the events (transition instances) between states. Each event has a source state and a target state (which may be equal). The transition instance will be stored in an encoded form. The format of each arc record is as follows:
Item | Size |
---|---|
number of source state, number of target state | sizeof (card_t[2]) |
hash value of source state, hash value of target state | sizeof (size_t[2]) |
length of the encoded event (numWords ) |
sizeof (unsigned) |
the encoded event (BitPacker::myBuf ) |
numWords * sizeof (word_t) |