CMU Artificial Intelligence Repository
Home INFO Search FAQs Repository Root

DLISTS: Prolog doubly-linked list package.

lang/prolog/code/ext/dlists/
This is Jocelyn Paine's revised version of a doubly-linked list-handling package sent to the Prolog Digest by Philip Dart of Melbourne University. The syntax has been changed slightly to run in Edinburgh Prolog; otherwise, the predicates are the same. Philip sent the original package as a joke: "Following the comments [on the bulletin board] about Fortran as an AI language, Melbourne University Department of Artificial Intelligence has decided to convert all of its Fortran AI programs to NU-Prolog. This package has been written as an aid to this conversion. Doubly-linked list package: Why use boring old single-linked lists when doubly-linked list could make your list processing applications run as never before. P.S. Don't forget to turn off the occur-check in your version of Prolog!" However, it seems that the package might be useful in those few cases where you really *do* need circular structures (rather than using edge-sets to represent graphs), and Philip has agreed to let Jocelyn redistribute his package on this basis. Predicates defined: test Demonstrate the predicates dPrev(D, _) Get previous node dNext(D, _) Get next node dHead(D, _) Get head of list dTail(D, _) Get tail of list isD(D) Is this a doubly-linked list? portray(D) Portray doubly-linked list dAppend(X, Y, Z) Append for doubly-linked lists dAdj(L, R) Are these adjacent nodes?
Origin:   

   src.doc.ic.ac.uk:packages/prolog-pd-software/ (146.169.2.1)
   as dlists.tar.Z

Version: 6-DEC-87 (3-NOV-87) Ports: Edinburgh-compatible Prologs CD-ROM: Prime Time Freeware for AI, Issue 1-1 Author(s): Philip Dart Melbourne University Keywords: Authors!Dart, DLISTS, Doubly-Linked Lists, Lists, Melbourne University, Prolog!Code, Prolog!Extensions References: ?
Last Web update on Mon Feb 13 10:33:34 1995
AI.Repository@cs.cmu.edu