Promela Reference -- trace(2)

Promela

Declarator

trace(2)

NAME
trace - for defining valid event sequences.

SYNTAX
trace { sequence }

DESCRIPTION
As with never claim declarations, a trace declaration does not specify new behavior, but instead states a correctness requirement on existing behavior in the remainder of the system. All channel names referenced in a trace declaration must be to globally declared message channels, and all message fields must be globally known (possibly symbolic) constants, or the predefined global variable _ . A trace declaration can be one of the modules of a Promela specification, i.e., it's structure and place within a Promela model is similar to that of an init , or never claim declaration.

An event trace declaration defines a correctness claim with the following properties.

Event traces must be deterministic (we may relax this restriction in furture releases.)

EXAMPLES
An event trace declaration that specifies the correctness requirement that send operations on channel q1 alternate with receive operations on channel q2 , and furthermore that all send operations on q1 are (claimed to be) exclusively messages with value a , and all receive operations on channel q2 are exclusively messages with value b , is written as follows:


trace {
        do
        :: q1!a; q2?b
        od
}

NOTES
There are two significant differences between an event trace and a never-claim declaration:

A system state, for the purposes of verification, is a stable value assignment to variables, process-states, and message channels, that can be tested in boolean propositions. The transitions of a never claim are labeled with boolean propositions (expressions) that must evaluate to true in system states. The transitions of an event trace are labeled directly with monitored events that must occur in system transitions in the partial order that is stipulated in the trace declaration.

An event trace automaton, just like a never claim automaton, has a current state, but it only executes transitions if a monitored event occurs in the system. (I.e., it does not execute synchronously with the system, as a never claim is required to do.)

Note that it is easy to monitor receive events on rendezvous channels with an event trace , but very hard to do so with a never claim. Monitoring the send event on a rendezvous channel is also possible, but it would have to match also all rendezvous send offers, including those that cannot lead to an accepting receive event.

SEE ALSO
ltl(1), accept(2), end(2), notrace(2), never(2), progress(2), _(5).


Spin Online References
Promela Manual Index
Promela Grammar
Spin HomePage
(Page Updated: 16 December 1997)