friguzzi / cplint

cplint is a suite of programs for reasoning with probabilistic logic programs
Other
67 stars 14 forks source link

Errors in examples #28

Closed felixhaag closed 5 years ago

felixhaag commented 5 years ago

After installing cplint with all dependencies, I can't perform a query within the examples without an error occurring.

Running 64bit SWI-Prolog 8.0.3 on Ubuntu 16.04

Example coin.pl:

?- prob(heads(coin), Prob).
ERROR: Undefined procedure: 'toss tabled'/3
ERROR: In:
ERROR:   [20] throw(error(existence_error(procedure,...),context(...,_10794)))
ERROR:   [18] heads(coin,1490548,_10822) at /media/psf/Home/Documents/HiWi/Prolog_Learning/cplint/prolog/examples/coin.pl:21
ERROR:   [17] '$goal0'(1490548,_10848) 1-st clause of '$goal0'/2 <no source>
ERROR:   [16] pita:get_node(user:'$goal0',1490548,_10882) at /home/parallels/lib/swipl/pack/cplint/prolog/pita.pl:703
ERROR:   [15] pita:get_p(user:'$goal0',1490548,_10922) at /home/parallels/lib/swipl/pack/cplint/prolog/pita.pl:665
ERROR:   [14] '$bags':findall_loop((heads(coin),_10970),pita:get_p(...,1490548,_10988),_10962,[]) at /usr/lib/swi-prolog/boot/bags.pl:98
ERROR:   [13] setup_call_catcher_cleanup('$bags':'$new_findall_bag','$bags':findall_loop(...,...,_11038,[]),_11016,'$bags':'$destroy_findall_bag') at /usr/lib/swi-prolog/boot/init.pl:468
ERROR:    [9] pita:prob_meta(user:heads(coin),_11078) at /home/parallels/lib/swipl/pack/cplint/prolog/pita.pl:244
ERROR:    [7] <user>
ERROR: 
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.

Debug-Mode output:

ERROR: Undefined procedure: 'toss tabled'/3
ERROR: In:
ERROR:   [20] throw(error(existence_error(procedure,...),context(...,_15850)))
ERROR:   [19] '$tabling':start_tabling(user:heads(coin,1381968,_15900),user:'heads tabled'(coin,1381968,_15914),user:'$heads$1'(coin,1381968),_15886) at /usr/lib/swi-prolog/boot/tabling.pl:139
ERROR:   [18] heads(coin,1381968,_15954) at /media/psf/Home/Documents/HiWi/Prolog_Learning/cplint/prolog/examples/coin.pl:21
ERROR:   [17] '$goal1'(1381968,_15980) 1-st clause of '$goal1'/2 <no source>
ERROR:   [16] pita:get_node(user:'$goal1',1381968,_16014) at /home/parallels/lib/swipl/pack/cplint/prolog/pita.pl:703
ERROR:   [15] pita:get_p(user:'$goal1',1381968,_16054) at /home/parallels/lib/swipl/pack/cplint/prolog/pita.pl:665
ERROR:   [14] '$bags':findall_loop((heads(coin),_16102),pita:get_p(...,1381968,_16120),_16094,[]) at /usr/lib/swi-prolog/boot/bags.pl:98
ERROR:   [13] setup_call_catcher_cleanup('$bags':'$new_findall_bag','$bags':findall_loop(...,...,_16170,[]),_16148,'$bags':'$destroy_findall_bag') at /usr/lib/swi-prolog/boot/init.pl:468
ERROR:   [12] setup_call_cleanup('$bags':'$new_findall_bag','$bags':findall_loop(...,...,_16226,[]),'$bags':'$destroy_findall_bag') at /usr/lib/swi-prolog/boot/init.pl:473
ERROR:   [11] '$bags':findall((heads(coin),_16276),pita:get_p(...,1381968,_16294),_16268,[]) at /usr/lib/swi-prolog/boot/bags.pl:92
ERROR:   [10] '$bags':findall((heads(coin),_16334),pita:get_p(...,1381968,_16352),_16328) at /usr/lib/swi-prolog/boot/bags.pl:89
ERROR:    [9] pita:prob_meta(user:heads(coin),_16384) at /home/parallels/lib/swipl/pack/cplint/prolog/pita.pl:244
ERROR:    [8] pita:prob(user:heads(coin),_16426) at /home/parallels/lib/swipl/pack/cplint/prolog/pita.pl:502
ERROR:    [7] <user>

Thanks in advance!

damianoazzolini commented 5 years ago

Hi, you need to update SWI Prolog to the new version. Then update both cplint and bddem packages.

felixhaag commented 5 years ago

Thank you Damiano! After I upgraded to the latest version it works fine