prologprobabilistic-programming

DTProbLog query


i'm using DTProblog in ProbLog version 2.1.0.34 downloaded from the bitbucket repository at https://bitbucket.org/problog/problog/src/develop/. To run a program which uses dtproblog i type on terminal

$ problog dt program.pl

Looking at the examples in the bitbucket repository at https://bitbucket.org/problog/problog/src/develop/test/dtproblog/viralmarketing.pl i see that several queries are allowed, such as dtproblog_ev/2 ecc... How can i run one of those queries from the command line?

I've tried also to open a shell using

$ problog shell

but when i try to load a program using consult/1 (https://problog.readthedocs.io/en/latest/cli.html#interactive-shell-shell) i have an error:

?- consult('viralmarketing.pl').

Traceback....

TypeError: _builtin_consult() takes at least 2 arguments (3 given)

Thanks for the help.


Solution

  • I've posted the same question in the ProbLog mailing list. I've received an answer: basically, queries as dtproblog_ev/2 are no more supported in the newest version of ProbLog. Regarding the consult/1 issue, it was a bug and now is fixed.