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

Missing definition of add_decision_var and compute_best_strategy #26

Closed
hakank opened this issue May 29, 2019 · 2 comments
Closed

Missing definition of add_decision_var and compute_best_strategy #26

hakank opened this issue May 29, 2019 · 2 comments

Comments

@hakank
Copy link

hakank commented May 29, 2019

I just updated cplint using pack_upgrade(cplint) and pack_rebuild(cpling) to play with the new Dtproblog, but it seems that it's not complete.

$ swipl
?- pack_upgrade(cplint).
% Running "git fetch" in '/home/hakank/lib/swipl/pack/cplint'
% Package "cplint" is up-to-date
true.

?- pack_rebuild(cplint).
true.

Testing with prolog/examples/dt_rock_papers_scissors.pl

$ swipl dt_rock_paper_scissors.pl
In swipl:
?- dt_solve(Strategy,Value).
Warning: Undefined procedure: pita:add_decision_var/3
Warning: Undefined procedure: pita:add_decision_var/3
Warning: Undefined procedure: pita:add_decision_var/3
Warning: Undefined procedure: pita:compute_best_strategy/5
false.

Searching for the definitions of add_decision_var and compute_best_strategy find just the calls, not the predicate definition:

$ cd /home/hakank/lib/swipl/pack/cplint
$ git grep add_decision_var
prolog/pita.pl: add_decision_var(Env,R,V),

$ git grep compute_best_strategy
prolog/pita.pl: compute_best_strategy(Env,LBDD,LUtils,St,Cost),

@damianoazzolini
Copy link
Collaborator

Hi. add_decision_var/3 (and also other predicates) are defined in package bddem. In order to use it, you need to run pack_upgrade(bddem). then pack_rebuild(bddem).
Let me know if you have other issues.

@hakank
Copy link
Author

hakank commented May 29, 2019

Thanks!

It worked after some tweaks:

pack_upgrade(bddem) give the following error:
"""
?- pack_upgrade(bddem).
% Running "git fetch" in '/home/hakank/lib/swipl/pack/bddem'
% From https://github.com/friguzzi/bddem
% 457ee1e..404b4cb master -> origin/master
% * [new branch] automake-1.14 -> origin/automake-1.14
% * [new branch] dtproblog -> origin/dtproblog
% * [new branch] noconf -> origin/noconf
% * [new tag] v4.3.0 -> v4.3.0
% * [new tag] v4.3.1 -> v4.3.1
Upgrade "bddem" from 457ee1e-DIRTY to 404b4cb-DIRTY Y/n?
ERROR: error: Your local changes to the following files would be overwritten by merge:
ERROR: cudd-3.0.0/Makefile.in
ERROR: cudd-3.0.0/aclocal.m4
ERROR: cudd-3.0.0/configure
ERROR: lib/x86_64-linux/bddem.so
ERROR: Please commit your changes or stash them before you merge.
ERROR: Aborting
"""

I had to do a pack_remove(bddem) and then pack_install(bddem) to make it work.

@hakank hakank closed this as completed May 29, 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