next up previous
Next: Testing the wind Up: The Maelstrom Previous: Implementing policy

Primary and secondary scripts

Scripts that are called as the result of deterministic rules are treated differently by Maelstrom than the scripts to which such a rule applies.

Maelstrom attempts to make all the primary scripts in its configuration file succeed once. Secondary scripts are not included in Maelstrom's algorithm, and only execute under the conditions in which they are declared. This allows one to code traditional decision trees into Maelstrom processes without invoking the Maelstrom algorithm upon their components.

For example, the tree at the beginning of this paper, containing scripts A, B, C, D, E could be coded explicitly as:

or by realizing that X[1=>Y] is just X||Y, more simply as:
In this case:

Using the [] syntax, very complex trees are possible, though for simplicity any one script invocation can be assigned only one set of actions. Writing the two declarations:

A || B
A [ 1=>C ; 2=>D ]
together is illegal, because there can only be one response to an invocation of A.

A Maelstrom command is parsed by first splitting it into phrases separated by the precedence operator `:'. These phrases consist of a list of commands separated by `;'. Each command can optionally be associated with an action by use of the decision operators `&&', `||', or [], where the latter can themselves contain lists of commands and associated actions. A decision can appear after a command in any context, e.g.

A [ B [ C ; D ] ; E || F ] : G && H
is precisely equivalent to
A : G
A [ B [ C ; D ] ; E || F ] 
G && H
and roughly equivalent to:
A : G
A [ B ; E ]
B [ C ; D ] 
E || F
G && H
In the first two declarations there are two primary commands A and G, while in the last one the primary commands also include B and E (because they appear outside the context of a conditional command).

next up previous
Next: Testing the wind Up: The Maelstrom Previous: Implementing policy
Alva L. Couch