#53 interplay between oclingo's #external and #forget statements

v1.x
wont-fix
oclingo (12)
5
2014-04-24
2011-12-22
Martin Gebser
No

Dear all,

I was trying to use the new statement "#forget <t> : <n>." on the encoding side, and experienced varying answers w.r.t. different ways of writing "#external" statements. Please find a small example attached that should trigger the unintented behavior. In the encoding, the following lines are of interest:

external p(a,t+1).

% #external p(X,t+1) : q(X).

forget t : t-2.

Running the encoding with oclingo and the attached stream file with the controller gives the intended answer set in the second step:

B. pp q(a)
2. p(a,2)
3. p(a,3)

The following encoding lines should be equivalent:

% #external p(a,t+1).

external p(X,t+1) : q(X).

forget t : t-2.

However, for some reason a different (non) answer set is now obtained in the second step:

B. q(a)
2. p(a,2)
3. p(a,3)

To reobtain the first (intended) answer set, one can use the following:

% #external p(a,t+1).

external p(X,t+1) : q(X).

% #forget t : t-2.

The varying behavior w.r.t. encoding syntax details is quite miraculous.

Thanks for investigating the cause of this,
Martin

Discussion

  • Martin Gebser
    Martin Gebser
    2011-12-22

    oclingo forget.lp 0 + controller.py forget.str

     
    Attachments
    • assigned_to: rkaminski --> Philipp Obermeier
    • Group: --> v1.x
     
    • status: open --> wont-fix
     
  • oclingo development is discontinued - please switch to clingo-4