At the heart of Prolog 
Author Message
 At the heart of Prolog

Background:
Im interested in the way knowledge can be represented and processed in
computers; from a programming point of view.

Question:
What is the exact model used to represent FACTS internally (in memory)
in Prolog? Is it a straightforward "tree" data structure?

I'd appreciate as "many" details as possible.
(Are there any detailed resources on this subject on the web?)

Your help is most appreciated. Thank you.
Pete



Mon, 31 May 2004 02:49:29 GMT  
 At the heart of Prolog


Quote:
>Background:
>Im interested in the way knowledge can be represented and processed in
>computers; from a programming point of view.

>Question:
>What is the exact model used to represent FACTS internally (in memory)
>in Prolog? Is it a straightforward "tree" data structure?

This depends on the implementation.  I can only tell you about the
implementation of Prolog-2 that I once worked on.

Facts, and indeed all clauses, are stored on a heap.

Within a single predicate, the clauses are stored as a linked list.
There may also be a hash table for the predicate, with hashing on the
functor of the first argument, to speed access into a large predicate.

Nick
--



Tue, 22 Jun 2004 01:16:54 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. At the heart of Lisp and Prolog

2. At the heart of Lisp and Prolog

3. I heart Unlambda

4. St. Valentine's Heart (requires ImageMagick)

5. The Heart of Forth

6. School in heart of tech country teaches without PCs

7. School in heart of tech country teaches without PCs

8. heart-making project

9. A heart-warming, Christmas Ada story

10. Valentine Heart in Tk

11. At the heart of Lisp

 

 
Powered by phpBB® Forum Software