Created
March 29, 2020 20:09
-
-
Save LamentConfiguration/9af732ab102aa2e853af2dfc29cd9ab1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Left recursion: | |
This arises when a rules causes the invocation of a goal that is essentially equivalent | |
to the original goal that caused the rule to be used. | |
This will recurse infinitely | |
person(adam). | |
person(X):-person(Y), mother(X,Y). | |
?-person(X). | |
This works (according to the book, either fails or something, but doesn't recurse infinitely) | |
person(X):-person(Y), mother(X,Y). | |
person(adam). | |
?-person(X). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment