I have a question regarding Answer Set Programming on how to make an existing fact invalid, when there is already (also) a default statement present in the Knowledge Base.
For example, there are two persons seby
and andy
, one of them is able to drive at once. The scenario can be that seby
can drive as seen in Line 3 but let's say, after his license is cancelled he cannot drive anymore, hence we now have Lines 4 to 7 and meanwhile andy
learnt driving, as seen in Line 7. Line 6 shows only one person can drive at a time, besides showing seby
and andy
are not the same.
1 person(seby). 2 person(andy). 3 drives(seby). 4 drives(seby) :- person(seby), not ab(d(drives(seby))), not -drives(seby). 5 ab(d(drives(seby))). 6 -drives(P) :- drives(P0), person(P), P0 != P. 7 drives(andy).
In the above program, Lines 3 and 4 contradict with each other, and the Clingo solver (which I use) obviously outputs UNSATISFIABLE
.
Having said all these, deleting Line 3 and getting the problem solved is not what I'm epecting. The intention behind asking this question is to know whether it is possible now to make Line 3 somehow invalid to let Line 4 do its duty.
However, Line 4 can also be written as:
4 drives(P) :- person(P), not ab(d(drives(P))), not -drives(P).
Thanks a lot in advance.