Original-Via: uk.ac.st-and.cs; Tue, 15 Oct 91 10:17:24 BST
IS DEPENDENCY ANALYSIS WELL ENOUGH DEFINED?
1) When module A needs exported items from module B, it need only see its
interface for compilation of A to be carried out.
In fact an implementation of B need not exist yet.(section 5.1.1)
2) Dependency analysis is performed before static type checking, so that
polymorphism can be enhanced (section 4.5.1)
BUT: When an implementation of B is eventually made (as it will have to be
for A to run), it may then be discovered that new dependencies arise.
e.g. Suppose a and a' are identifiers in A which do not appear to depend on
one another. Let b and b' appear in the interface to B and suppose that
a depends on b. When the implementation of B is made, it is discovered that
b depends on b' (nothing about this need appear in any interface)
and that b' depends on a'. Hence, we find that a ultimately a DOES
depend on a'.
The trouble is that, according to 5.1.3, declarations must be closed across
module boundaries, but nothing says that dependency chains have to be closed.
Indeed it's difficult to see how they could be. Should the report say so?
Are we meant to assume that dependency analysis is to be carried out
WITHIN modules only?
Tony Davie