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)