Content uploaded by Ilkka Niemelä
Author content
All content in this area was uploaded by Ilkka Niemelä
Content may be subject to copyright.
Towards Efficient Default Reasoning
Ilkka Niemela
Department of Computer Science
Helsinki University of Technology
Otakaari 1, FIN-02150 Espoo, Finland
Ilkka.NiemelaQhut.fi
Abstract
A decision method for Reiter's default logic is
developed. It can determine whether a default
theory has an extension, whether a formula is in
some extension of a default theory and whether
a formula is in every extension of a default the-
ory. The method handles full propositional de-
fault logic. It can be implemented to work in
polynomial space and by using only a theorem
prover for the underlying propositional logic as
a subroutine. The method divides default rea-
soning into two major subtasks: the search task
of examining every alternative for extensions,
which is solved by backtracking search, and the
classical reasoning task, which can be imple-
mented by a theorem prover for the underly-
ing classical logic. Special emphasis is given to
the search problem. The decision method em-
ploys a new compact representation of exten-
sions which reduces the search space. Efficient
techniques for pruning the search space further
are developed.
1 Introduction
In this paper we develop a theorem-proving method for
default logic of Reiter [1980]. Default logic is one of
the most well-known nonmonotonic logics [Marek and
Truszczyriski, 1993]. There is a body of results indicat-
ing that default logic captures a large number of different
forms of nonmonotonic reasoning. Default logic is closely
related to logic programs and deductive databases [Gel-
fond and Lifschitz, 1990). Connections have been es-
tablished between default logic and autoepistemic logic
and McDermott and Doyle style nonmonotonic modal
logics [Konolige, 1988; Truszczyiiski, 1991], circumscrip-
tion [Etherington, 1987], diagnosis [Reiter, 1987], and
abductive reasoning [Poole, 1988].
In default logic knowledge is represented by a default
theory, which consists of ordinary first-order formulae
and nonmonotonic inference rules, default rules. Possi-
ble sets of conclusions from a default theory are defined
in terms of extensions of the default theory. In this pa-
per we consider three basic reasoning tasks: extension
existence (whether a default theory has an extension),
brave reasoning (whether a formula is in some extension
of a default theory) and cautious reasoning (whether a
formula belongs to every extension of a default theory).
Computational properties of nonmonotonic reason-
ing have received considerable attention. This research
provides a valuable basis for developing nonmonotonic
theorem-proving techniques. The complexity of proposi-
tional default reasoning has been located at the second
level of the polynomial time hierarchy [Garey and John-
son, 1979]: extension existence and brave reasoning are
Ep/2-complete and cautious reasoning Ilp/2-complete [Got-
tlob, 1992]. This means that full propositional default
logic can be implemented in polynomial space and that
it is strictly harder than propositional reasoning unless
the polynomial time hierarchy collapses.
Developing theorem-proving techniques for default
logic and other nonmonotonic logics has turned out to be
difficult. Existing techniques are quite straightforward
and little emphasis has been laid on efficiency consider-
ations. For example, in recent approaches [Junker and
Konolige, 1990; Risch and Schwind, 1994; Baader and
Hollunder, 1992] to automating default logic exponen-
tial space is needed or the methods are based on solving
subtasks that seem to be computationally harder than
the original default reasoning task.
We consider first approaches where a reasoning prob-
lem in default logic is reduced into another problem like a
truth maintenance problem [Junker and Konolige, 1990]
or a constraint satisfaction problem [Ben-Eliyahu and
Dechter, 1991]. A crucial feature of the reduction map-
pings is that classical deductions needed in default rea-
soning have to be encoded. This implies that reductions
are computationally feasible only for very restricted sub-
classes of default logic. Typically, the reductions lead to
an exponential increase in the problem size because of
the exponential number of deductions to be encoded.
Moreover, computing the reduction mapping appears to
be harder than the original default reasoning problem.
This is because even the problem of finding a single de-
duction, (i.e., a proof of a given formula from a set of for-
mulae) is closely related to logic-based abduction, which
is p/2-complete [Eiter and Gottlob, 1992]. For a more
detailed discussion, see [Niemela, 1994].
Risch and Schwind [1994] propose a tableau-based
method for finding extensions. Also this approach suf-
312 AUTOMATED REASONING
c
fers from the problem of exponential worst-case space
complexity. Baader and Hollunder [1992] present an ap-
proach to generate all extensions of a default theory by
pruning defaults in a top-down way. When eliminating
defaults, this method uses heavily a subroutine comput-
ing all maximal consistent subsets, i.e., given sets E and
H the subroutine is expected to find all maximal sub-
sets H' of H such that E U H' is consistent. It seems
that finding all such maximal subsets is computationally
expensive and at least as hard as the decision problems
in default logic. This is because, for example, finding
a maximal subset not containing a given formula in
is closely related to logic-based abduction. To see this
consider a maximal subset H' C H for which E U H1 is
consistent but ip € H - H''. Hence, EuFu {ifi} is not
consistent which implies that -^ is a logical consequence
of Ell//7, i.e. H' is an abductive explanation of from
the hypotheses H and the background theory E.
In this paper we develop a decision method for de-
fault logic that handles important subclasses of default
reasoning (i.e., the full propositional case as well as
closed default rules together with a decidable fragment
of the underlying first-order logic) but does not suffer
from the two problems: (i) exponential space require-
ments and (ii) the use of computationally too difficult
subtasks as a part of the method. As a basis of the
work we have taken a decision method for autoepistemic
logic presented in [NiemelSL, 1994] because this approach
satisfies the two requirements. As autoepistemic logic
and default logic are closely related [Konolige, 1988;
Niemela, 1992], the approach is directly applicable to
default logic. However, there seems to be some room
for improvements. In this paper we take the basic ideas
from |Niemela, 1994] and apply them directly to default
logic in order to fully exploit the special characteristics
of default reasoning.
The paper is organized as follows. Section 2 intro-
duces default logic and develops a concise representa-
tion of extensions. This representation is based on ideas
from autoepistemic reasoning and it forms the basis for
the decision method. Section 3 develops a basic algo-
rithm for default reasoning. It provides a framework for
integrating optimization techniques. Section 4 presents
optimizations of the basic algorithm and Section 5 con-
tains the concluding remarks.
2 Default Logic
We are going to use intuitions from autoepistemic rea-
soning and to facilitate this we employ somewhat non-
standard notations for default logic. First, we introduce
a new operator nb(): nb(0) expresses that a formula <fi
is "not believed", i.e. <j> does not belong to the extension
in question. Second, we write default rules using the new
operator. A default rale is an expression of the form
ai,...,an,nb(6i),...,nb(6m) *-♦ c (1)
where a\,..., an, b\,..., 6m, c are arbitrary (first-order)
formulae. This is just an alternative notation for a de-
fault rule in the standard form
ai A • • • A an : -»6i,..., -»6m
A default theory is a set of default rules of the form
(1). In Reiter's [1980] original presentation a default the-
ory can contain ordinary first-order formulae in addition
to default rules. Here for uniformity the first-order for-
mulae are represented as default rules, i.e., a first-order
formula <p is represented as a rule <—► </>.
A default rule of the form (1) can be thought of as
representing an autoepistemic formula
La\ A • • • A Lan A L-^Lbx A • • • A L->Lbm —► c.
Under this translation, proposed by Truszczyriski [1991],
an extension of a default theory is the L free part of an L-
hierarchic expansion of the translated theory [Niemela,
1992] or the L free part of a consistent ^-expansion of
the translated theory for a range of nonmonotonic modal
logics S [Truszczynski, 1991]. Hence default rules of
the form (1) provide an interesting "standard" form of
autoepistemic formulae.
Next we give the definition of an extension of a default
theory. Technically our definition is somewhat different
from that given by Reiter [1980] but it leads to the same
class of extensions. The definition is given by using the
notions of a deductive closure and NB-formuiae.
We call NB-formulae expressions of the form nb(</>)
where 0 is a formula. For a set of formulae 5, nb(5) =
{nb(4>) | 4> G S}. By S+ (5") we denote set of
formulae (NB-formulae) in S. For example, if S -
{a,nb(6),nb(c)}, S+ = {a} and S' - {nb(6),nb(c)}.
We denote by Dcl(E, L) the deductive closure of a set
of rules E of the form (1) and a set of formulae and NB-
formulae L. Dcl(E,L) is the smallest set of formulae
which contains L^ and which is closed under E' and
first-order derivations where
E' = {ai,...,an <->c |
ai,... ,an,nb(6i),... ,nb(6m) «-► c € E
and for allz = 1,... ,m,nb(&i) £ L~~}. (2)
For example, let E — {nb(p) <—► q; -i-ig c—► ->->r} and
L = \p,nb(p)}. Then E' - {<-+ q; -i-ng t-* -»-«r} and
Dcl(E,L) - Th({p,g,-«-ir}) where Th(S') denotes the
set of the first-order consequences of a set of formulae S.
This means that, e.g., r G Dcl(E, {p, nb(p)}).
Notice that the deductive closure is a monotonic oper-
ator also with respect to the premises L: if L C U, then
Dcl(E,L)CDcl(E,L').
For a set of rules E, a set of formulae A is called an
extension of E iff A - Dcl(E,nb(A)) where A is the
complement of A, i.e., the formulae not in A.
We develop a compact characterizing condition for ex-
tensions. The formulae that occur inside the nb() oper-
ator play a crucial role. For a set of rules E, we denote
by NAnt(E) the negative antecedents in E, i.e., the set of
formulae b such that nb(6) appears in E. For example,
NAnt({nb(p) «-+ q; ^q «-♦ -«^r}) = {p}. The follow-
ing proposition makes the role of NAnt(E) evident. It
is based on the observation that for the deductive clo-
sure of a set of rules only the NB-formulae appearing
in the rules are of importance, i.e., Dcl(E,nb(A)) =
Dcl(E,nb(NAnt(E)-A)).
Proposition 2.1 For a set of rules E, a set of formulae
A i'5 an extension o/S t/fA = Dcl(E,nb(NAnt(E)-A)).
NIEMELA 313
The situation is similar to that in autoepistemic logic
where a stable expansion is uniquely determined by
the modal subformulae in the premises [Niemela, 1990],
For characterizing extensions, we are able to use ideas
from the full set based characterization of stable expan-
sions [Niemela, 1990]. The novelty here is that we exploit
the strong groundedness of extensions which implies that
ordinary formulae appearing as antecedents of rules (pre-
requisites) do not play a role in determining extensions
and only NB-formulae (justifications) are essential.
Our aim is to provide a compact characterizing set
for each extension. The characterizing sets are called
full sets and they are sets of NB-formulae built from
formulae in NAnt
Definition 2.2 For a set of rules a set of NB-
formulae is called -full iff the following condition holds
for all
For example, let = {nb{p) p).
Then (nb(p)} is _ full, because {nb(p)}) and
but, e.g., " is not -full, as p E
. It turns out that for every full set there is
an extension and for each extension a corresponding full
set.
Theorem 2.3 Let be a set of rules.
(i) If a set is an extension of .
(ii) If there is an extension of , then —
nb is a-full set such that—
Theorem 2.3 suggests the following straightforward
method for finding all extensions. For each subset S
of J, test whether nb(5) is . If a full set A
is found, is an extension of by Theorem 2.3
(i) and by Theorem 2.3 (ii) for each extension ' there is
a corresponding full set A such that A).
Example 2.1 The straightforward method is not very
practical. If there are n NB-formulae in fullness
tests are needed although there can be a single extension
which is easily constructible as the following set of rules
shows.
There are 2n candidates for sets but only one
full set This can be seen by the following ar-
gument. For any set which implies
. Hence nb(a1) cannot belong to any
full set neither can nb(a-2) and so on. ■
314 AUTOMATED REASONING
3 The Basic Algorithm
In this section we develop a basic algorithm for solv-
ing default reasoning problems. The basic algorithm
serves as a framework for developing further optimiza-
tion methods, which are discussed in the next section.
The algorithm is based on ideas introduced in [Niemela,
1994] in the context of autoepistemic reasoning. The
algorithm presented in Figure 1 is given as a function
extensionsDL that is the skeleton for the decision pro-
cedures for brave and cautious reasoning as well as for
checking the existence of extensions.
When describing the algorithm we use the following
three concepts.
(i) A set of formulae and NB-formulae A is grounded
in a set of rules For example,
and {b, nb(a)} are grounded in
is not.
(ii) We say that a set of formulae S agrees with a set of
formulae and NB-formulae A if for all formulae ,
nellset E S and for all . For example, the
set {a, b] agrees with but not with
(iii) A set of formulae and NB-formulae A covers a
formula 0 if either For example,
the set {nb(a), b) covers a. A set of formulae S is covered
by A if each formula in S is covered by A.
The function extensionsDL takes as input a set of rules
sets B and F which determine the common part of
the extensions to be considered and a formula , which is
just passed as an argument to the function test. The aim
of extensionsDL is to return true iff there is an extension
of agreeing with BUF such that test returns
true. This is accomplished by constructing sets
agreeing with B U F until a full set A is found such
that for the corresponding extension = ,
testi returns true.
We represent a partially constructed full set using the
set B that contains NB-formulae and ordinary formulae.
The NB-formulae B~ are the formulae included in the
partially constructed full set. An ordinary formula X in
B indicates that the corresponding NB-formula nb(x)
cannot be included in the full set. The idea is to expand
B until it forms a full set. The number of possibilities
can be reduced by observing that if a formula is grounded
in the rules given the partially constructed full set
cannot be included in
the full set and X is added to B. The set F contains
formulae for which nb(x) is excluded from the full set
to be constructed (and x should be included in B), but
which are "frozen": is added to B only when the
groundedness condition is satisfied, i.e.,
The function extensionsDL uses three functions
• expand (for expanding B)
• conflict (for detecting conflicts), and
• test (for testing extensions).
By changing the function test the various decision proce-
dures are obtained. For the first two functions we present
minimal requirements (E1-E4, C1-C2) that the imple-
mentations of these functions have to satisfy in order to
guarantee the soundness and completeness of the deci-
sion procedures. These two functions form the crucial
Figure 1: The Skeleton for the Decision Procedures for
Default Logic
points in the algorithm where optimization techniques
can be applied. In the next section such optimization
methods are developed.
We first introduce the requirements on the functions
expand and conflict and then explain their role in guar-
anteeing the correctness of extensionsDL- The func-
tion expand is assumed to fulfill the following conditions
where
El:
E2: If B is grounded in then is grounded in
E3: If there is an extension such that agrees
with
E4: For implies that
X is covered by
The function conflict returns either true or false and
satisfies the following conditions.
i returns true if for some nb(x)
C2: If conflict returns true, then there exists
no extension such that agrees with BUF.
The function extensionsDL starts by expanding cau-
tiously the set B. In order to ensure the correctness
of the decision procedures we must insist that the ex-
pansion = expand extends B (El) in such
a way that groundedness is preserved (E2) and that no
extensions agreeing with B U F are lost (E3). To pre-
serve completeness we have to require that each formula
in that is grounded but not already covered by
B is included in B (E4). Then a conflict test is per-
formed. Here it must be the case that all direct conflicts
are detected (CI) and if a conflict is reported, then there
is no extension agreeing with BUF (C2). If there are
no conflicts and BU F covers every NB-formula in the
premises, then the status of frozen formulae F is exam-
ined. If all of them have been included in B, B~ is a
4 Optimizations
The basic algorithm divides default reasoning into two
major subtasks. One is the search problem of examin-
ing all the alternatives for full sets. This is implemented
using (chronological) backtracking and in the worst case
the algorithm can search through alternatives where n
is the number of different NB-formulae in the premises.
The other is the classical reasoning problem of decid-
ing whether a formula is in the deductive closure of a
set of rules given some formulae (and NB-formulae)
as premises holds. The
membership in the deductive closure is needed in the
functions expand and conflict.
The two difficult tasks are in accordance with the re-
cent results on the complexity of default reasoning show-
ing that default reasoning is a complete problem with
respect to the second level of the polynomial time hi-
erarchy [Gottlob, 1992]. The result implies that there
are two orthogonal sources of complexity in default rea-
soning, too. This suggests that we have not introduced
additional sources of computational complexity in the
basic algorithm.
In this section we present optimization techniques
which lead to more efficient methods for solving the two
subtasks. As there is quite a lot of research on classical
reasoning, the emphasis is on the search problem. But
before moving to it we make a couple of remarks about
the classical reasoning problem.
• First, notice that the classical reasoning problem is
reducible to deciding logical consequence for the un-
derlying (first-order) logic. Testing the membership
in the deductive closure of a set of n rules can be
implemented using at most tests for logical con-
sequence in the following way. First construct the
set of rules (2). Then apply rules in until no
new rule fires as follows.
repeat
For the resulting
• Second, the tests for the membership in the deduc-
tive closure have a very regular pattern where the
set of premises gradually grows. This pattern can
be exploited.
• Third, when dealing with a large set of rules, it is
important to develop methods for testing the mem-
bership in the closure in a goal-directed way so that
only a relevant subset of rules is used.
Now we turn to the search problem. The poten-
tial search space is exponential and even for a set of
rules with 50 different NB-formulae, its size is over 1015.
Hence it is essential that the search space is pruned effec-
tively. In extensionsDL the functions expand and conflict
handle the pruning of the search space.
Expanding B
The function expand extends the current common part
B of the full sets to be constructed. The more formulae
are added, the fewer choice points for backtracking are
left; every new formula included to B cuts the remaining
search space by half.
Although the implementation E-IO can reduce the
search dramatically like in the case of Example 2.1, its
basic weakness is that it cannot detect when a formula
cannot be in an extension. An optimized version of the
implementation should be able to detect simple case like
316 AUTOMATED REASONING
5 Conclusions
In this paper we develop a decision method for default
logic which solves the extension existence problem as well
as the brave and cautious reasoning problems. It handles
the full propositional case and the first-order subclasses
of default theories with closed default rules and a de-
cidable fragment of the underlying first-order logic. The
method differs from other recent approaches [Junker and
Konolige, 1990; Risch and Schwind, 1994; Baader and
Hollunder, 1992] to automating default logic in two ma-
jor respects: (i) in the propositional case it can be im-
plemented in polynomial space and (ii) it does not rely
on solutions of subtasks which appear to be computa-
tionally harder than the original default reasoning prob-
lem. The method partitions default reasoning into two
major subtasks: the search problem of examining every
alternative for extensions, which is solved by backtrack-
ing search, and the classical reasoning task, which can
be implemented by a theorem prover for the underlying
classical logic. Special emphasis is given to the search
problem. The method employs a new compact charac-
terization of extensions based on considering only the
justifications of the rules. This reduces the search space
for alternatives for extensions. Techniques for pruning
the search space are developed. Initial experiments in-
dicate that using the implementations E-Il and C-Il of
NIEMELA 317
expand and conflict the search space is often kept rel-
atively small and we have been able to handle default
theories with a few hundred default rules.
The method developed in this paper is closely re-
lated to that presented in [Niemela, 1994] for autoepis-
temic reasoning. The key difference is that the novel
method uses the new compact characterization of ex-
tensions which leads to a smaller initial search space.
We exploit the strong groundedness of default exten-
sions which implies that extensions are determined by
the justifications of the default rules, while in the earlier
approach [Niemela, 1994] both prerequisites and justi-
fications of the default rules are employed in the char-
acterization. Optimization techniques that prune the
search space are discussed already in [Niemela, 1994).
The technique of expanding the set B (E-Il) is proposed
in [Niemela, 1994] but the conflict detection method
(C-Il) is novel.
There are interesting areas for further research. The
decision method in this paper uses heavily classical rea-
soning for pruning the search space. This implies that
the development of efficient theorem-proving techniques
for implementing the needed classical reasoning in a goal-
directed way is important. The potential search space
is very large and further work is needed for developing
new pruning techniques. The basic algorithm with the
requirements for the functions expand and conflict offers
a framework for developing these kinds of optimizations.
The decision method can be used in a goal-directed man-
ner by initializing the sets B and F accordingly. For
example, if we are interested in extensions containing p
but not q, we can start the method with B = {nb(q)}
and F - {p}. An interesting topic for further research
is to develop goal-directed techniques where a default
reasoning task is analyzed and divided to appropriate
subtasks. In the method there is a heuristic choice when
a new formula X € NAnt(E) not covered by B U F is
selected. A further area of study is the development of
efficient search heuristics.
References
[Baader and Hollunder, 1992] F. Baader and B. Hollun-
der. Embedding defaults into terminological knowl-
edge representation formalisms. In Proceedings of the
3rd International Conference on Principles of Knowl-
edge Representation and Reasoning, pages 306-317,
Cambridge, MA, USA, October 1992. Morgan Kauf-
mann Publishers.
[Ben-Eliyahu and Dechter, 1991] R. Ben-Eliyahu and
R. Dechter. Default logic, propositional logic and
constraints. In Proceedings of the 9th National Con-
ference on Artificial Intelligence, pages 370-385. The
MIT Press, July 1991.
[Eiter and Gottlob, 1992] T. Eiter and G. Gottlob. The
complexity of logic-based abduction. Technical Report
CD-TR 92/35, Christian Doppler Labor fur Experten-
systeme, Institut fur Informationssysteme, Technische
Universitat Wien, Vienna, Austria, July 1992.
[Etherington, 1987] D.W. Etherington. Relating default
logic and circumscription. In Proceedings of the 10th
International Joint Conference on Artificial Intelli-
gence, pages 489-494, Milan, Italy, August 1987. Mor-
gan Kaufmann Publishers.
[Garey and Johnson, 1979] M.R. Garey and D.S. John-
son. Computers and Intractability. W.H. Freeman and
Company, San Francisco, 1979.
[Gelfond and Lifschitz, 1990] M. Gelfond and V. Lifs-
chitz. Logic programs with classical negation. In Pro-
ceedings of the 7th International Conference on Logic
Programming, pages 579-597, Jerusalem, Israel, June
1990. The MIT Press.
[Gottlob, 1992] G. Gottlob. Complexity results for non-
monotonic logics. Journal of Logic and Computation,
2(3):397-425, June 1992.
[Junker and Konolige, 1990] U. Junker and K. Konolige.
Computing the extensions of autoepistemic and
fault logics with a truth maintenance system. In Pro-
ceedings of the 8th National Conference on Artificial
Intelligence, pages 278-283, Boston, MA, USA, July
1990. The MIT Press.
[Konolige, 1988] K. Konolige. On the relation between
default and autoepistemic logic. Artificial Intelligence,
35:343-382, 1988.
[Marek and Truszczyriski, 1993] W. Marek
and M. Truszczyriski. Nonmonotonic Logic: Context-
Dependent Reasoning. Springer-Verlag, Berlin, 1993.
[Niemela, 1990] I. Niemela. Towards automatic au-
toepistemic reasoning. In Proceedings of the Euro-
pean Workshop on Logics in Artificial Intelligence—
JELIA '90, pages 428-443, Amsterdam, The Nether-
lands, September 1990. Springer-Verlag.
[Niemela, 1992] I. Niemela. A unifying framework for
nonmonotonic reasoning. In Proceedings of the 10th
European Conference on Artificial Intelligence, pages
334-338, Vienna, Austria, August 1992. John Wiley.
[Niemela, 1994] I. Niemela. A decision method for non-
monotonic reasoning based on autoepistemic reason-
ing. In Proceedings of the 4th International Conference
on Principles of Knowledge Representation and Rea-
soning, pages 473-484, Bonn, Germany, May 1994.
Morgan Kaufmann Publishers.
[Poole, 1988] D. Poole. A logical framework for default
reasoning. Artificial Intelligence, 36:27-47, 1988.
[Reiter, 1980] R. Reiter. A logic for default reasoning.
Artificial Intelligence, 13:81-132, 1980.
[Reiter, 1987] R. Reiter. A theory of diagnosis from first
principles. Artificial Intelligence, 32:57-95, 1987.
[Risch and Schwind, 1994] V. Risch and C. Schwind.
Tableau-based characterization and theorem proving
for default logic. Journal of Automated Reasoning,
13:223-242, 1994.
[Truszczyriski, 1991] M. Truszczyriski. Embedding de-
fault logic into modal nonmonotonic logics. In Pro-
ceedings of the 1st International Workshop on Logic
Programming and Non-monotonic Reasoning, pages
151-165, Washington, D.C., USA, July 1991. The
MIT Press.
318 AUTOMATED REASONING