In Clingo guide, there are two modes called cautious and brave introduced as the follows:
brave Compute the brave consequences (union of all answer sets) of a logic program.
cautious Compute the cautious consequences (intersection of all answer sets) of a logic program.
No more information is provided in the guide. I tried some examples and have trouble understanding the issue.
I tried to run the following simple ASP program:
p :- not q.
q :- not p.
Running Clingo with no mode parameter will give the right answer sets:
answer 1:{p}
answer 2:{q}
As described in the guide, if run under brave mode, which will compute union of all answer sets, I should get the result {p, q}
.
Similarly, for cautious case, empty result is expected.
However, the actual result for brave reasoning by Clingo is:
clingo version 5.3.0
Reading from test/cautious_reasoning.lp
Solving...
Answer: 1
q
Consequences: [1;2]
Answer: 2
q p
Consequences: [2;2]
SATISFIABLE
Models : 2
Brave : yes
Consequences : 2
Calls : 1
Time : 0.006s (Solving: 0.00s 1st Model: 0.00s Unsat: 0.00s)
CPU Time : 0.002s
And for the cautious case:
clingo version 5.3.0
Reading from test/cautious_reasoning.lp
Solving...
Answer: 1
q
Consequences: [0;1]
Answer: 2
Consequences: [0;0]
SATISFIABLE
Models : 2
Cautious : yes
Consequences : 0
Calls : 1
Time : 0.001s (Solving: 0.00s 1st Model: 0.00s Unsat: 0.00s)
CPU Time : 0.001s
So what does the numbers in []
represent? How to understand the cautious and brave reasoning mode in Clingo?