Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Domains
- int=integer
- str=string
- list=int*
- Predicates
- nondeterm playOn(str, str)
- nondeterm isQuartet(str, str, str, str)
- Clauses
- playOn("Monkey", "Violin").
- playOn("Donkey", "Alto").
- playOn("Goat", "Violoncello").
- playOn("Bear", "Contrabass").
- isQuartet(X, Y, Z, W):-
- playOn(X, "Alto"),
- playOn(Y, "Violin"),
- playOn(Z, "Violoncello"),
- playOn(W, "Contrabass"),
- X<>Y, Z<>W, X<>Z, Y<>W, X<>W, Y<>Z.
- Goal
- isQuartet(X, Y, Z, W).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement