Compartir a través de


PermutationBehavior

The PermutationBehavior operator results in all possible orderings of the operand behaviors.

Syntax Definition

PermutationBehavior ::= Behavior & Behavior .

Remarks

Permutation behavior can be reduced syntactically as follows: (B1;B2)|(B2;B1)

The offered signature is the union of the offered signatures of the operands.

Example

The following Cord code shows the use of the PermutationBehavior operator. This code is extracted from the stand-alone Operators sample (see Finding the Code Samples).

machine Permutation() : AllActivities
{
    (Dance;Sleep) & (Eat; Drink)
}

In machine Permutation, the PermutationBehavior operator (&) constructs all possible permutations of two behaviors treated as atomic; no interleaving of individual actions is produced. The example also shows use of the Tight SequencingBehavior operator (;) and the GroupingBehavior.

See Also

Reference

Machine
CordScript

Concepts

Cord Syntax Definition

Other Resources

Cord Scripting Language