prob_calc(x(F),E,P_phi) :-
findall(S,(state(S),sat(F,S)),List_S),
add_prob(List_S,E,P_phi).
prob_calc(u(_F,0,G),E,P_phi) :-
(sat(G,E) -> P_phi=1.0
; P_phi=0.0
).
prob_calc(u(F,K_new,G),E,P_phi) :-
K_new > 0,
state(E),
(sat(G,E) -> P_phi=1.0
; (sat(not(F),E) -> P_phi=0.0
; K is K_new -1 ,
findall(S,trans(E,S,_),List_S),
add_prob_prime(P_phi,List_S,E,F,G,K)
)
).
prob_calc(u(F,G),E,P_phi) :-
retractall(table_prob0(_,_)),
retractall(table_prob1(_,_)),
% retractall(good_search(_C)),
prob_calc_u1(F,G,List_S,P_vect),
state(E),
(find_prob_u(List_S,P_vect,E,P) -> P_phi=P
; P_phi=0.0
).
prob_calc(f(K,F),E,P_phi) :-
prob_calc(u(true,K,F),E,P_phi).
prob_calc(f(F),E,P_phi) :-
prob_calc(u(true,F),E,P_phi).