The following comparison of the class form (static)
and the object form (dynamic) of the Law of Demeter
is based on the paper:

``Static and dynamic analysis: Synergy and duality'' 
by Michael D. Ernst. In WODA 2003: 
ICSE Workshop on Dynamic Analysis, (Portland, OR), May 9, 2003, pp. 24-27. 


LoD checker

Static 
------

Potential imprecision: 
A program that satisfies the class Form of the LoD
may violate the object form.

Chief challenge: Choosing a good abstraction.
The abstraction is of interest as an efficiency tweak
to an algorithm that works perfectly in theory
but exhausts resources in practice.


Dynamic
-------

Potential unsoundness: 
Statement: "LoD holds" may be unsound.
Results may not generalize to future executions 
  (the statement that there are no violations.)

Chief challenge: Choosing a representative set of test cases.
Many techniques for choosing partial test suites.


Static and Dynamic
------------------

Reason for imprecision and unsoundness:
Both dynamic and static analyses are able to directly consider
only a subset  of program executions.
Subsets chosen differently.

Executions not in the set may also be treated differently:
conservatively, pessimistically, or optimistically.