ORELSE

AcronymDefinition
ORELSEObservations of Redshift Evolution in Large Scale Environments (astronomy survey)
Copyright 1988-2018 AcronymFinder.com, All rights reserved.
References in periodicals archive ?
We can now explain the computational interpretation of the ORELSE statement.
The computation of an ORELSE statement starts by creating a choice point.
This definition implies that if the computation that started with some but not last branch eventually fails, possibly beyond the end of the ORELSE statement, backtracking takes place, and the computation resumes with the next branch in the state in which the previous branch was entered.
EITHER x := x - 2*a; x > 0 ORELSE x > a; y := x END If the initial value of x is larger than 2*a, the computation passes through the first branch and succeeds.
EITHER y := x ORELSE x > 0; y := -x END; x := x + b; y < 0 Here the computation that passes through the first branch eventually fails upon encounter of the test y < 0, and backtracking takes place.
Note that in the second example the failure occurs outside the scope of the ORELSE statement; that is, the backtracking takes place here after the control has left the ORELSE statement.
This interpretation of the meaning of the ORELSE statement allows the user to write programs in which the creation of choice points and the testing of the selections made by them are done in separate parts of the program.
As an example of use of the ORELSE statement, we now show the definition of the procedure Move of Problem 1 that corresponds to the tree of Figure 1.
TYPE node = (a,b,c,d,e,f,g,h,i); PROCEDURE Move (x : node ; VAR y:node); BEGIN IF x = a THEN EITHER y := b ORELSE y := c ORELSE y := d END ELSIF x = b THEN EITHER y := e ORELSE y := f END ELSIF x = d THEN y := g ELSIF x = g THEN EITHER y := h ORELSE y := i END ELSE FALSE; END END Move; 3.2 SOME Statement
One of the limitations of the ORELSE statement is that it generates a number of choice points fixed in advance.
EITHER i := 1; T ORELSE SOME i := 2 TO 10 DO T END END More precisely, we stipulate the following meaning of the SOME statement.
Then S is equivalent to EITHER i := m1 ORELSE i := m1+1 ...