Skip to content

Unexpected behaviour with incremental solving #98

Closed
@marklaw

Description

Hi,

I'm getting some strange behaviour with both version 5.6.2 and the head of master. This is a simplified version of something automatically generated by our system, so apologies if the program looks a bit weird.

#program base.
#show n/1.
{ n(0..4)}.

c :- not n(3).

e1 :- not n(1).
e2 :- not n(2).

:- not n(0); not n(4).
:- e1; not n(3).
:- not n(4); e2. 

#program prg_1.

a :- e1, e2. 
:- not a.

#script (python).

def main(prg):
  prg.ground([("base", [])])
  print(prg.solve())
  prg.ground([("prg_1", [])])
  print(prg.solve())
#end.

If I take out the first solve (i.e. ground both programs and then solve), Clingo gives the expected solution. If I run it as above, Clingo returns unsatisfiable the second time. Is there something I'm missing, or is this a bug?

Thanks,

Mark

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions