diff --git a/packages/cplint/slipcase/bddem.c b/packages/cplint/slipcase/bddem.c index 19ad7bdbc..72a33aeef 100644 --- a/packages/cplint/slipcase/bddem.c +++ b/packages/cplint/slipcase/bddem.c @@ -242,7 +242,12 @@ static double Expectation(DdNode **nodes_ex,int lenNodes) } else if (nodes_ex[i]==Cudd_ReadLogicZero(mgr_ex[i])) + { CLL=CLL+LOGZERO*example_prob[i]; + nodes_probs_ex[i]=0.0; + } + else + nodes_probs_ex[i]=1.0; } return CLL; } @@ -266,7 +271,6 @@ static int end(void) free(probs_ex); free(nVars_ex); free(boolVars_ex); - free(nodes_probs_ex); for (r=0;r2-> format("Random_restart: CLL ~f~n",[CLLR]) @@ -450,7 +450,7 @@ random_restarts_ref(N,Nodes,CLL0,CLL,Par0,Par,LE):- setting(epsilon_em_fraction,ER), length(Nodes,L), setting(iterREF,Iter), - em(Nodes,EA,ER,L,Iter,CLLR,Par1), + em(Nodes,EA,ER,L,Iter,CLLR,Par1,_ExP), setting(verbosity,Ver), (Ver>2-> format("Random_restart: CLL ~f~n",[CLLR]) diff --git a/packages/cplint/slipcover/slipcover.pl b/packages/cplint/slipcover/slipcover.pl index ef3e1b9af..f3209d72e 100644 --- a/packages/cplint/slipcover/slipcover.pl +++ b/packages/cplint/slipcover/slipcover.pl @@ -648,7 +648,7 @@ random_restarts(N,Nodes,CLL0,CLL,Par0,Par,LE):- setting(epsilon_em_fraction,ER), length(Nodes,L), setting(iter,Iter), - em(Nodes,EA,ER,L,Iter,CLLR,Par1), + em(Nodes,EA,ER,L,Iter,CLLR,Par1,_ExP), setting(verbosity,Ver), (Ver>2-> format("Random_restart: CLL ~f~n",[CLLR]) @@ -679,7 +679,7 @@ random_restarts_ref(N,Nodes,CLL0,CLL,Par0,Par,LE):- setting(epsilon_em_fraction,ER), length(Nodes,L), setting(iterREF,Iter), - em(Nodes,EA,ER,L,Iter,CLLR,Par1), + em(Nodes,EA,ER,L,Iter,CLLR,Par1,_ExP), setting(verbosity,Ver), (Ver>2-> format("Random_restart: CLL ~f~n",[CLLR])