1/* 2Probabilities computation in the body of probabilistic clauses. 3*/ 4:- use_module(library(pita)). 5 6:- if(current_predicate(use_rendering/1)). 7:- use_rendering(c3). 8:- endif. 9 10:- pita. 11 12:- begin_lpad. 13 14a0.2:- 15 prob(b,P), 16 P>0.2. 17 18b0.5:- 19 c. 20 21c. 22 23:- end_lpad.
?-
prob(a,Prob)
. % expected result 0.2 ?-prob(a,Prob)
,bar(Prob,C)
. % expected result 0.2*/