
The above proof demonstrates that any object-oriented program written in
bad style can be rewritten in a form which follows the Law of Demeter.
However, such programs may contain messages to inherited instance variables, 
therefore violating the constraints of the Strong Law of Demeter which insists
that only direct (non-inherited) instance variables be sent messages inside of
a method.  We present the following proof that any object-oriented program
written to obey the Weak Law of Demeter can be automatically rewritten to
obey the Strong Law of Demeter.  This proof together with the previous proof
guarantees that any object-oriented program written in poor style can be
rewritten to obey the Strong Law of Demeter.

The difference between programs which follow the Weak Law and the Strong Law
of Demeter is that those following the Weak Law may contain message sends
to inherited instance variables.  These may look like:

\begin{verbatim}

   (defmethod (SubtypeClass :sample) ()
      (send price ':xyz))

\end{verbatim}

\noindent where price is an inherited instance variable from a class called 
``InheritedClass'' (from which SubtypeClass inherits).
All such message sends can be automatically rewritten such that the offending
message is sent to self and delegated to the inherited class as follows:

\begin{verbatim}

   (defmethod (SubtypeClass :sample) ()
      (send self ':price-xyz))

   (defmethod (InheritedClass :price-xyz) ()
      (send price ':xyz))

\end{verbatim}



