Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duel.pl in examples directory throws an error #29

Closed
hakank opened this issue Jul 9, 2019 · 3 comments
Closed

duel.pl in examples directory throws an error #29

hakank opened this issue Jul 9, 2019 · 3 comments

Comments

@hakank
Copy link

hakank commented Jul 9, 2019

The program examples/prolog/duel.pl in the cplint distribution throws the following error when running the latest Git version (4.5.0).

?- survives([a,b,c],a,0).

survives_round([a,b,c],[a,b,c],a,0,_7682)
best_strategy(a,[b,c],[a,b,c],0,_7700,_7702)
l1=[b,c]
survives_rest(a,[b,c],0,[a,b,c],b),shoot(a,b,[b,c],[a,b,c],0,[c],[a,c])
survives_round([c],[a,c],a,0,_8000)
best_strategy(c,[],[a,c],0,_8018,_8020)
l1=[a]
ERROR: Type error: `db_reference' expected, found `user:sampled(0,[0],0)' (a compound)
ERROR: In:
ERROR:   [27] erase(user:sampled(0,...,0))
ERROR:   [26] mcintyre:save_samples(user,survives_rest(c,[],0,[a|...],a)) at /home/hakank/lib/swipl/pack/cplint/prolog/mcintyre.pl:309
ERROR:   [25] mcintyre:mc_sample(user:survives_rest(c,[],0,...,a),5,_10360,_10362,_10364) at /home/hakank/lib/swipl/pack/cplint/prolog/mcintyre.pl:571
ERROR:   [24] mcintyre:mc_sample(user:survives_rest(c,[],0,...,a),5,_10416,[]) at /home/hakank/lib/swipl/pack/cplint/prolog/mcintyre.pl:544
ERROR:   [22] '__aux_maplist/3_ev_action+4'([a,sky],[_10492-a|_10488],c,[],0,[a,c]) at /home/hakank/cplint/cplint/prolog/examples/duel.pl:67
ERROR:   [21] best_strategy(c,[],[a,c],0,_10538,_10540) at /home/hakank/cplint/cplint/prolog/examples/duel.pl:73
ERROR:   [20] table best_strategy(c,[],[a|...],0,_10588,_10590) at /home/hakank/cplint/cplint/prolog/examples/duel.pl:115
ERROR:   [19] survives_round_bounded([c],[a,c],a,0,_10628) at /home/hakank/cplint/cplint/prolog/examples/duel.pl:58
ERROR:   [18] survives_rest(a,[b,c],0,[a,b|...],b) at /home/hakank/cplint/cplint/prolog/examples/duel.pl:93
ERROR:   [17] mcintyre:montecarlo(5,0,0,user:survives_rest(a,...,0,...,b),_10740,_10742) at /home/hakank/lib/swipl/pack/cplint/prolog/mcintyre.pl:415
ERROR:   [16] mcintyre:mc_sample(user:survives_rest(a,...,0,...,b),5,_10794,_10796,_10798) at /home/hakank/lib/swipl/pack/cplint/prolog/mcintyre.pl:572
ERROR:   [15] mcintyre:mc_sample(user:survives_rest(a,...,0,...,b),5,_10850,[]) at /home/hakank/lib/swipl/pack/cplint/prolog/mcintyre.pl:544
ERROR:   [13] '__aux_maplist/3_ev_action+4'([b,c|...],[_10926-b|_10922],a,[b,c],0,[a,b|...]) at /home/hakank/cplint/cplint/prolog/examples/duel.pl:67
ERROR:   [12] best_strategy(a,[b,c],[a,b|...],0,_10984,_10986) at /home/hakank/cplint/cplint/prolog/examples/duel.pl:73
ERROR:   [11] table best_strategy(a,[b|...],[a|...],0,_11046,_11048) at /home/hakank/cplint/cplint/prolog/examples/duel.pl:115
ERROR:   [10] survives_round([a,b|...],[a,b|...],a,0,_11092) at /home/hakank/cplint/cplint/prolog/examples/duel.pl:36
ERROR:    [9] survives([a,b|...],a,0) at /home/hakank/cplint/cplint/prolog/examples/duel.pl:27
ERROR:    [8] '$tabling':'$wfs_call'(user:survives(...,a,0),user:_11208) at /usr/lib/swi-prolog/boot/tabling.pl:675

I have ensured that bddem is updated and rebuilt.

The Swish version ( http://cplint.eu/p/duel_from_dist.pl ) also throws an error, though it's not the same:

No permission to call sandboxed `assertz(sampled(0,[_1372],_1368))'
Reachable from:
	  sample_head(0,[A],'e924829f-5ed4-4570-8488-c2631e727d10',[hit(A,a):0.3333333333333333,'':0.6666666666666667],0)
	  hit(A,B)
	  shoot(A,B,C,D,E,F,G)
	  survives_round(A,B,C,D,E)
	  survives(A,B,C)
@friguzzi
Copy link
Owner

friguzzi commented Jul 9, 2019

The file is out of date, the more recent and correct version is truel.pl, please use that

@friguzzi friguzzi closed this as completed Jul 9, 2019
@friguzzi friguzzi reopened this Jul 9, 2019
@hakank
Copy link
Author

hakank commented Jul 9, 2019

Ah, OK. Perhaps duel.pl should be removed from the repo?

@friguzzi
Copy link
Owner

friguzzi commented Jul 9, 2019

done, thanks

@friguzzi friguzzi closed this as completed Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants