This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/cplint/examples/mendels.cpl
rzf 8fb01d6607 examples for the new programs
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@2017 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
2007-11-15 12:38:55 +00:00

31 lines
460 B
Plaintext

/*
this file can not be used with s.pl: it generates too many programs
s([cg(s,1,p)],P).
P = 0.75 ?
s([cg(s,1,w)],P).
P = 0.25 ?
s([cg(s,2,p)],P).
P = 0.25 ?
s([cg(s,2,w)],P).
P = 0.75 ?
s([cg(f,2,w)],P).
P = 0.5
s([cg(s,2,w)],P).
P = 0.75
*/
mother(m,s).
father(f,s).
cg(m,1,p).
cg(m,2,w).
cg(f,1,p).
cg(f,2,p).
cg(X,1,A):0.5 ; cg(X,1,B):0.5 :- mother(Y,X),cg(Y,1,A) , cg(Y,2,B).
cg(X,2,A):0.5 ; cg(X,2,B):0.5 :- father(Y,X),cg(Y,1,A) , cg(Y,2,B).