This file is indexed.

/usr/share/Yap/clpbn/examples/cg.yap is in yap 6.2.2-6.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
%
% adapted from Hendrik Blockeel's ILP04 paper.
%

:- use_module(library(clpbn)).

cg(X,1,C):-
    father(Y,X),
    cg(Y,1,C1),cg(Y,2,C2),
    parent_cpt(cg(X,1), C1, C2, C).

cg(X,2,C):-
    mother(Y,X),
    cg(Y,1,C1),cg(Y,2,C2),
    parent_cpt(cg(X,2), C1, C2, C).



cg(f,X,C) :-
    prior_cpt(cg(f,X),C).

cg(m,X,C) :-
    prior_cpt(cg(m,X),C).


prior_cpt(CKEY, C) :-
    { C = CKEY with p([p,w], [0.5,0.5])}.

parent_cpt(CKEY, C1, C2, C) :-
    { C = CKEY with p([p,w], [   1,0.5,0.5,0.0,
                               0.0,0.5,0.5,  1],[C1,C2])}.

father(f,s).
mother(m,s).