[m-dev.] Re: For review: changes to graph.m
bromage at cs.mu.oz.au
Wed Jun 4 14:22:35 AEST 1997
Lee Naish wrote:
> It would be nice to be able to get some idea of what kind of representation
> is used (and hence the likely complexity of various operations) by looking at
> the header comments.
I think that putting complexity in the interface documentation is a very
good idea for any non-trivial data structure (or non-trivial operations
on trivial data structures).
> Graphs are an excellent example of data which you may want to represent in
> different ways at different times/places.
As are maps, arrays and sets.
> Perhaps some extra thought should
> be put into how a collection of graph manipulation libraries could be managed
> wrt names, conversion between different representations etc.
Ignoring the possibility of changing between representations depending
on the amount of data stored (eg represent sets by lists for "small"
data sets and trees for "big" sets), this is a perfect application of
existential types, which are on the "to do" list. If/when we have type
classes with inheritance, we will probably need to rethink a large
proportion of the library.
But bear in mind that the library is very much a work in progress. It's
not yet obvious what are the "right" operations on standard data types
in a strongly moded logic language.
More information about the developers