-
Notifications
You must be signed in to change notification settings - Fork 0
/
defeas.tex
35 lines (29 loc) · 1.61 KB
/
defeas.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Another weakness of vanilla logic programming is its inability to easily
reason about exceptions to rules. A simple example is when determining
whether or not a room is well-lit. By default, a room is lit, unless the
lights are out, unless the player has a flashlight, unless the flashlight
broke, unless the player fixed it...the list goes on and on.
Some of these are subsumed by linear logic, but linear logic still does not
provide a general account of writing rules and their exceptions. For this,
we need a different logic, called defeasible
logic~\cite{Nute:1994:DL:186124.186131,Covington:1996:PPD:230996}, which
innately allows reasoning about exceptions to rules.
For example, suppose we have a simpler case of the above example, in which a
room is lit by default, unless the lights are out, unless the player has a
flashlight. We could write this in d-Prolog as follows:
\begin{verbatim}
RD : {isRoom(X)} => lit(X).
RL : dark(X) => ~lit(X).
RF : {inRoom(X), has(flashlight)} => lit(X).
RF > RL.
RL > RD.
\end{verbatim}
\noindent
Each of the three rules indicates one of these cases. In addition to the
rules themselves, we define an ordering on the rules stating their
precedence. Intuitively, the lights being out in a room override their
default illuminated status, and having a flashlight should illuminate the
room even if the lights are out. Defeasible logic is a clean and elegant way
of specifying rules such as these (and more complicated ones). It remains to
be seen whether or not it would be subsumed by linear logic, but either way,
this is a use case that we want to understand more thoroughly.