Skip to content

Bug solving disjunctive program #91

Closed
@rkaminsk

Description

I managed to produce this rather small program where clasp gobbles answer sets:

a; na.
x; y; z; b; c :- a.
a :- b.
a :- c.

It should provide 6 answer sets (as can be verified for example with cmodels). Interestingly, changing a; na. into a choice rule produces the right results.

A corresponding aspif program is

asp 1 0 0
1 0 2 1 2 0 0
1 0 5 3 4 5 6 7 0 1 1
1 0 1 1 0 1 6
1 0 1 1 0 1 7
4 1 a 1 1
4 2 na 1 2
4 1 x 1 3
4 1 y 1 4
4 1 z 1 5
4 1 b 1 6
4 1 c 1 7
0

It should have the following answer sets:

➜ gringo --output=smodels bug.lp | cmodels 0                  
cmodels version 3.86 Reading...done
Passed this pointProgram is not tight.
Program is Disjunctive.
Program is not HCF.
Calling SAT solver Minisat 2.0 beta ...
Answer: 1 
 Answer set: a y 
Answer: 2 
 Answer set: na 
Answer: 3 
 Answer set: a x 
Answer: 4 
 Answer set: a z 
Answer: 5 
 Answer set: a c 
Answer: 6 
 Answer set: a b 
Number of loops 0

Fixing this problem, would hopefully also resolve the issue reported here: potassco/clingo#425.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions