Algorithmic Constructs

1 Algorithms

Algorithm sections may also be called algorithm equations, since an algorithm section can be viewed as a group of equations involving one or more variables, and can appear among equation sections. Algorithm sections are terminated by the appearance of one of the keywords equation, public, protected, algorithm, or end. An algorithm section can be embedded by equation secions, like in the class AlgorithmSection.

The code in the algorithm section uses the values of certain variables from outside the algorithm, so called input variables to the algorithm (
x,y and z). Analogously, variables assigned values by the algorithm define the outputs of the algorithm (x1, x2 and x3). This makes the semantics of an algorithm section quite similar to a function.

2 Simulation of AlgorithmSection

We simulate the model AlgorithmSection and then we can look at the values in the model.