Re: dynamic programming

Kilián Imre <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Organization Univ Pécs/Informatika
Message-ID <[email protected]>
On Mon, 2 Sep 2013 16:52:33 +1200
"Richard A. O'Keefe" <[email protected]> wrote:

thanx for the long and detailed explanation... but I have reached another problem regarding dynamic programming...

the next call...

modelDriven: 67 ?- assert(ontology:('Animal'(X,X):-a,b)).

gives:

'Animal'(A, A) :-
    ontology:
    (   a,
        b
    ).

To my understanding it has compiled ( , ) to a built-in predicate call... But in other cases it doesn't do so, eg.

modelDriven: 67 ?- assert(ontology:('Animal'(X):-a,b)).

gives...

'Animal'(_) :-
        a,
        b.



I can't find out what is the difference between the two... In what circumstance does it compile conjunction directly, and when does it compile to a predicate call?





-- 
Kilián Imre/Univ.Pécs Informatics
<[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.