Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- domains
- prof = string
- name = string
- predicates
- p(name, prof).
- %v(name, name).
- vp(name, prof, prof).
- clauses
- p("L","K").
- p("L","T").
- p("L","E").
- p("L","D").
- p("K","K").
- p("K","T").
- p("K","E").
- p("K","D").
- p("M","K").
- p("M","T").
- p("M","E").
- p("M","D").
- p("S","K").
- p("S","T").
- p("S","E").
- p("S","D").
- vp(X,P2,P1):-p(X,P2),P1<>P2.
- goal
- p(P1,W1),p(P2,W2),p(P3,W3),p(P4,W4),
- vp(P1,W1,"E"),
- vp(P3,W3,"E"),
- vp(P2,W2,"T"),
- vp(P2,W2,"D"),
- vp(P1,W1,"D"),
- vp(P4,W4,"D"),
- W1<>W2,W1<>W3,W1<>W4,
- W2<>W1,W2<>W3,W2<>W4,
- W3<>W1,W3<>W2,W3<>W4,
- W4<>W1,W4<>W2,W4<>W3,
- P1="L",P2="K",P3="M",P4="S".
Add Comment
Please, Sign In to add comment