#58 strange grounding for volatile when forgets used in encoding

v3.x
wont-fix
oclingo (12)
5
2014-04-24
2012-01-03
orko
No

Hi,

I just found out when the forget statement is used in the encoding, a rule in the volatile (volatile-k) part is grounded incorrectly.

Here is a simple program:

iinit -1.

base.

{ basep(1..2,0..2) }.

cumulative t.

external ext(1..2,t) : t>0.

forget t : t-1.

volatile t:3.

:- basep(P,(t+3) #mod 3), not ext(P,t).

When you ground with oclingo -t --ifixed=1 simple.lp :

{basep(1,0),basep(1,1),basep(1,2),basep(2,0),basep(2,1),basep(2,2)}.

forget -2.

:-basep(2,2).
:-basep(1,2).

forget -1.

:-basep(2,0).

external ext(1,1).

external ext(2,1).

forget 0.

:-basep(2,1),not ext(2,1).
:-basep(1,1),not ext(1,1).

The constraint :- basep(1,0). is not generated at t=0. When you comment out the forget statement, oclingo generates this constraint.

Thanks,
-orkunt.

Discussion

    • assigned_to: rkaminski --> Philipp Obermeier
     
  • oclingo development is discontinued - please switch to clingo-4

     
    • status: open --> wont-fix