> I am converting some code from SICStus Prolog, and need a directed graph > library for Ocaml. Any pointers? It is difficult to design a `universal' graph library, i.e. one that will suit most users' needs, because different applications often require different concrete representations of graphs. Perhaps (as suggested by Chris Tilt in an earlier message) the best route is to write a functorized library of graph algorithms, where each algorithm is written independently of the actual data structure used to represent the graph. Yet, even then, it is not easy to determine which set of basic operations should be supported by the structure. For instance, some algorithms are easily expressed if graph nodes are numbered sequentially, but this is a rather undesirable requirement if nodes are to be dynamically added and deleted. As another example, some algorithms can be written more efficiently if they are allowed to store data directly within every graph node, but this causes them to be non-reentrant and can also be a problem in some applications. As an example of this functorized style of programming, attached is an abstract implementation of a topological-order iterator for graphs. -- François Pottier Francois.Pottier@inria.fr http://pauillac.inria.fr/~fpottier/