Go backward to Tracing the creation and reference of working memory elements.
Go up to Determining conditions and actions.

Determining a chunk's conditions
--------------------------------

The conditions of a chunk are determined by a dependency analysis of
production traces---a process called *backtracing*.  For each instantiated
production that creates a subgoal result, backtracing examines the production
trace to determine which working memory elements were matched.  If a matched
working memory element is linked to a supercontext, it is included in the
chunk's conditions.  If it is not linked to a supercontext, then backtracing
recursively examines the trace of the production that created the working
memory element.  Thus, backtracing begins with a subgoal result, traces
backwards through all working memory elements that were used to produce that
result, and collects all of the working memory elements that are linked to a
supercontext.  This method ignores when the working memory elements were
created, thus allowing the conditions of one chunk to test the results of a
chunk learned earlier in the subgoal.  The user can observe the backtracing
process by setting (watch :backtracing on).  This prints out a trace of the
conditions as they are collected (see Section See watch on page 
See watch for details).

Certain productions do not participate in backtracing.  If a production
creates only a desirability or reject preference, then neither the preference
nor the objects that led to its creation will be included in the chunk.  (The
exception to this is that if the desirability or reject preference is a
{result} of a subgoal, it will be in the chunk's actions.)  Desirability and
reject preferences should be used only as search control for choosing between
legal alternatives and should not be used to guarantee the correctness of the
problem solving.  The argument is that such preferences should affect only
the *efficiency* and not the *correctness* of problem solving, and therefore
are not necessary to produce the results.  Necessity preferences (require or
prohibit) should be used to enforce the correctness of problem solving; the
productions that create these preferences will be included in backtracing.

Given that results can be created at any point during a subgoal, it is
possible for one result to be relevant to another result.  Whether or not the
first result is included in the chunk for the second result depends on the
links that were used to match the first result in the subgoal. If the
elements are linked to the supercontext, they are included as conditions.  If
the elements are not linked to the supercontext, then the result is traced
through.  In some cases, there may be more than one set of links, so it is
possible for a result to be both backtraced through, and included as a
condition.