[mercury-users] Graph Traversal in Mercury

Charles Shuller charles.shuller at gmail.com
Sun Jul 15 12:39:51 AEST 2012


All,

Possibly my prolog class is getting in the way, but we only studied 
transcribing a graph into prolog directly, using predicates to model 
nodes.   Which I can do quite well in Mercury.

I now have need to traverse an arbitrary graph read from a file.

Do I somehow introduce new predicates at run-time to make use of 
whatever mercury uses to find solutions, or do I implement a graph 
traversal algorithm "statically"??  By this, I mean specify some set of 
predicates to find an optimal route through an arbitrary graph.

Also, what data structures would be good for this: just lists, or 
something more complex??

For reference, I thought it would be fun to implement a solution for the 
ICFP contest in mercury as an exercise. 
http://icfpcontest2012.wordpress.com/


Thanks!

Charles
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list