Sep 4, 2002 #1 Guest_imported New member Joined Jan 1, 1970 Messages 0 Can anyone tell me why prolog does not allow disjunctive heads in its clauses, so its impossible to translate the logical sentance. child(X) -> boy(X) v girl(X) thanks for any help
Can anyone tell me why prolog does not allow disjunctive heads in its clauses, so its impossible to translate the logical sentance. child(X) -> boy(X) v girl(X) thanks for any help
Sep 25, 2002 #2 pimi Programmer Joined Mar 18, 2002 Messages 36 Location JP Hello. describe it in parallel ??? *** program *** child(X) :- boy(X). child(X) :- girl(X). *** assert *** ?- assert(boy(john)). yes ?- assert(girl(mary)). yes *** question *** ?- boy(john). yes ?- child(john). yes ?- child(X). X = john ; X = mary ; Upvote 0 Downvote
Hello. describe it in parallel ??? *** program *** child(X) :- boy(X). child(X) :- girl(X). *** assert *** ?- assert(boy(john)). yes ?- assert(girl(mary)). yes *** question *** ?- boy(john). yes ?- child(john). yes ?- child(X). X = john ; X = mary ;