next up previous contents
Next: 7.2.2 The heap Up: 7.2 The data structures Previous: 7.2 The data structures

7.2.1 The local stack

The local stack contains environment and choicepoint frames. An environment must be created in a clause (using the allocate instruction) as soon as local variables become necessary.

Table 2:   The memory layout of an environment

A choice point is needed if there is more than one clause in a procedure. If a recent goal failed, the next clause must be explored with all argument registers appropriately (re-)set and the variables bound later than the invocation of the current clause restored to an unbound state.

Table 3: The memory layout of a choicepoint (backtrack point)

Harold Boley (