Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disjunctive

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
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
 
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 ;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top