next up previous
Next: Future Work Up: The Nondeterminism Analysis Previous: The Typing Rules

Examples

We want to clarify the ideas of our analysis by providing some simple examples. If the type environment E contains only one type annotation TA for the function in the left-hand side of the rule r, we simply write figure934 instead of figure902.


 example938

example942

Now we want to study some more interesting examples where nondeterminism occurs.

 example947

We want to provide a final example to show the APP rule for a function call.

 example958

The first step in the analysis will always be the typing of a given program. In the second step, an expression to be evaluated w.r.t. to the program is analysed. For instance, if we would like to evaluate  f 1  w.r.t. the program from Example 5, the analysis returns

figure968

signalizing that this expression will reduce deterministically. In contrast, for  f x  the result is

figure971

Thus, the computation will split while evaluating  f x.


next up previous
Next: Future Work Up: The Nondeterminism Analysis Previous: The Typing Rules

F. Steiner
Sat Sep 4 22:03:32 MEST 1999