B.3 Action Labels


B.3 Action Labels

Actions in FSP can be labeled either by a lowercase identifier or by a value computed from an expression enclosed by square brackets. Action labels are also formed by concatenating simpler labels with a dot.

 ActionLabel:            LowerCaseIdentifier            ActionLabel . LowerCaseIdentifier             [ Expression ]            ActionLabel [ Expression ] 

Examples

 in [43] in[12] in[2][i*2] x[1].y[3]

Wherever a single action label can be used in FSP, a set of action labels can also be used. The exception is where label values are used in expressions (see section B.10).

 ActionLabels:             ActionLabel             Set             [ ActionRange ]             ActionLabels . ActionLabel             ActionLabels . Set             ActionLabels [ ActionRange]             ActionLabels [ Expression ] 

Sets of action labels are defined explicitly by a set or by a range of integer values.

 ActionRange:           Range           Set           Variable : Range           Variable : Set Range:           RangeIdent           Expression .. Expression Set:           SetIdent           { SetElements } SetElements:           ActionLabels           SetElements , ActionLabels 

Examples

 {a,b,c} X.a in[x:1..3] in[x:T] a.{x,y,z}

Variables can be associated with a set or a range in an ActionRange. The variable successively takes on each of the values of the set or range. The scope of variables is discussed in the following with respect to their use in processes, composite processes and re-labeling definitions.

Examples

 a[i:1..3] x[v:{a,b,c}]




Concurrency(c) State Models & Java Programs
Concurrency: State Models and Java Programs
ISBN: 0470093552
EAN: 2147483647
Year: 2004
Pages: 162

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net