#89 oclingo: unsafe variables message


We invoke the following command with oclingo and we get the following output:

dhcp-64-103-84-154:oclingo dmagka$ oclingo dpal/cp_base.lp dpal/o_transforms.lp --imax=9 0 &
[1] 7711
dhcp-64-103-84-154:oclingo dmagka$
ERROR: unsafe variables in:
dpal/o_transforms.lp:4:1: c(X):-a(X),r(X,Y),b(Y).
dpal/o_transforms.lp:4:11: X
dpal/o_transforms.lp:4:19: Y

Why are X and Y considered unsafe since they both occur in the positive body of the rule?
This is in contrast with what potasco guide says "gringo expects rules to be safe, i.e., all variables that appear in a rule have to appear in some positive literal (a literal not preceded by not) in the body".

In summary - its not clear to us if this is as a result of user error or a problem with oclingo, but if the former, then could the error message be improved to better identify the problem ?

Files cp_base.lp and o_transforms.lp attached.

2 Attachments


  • Roland Kaminski

    Roland Kaminski - 2013-08-29
    • assigned_to: Philipp Obermeier
  • Roland Kaminski

    Roland Kaminski - 2014-04-24
    • status: open --> wont-fix
  • Roland Kaminski

    Roland Kaminski - 2014-04-24

    oclingo development is discontinued - please switch to clingo-4


Log in to post a comment.