Graham Cooper
unread,Nov 10, 2012, 8:37:44 PM11/10/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Why this is marked as abuse? It has been marked as abuse.
While the query is not empty do
select an atom from the query
select a fact or rule with which the atom unifies
If there is none
then return {failed}
Else
If a fact was selected
Then
remove the atom from the query
Else If a rule was selected
replace the atom in the query by the
body of the selected rule
return {succeeded}
e.g.
============================
HEAD old(tom).
RULE oldman(X) <- man(X), old(X).
...... ^ HEAD ...........^ BODY
=============================
QUERY ?- oldman(tom).
replace the atom in the query by the
body of the selected rule
GOALS = man(tom), old(tom)
Herc