[m-dev.] for review: higher-order write_graph

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Feb 28 03:54:47 AEDT 2001


On 27-Feb-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> On Wed, Feb 28, 2001 at 03:40:14AM +1100, Fergus Henderson wrote:
> > On 27-Feb-2001, Peter Ross <peter.ross at miscrit.be> wrote:
> > >     Change build_dependency_graph so that it optionally also includes
> > >     arcs to imported procedures.
> > 
> > That bit is problematic because it breaks the meaning of
> > ensure_dependency_info.  Previously there was only one kind of
> > dependency graph, and it was either valid or not, so
> > ensure_dependency_info just needs to (re)make it if it is not valid.
> > With your change, there are two kinds; probably the interface to
> > ensure_dependency_info should change to indicate which kind of
> > dependency info the caller wants, and if the currently stored one is
> > not the right kind, ensure_dependency_info should recalculate it.
> > 
> The one calculated in the ensure_dependency_graph will always be the one
> which doesn't include imported procedures (the original behaviour), for
> the moment I will just change the documentation to reflect this.

What happens if someone calls build_dependency_graph
with the option to include the imported procedures,
and then later some code calls ensure_dependency_graph?
Will the later code get the version that includes imported
procedures?  

Unless the code is changed, I think it will, and I think
that is likely to cause future problems.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list