\section{Example: A Growing Point}\sectlabel{gp}
When a well-formed GPL program is running an Amorphous computation,
one of two results can usually be expected.  Either the computation
will terminate with the accomplishment of the goal, or a growing-point
will become "stuck" midway through a computation.  A growing point may
become stuck for a variety of reasons, but ultimately, it is because
none of the neighboring values received by the growing point meets the
criterion for propagation.  Because the growing point cannot progress
towards its immediate goal, we have a simple example of the failure of
a module to achieve conditions promised by the plan.  The question
that naturally arises is how we may extend the Growing Point Language
to recognize when it has become ``stuck,'' probe its neighbors to
determine what may have caused the failure, and implement a new
strategy based on the information it found.

\subsection{Monitoring the Progress of a Growing Point}\sectlabel{gp::monitor}
 In this case, since processors which comprise the structure have all
been labeled with a material name, it is easy to signal members of the
structure.  Furthermore, due to the nature of the propagation
protocol, the chances are good that just such a labelled processor is
within the local communication radius of the stuck growing point.

Therefore, we rewrite the growing point definition to include a monitor.

\begin{verbatim}
(define-growing-point (A-to-B-segment)
  (material A-material)
  (size 0)
  (tropism (ortho+ B-pheromone))
  (for-each-step
   (when ((sensing? B-material)
          (terminate))
         ((stuck?)
          (secrete 1 (A-is-stuck-pheremone))
         (default
          (propagate)))))
\end{verbatim}

\subsection{Diagnosing a Stuck Growing Point}\sectlabel{gp::diagnosis}
Diagnostic services localize the source of the failure and characterize
the form of the breakdown.  When a well-formed GPL expession fails, we
may assume the mode of failure is a "stuck" growing point. As we
mentioned in the last section, the only reason a growing point becomes
stuck is because none of the neighboring sites matches the criteria
for propagation.  These criteria may not be met for a variety of reasons.
\begin{description}
\item[Sparseness:] There are an inadequate number of processors to
choose from. 
\item[Unsuitable pheremone values:]  After the tropism
expression filters through the neighboring pheremone values, there are
no suitable successors.
\item[Noisy channel:] Processors are all trying to communicate
simultaneously, and too many messages are colliding. This can produce
spurious results because incomplete information will alter the growing
point's perception of the local landscape, causing it to propagate
suboptimally, or not at all. 
\item[Poisoned processors:] Neighbors that have become poisoned will
specifically ignore {\tt REQ}'s for certain pheremone values.  This
altering of the geometry with respect to the growing point may be
intended by the designer, so the poisoned processors should be
respected.    
\end{description}

In all theses situations, the protocol to determine the cause of
failure may be initiated by the stuck growing point, and implemented
in ECOLI.  

\subsection{Repairing the Growing Point}\sectlabel{gp::repair}
Having identified the form of the breakdown, the system
selects an alternative way of achieving the desired behavior. This
alternative may include running the same code again or it may use alternative
implementations which appear more likely to work given the nature of the
breakdown.  Let us look at the problem of the stuck growing point, and see what must
take place in order to choose the best way of continuing the computation.
These are a few alternate methods to achieve the original computation.

\begin{description}
 \item[Try, try again.]  This is plausible when there is reason to
believe that the cause of the problem is transitory.  For example, if
pheremone values are time-varying, or if processors are mobile, then
simply waiting for conditions to appear in which it is safe to proceed
with the original computation makes sense.

\item[Increasing the size of the growing point.] If there aren't
enough good choices to choose from then simply increasing the size of
the growing point may be enough to reduce the sparseness of the
environment.  Perhaps sparseness is a problem at one scale,
but not at another.  

 \item[Working around the bad spot.] As long as we are making
progress towards the goal, taking a detour may be the most expedient
way of solving the problem.  For example, diatropic and plagiotropic
tropisms will suffice if orthotropic tropisms run into a wall.

 \item[Backing up.]  Sometimes you paint yourself into a corner.
By reversing the tropism, you might find that a better opportunity
presents itself.  More on this in the next section.
 
 \item[Ignoring the problem.] Sometimes it is better to do nothing
at all.  Other factors or higher-level directives might view a stuck
processor as a good thing, or at least better than the alternatives.
There may be cases when knowing where not to repair wins.
\end{description}






















