A

advertisement
From: AAAI-84 Proceedings. Copyright ©1984, AAAI (www.aaai.org). All rights reserved.
A MECHANICAL SOLUTION
OF SCHUBERT'S
STEAMROLLER
BY MANY-SORTED
RESOLUTION
Christoph Walther
Institut fiir Informatik
UNIVERSITET
I
KARLSRUHE
Postfach 6380
1
D-7500 Karlsruhe
we obtain the following set of clauses as
Abstract We demonstrate
the advantage of using a
many-sorted
resolution
calculus by a mechanical
solution of a challenge problem. This problem known
as "Schubert's
Steamroller"
had been unsolved by
automated theorem provers until now. Our solution
clearly demonstrates
the power of a many-sorted
resolution
calculus. The proposed method is applicable to all resolution-based
inference systems.
1,
SCHUBERT'S
In 1978,
a predicate
(1)IWh)l
(2){F(f))
(2){B(b))
!4)fC(cj
1
(5) {S(s) 1
(6; iG(q) 1
(7)tik,)
of the University
of the prob-
lem:
PROBLEM
L. Schubert
logic formulation
(8){Fby ),A(Xj)1
,A(x,))
(lO){~(xl),A(xl))
(9)thq) ,A(x,)1
of
(12)G(x,),P(x1)3
(ll)C%x,),A(x,))
Alberta set up the following challenge
(13)rA(x,),P(x2),A(x3),P(xq)
problem:
,E(x1x2),M[x3xl),
E (x3x4) $3 (x,x3) 1
Wolves, foxes, birds, caterpillars, and
snails are animals, and there are someof
each of them. Also there are some grains,
and grains are plants. Every animaleither
likes to eat all plants or all animals
much smaller than itself that like to eat
some plants. Caterpillars and snails are
much smaller than birds, which are much
smaller than foxes, which in turn are
much smaller than wolves. Wolves do not
like to eat foxes or grains, while birds
like to eat caterpillars but not snails.
Caterpillars and snails like to eat some
plants. Therefore there is an animal that
likes to eat a grain-eating animal.
(14)+%x,),B(x2),M(x,x2)!
(15)i~(x,),~(x,),M(x,x2))
(16)Ih,)
,M(x1x2) 1 (17)@(xl)
@(x2) ,M(x,x2))
(19)~~(x,),W(x2),~(x2x~)~
(20){B(x,),~(x2),E(x1x2)}
(21)~~(x,),s(x2),~(xlx2)~
(22) Ih,)
(23)cCk+
,P(h(xl)
11
(24)IS(x1),P(i(xl))J
,E(xlh(xl))3
(25)Cs(x,)
,E(xli(xl)
))
(26) 6(x-,),x(x2) ,G(j (x,x,) )1
(27) G(x,)
,%x2) ,E
it turned
(x1x2),E(x2j (x1x2) 1)
where w,f,b,c,s
and g are skolemconstants,
x1,x2,x3
are universally
and
variables
This problem became well known since in
spite of its apparent simplicity
&x2)
(18)~~(x,),~(x,),~(x,x1))
Figure
~4
quantified
and h, i and j are skolemfunctions.
2.1
out to be too hard for existing theorem
Schubert's problem in clause
notation
provers because the search space is just
In the fall of 1978
too big.
L. Schubert spend his
sabbatical at the University of Karlsruhe
Using the following predicates
as an
and a first-order
abbreviation:
A(x) -xisananimal
Procedure
W(x) - x is a wolf
Refutation
F(x) - x is a fox
B(x) - x is a bird
resolution-based
C(x) - x is a caterpillar
S(x) - xis a snail
under development
p (xl - xis aplant
Karlsruhe.
GM
- xisagrain
axiomatization
of his
Problem was given to the Markgraf
Karl
(MKRP) CBES811, a
automated theorem prover
at the University
The system generated
of
the clause
M(xy)-x is much smallerthan y
set of figure 1.1, but failed to find a
E(xy)-x likes to eaty
refutation.
330
Though several significant
improvements
MKRP-system
have been incorporated
cidentally,
into the
during the last six years, it is
still unable to find a refutation
enables a human to find a
solution: Given a many-sorted
of the
universe,
which consists of sorts of objects like
above clause set today. The same is true for
wolves, animals, grains, plants etc. and
all the other automated theorem provers we
certain relations
between these objects,
know about, which were confronted with this
e.g. wolves are animals and grains are
problem. But there exists a refutation
plants, everything
asit
which is true foranimals
can be seen from Schubert's hand computed
(or plants), automatically
deduction of the empty clause
(or grains respectively).
CSch78,Wa184al
Looking at the clause set of figure 1.1
the handcomputed
refutation
and
we talk about the preferences
of the problem,
the reason for the difficulties
of anauto-
ences of a22 objects, which satisfy "is a
wolf" and "is a grain".
ion become apparent:
can compute
102
Hence a many-sorted
distinct clauses,
of woZves of
eating grains and not about these prefer-
mated theorem prover in computing a solut-
*The size of the initial search space
holds for wolves
In this scenario
(we
first-order
calculus
more suitable for a formalization
Schubert's problem.
94 re-
is
of
In such a calculus the
solvents and 8 factors already inthefirst
domains and ranges of functions, predicates
generation)
and variables
and
*the search depth necessary
to compute the
empty clause
(which is 20 in Schubert's
handcomputed
solution)
are restricted
sets of the universe
hierarchy
of sorts)
where these restrictions
are respected by the inference rules. In a
many-sorted
leads to such a
axiomatization
(in clause notation)
*rapidly growing search space that the time
and/or space boundaries
to certain sub-
(which are given as a
(1)
of an automated
(3)
theorem prover are exceeded before the
empty clause can be deduced.
This holds true even if we use some refine-
the problem reads
as follows:
R;ypew:w
(2)
Xgpe b:B
(4) ;type c:c
type f:F
(5) -type s:s
(6) fypc
(7)
aoti W<A
(8)
au&X F<A
(9) hoti B<A
(10)
auti C<A
(12)
noti G<P
g:G
ments, like for instance set-of-support
(11)
hoti %A
CWRC651, which reduces the initial search
(13)
{E(a,p,),fi(a2a,),E(a2p2),E(a,a2)~
space to 28 potential
(14)
iM(c,b,))
(16)
potential
2,
resolvents
and 2
factors.
A MANY-SORTED
The first-order
(18)
SOLUTION
axiomatization
in figure 1.1
reflects a specific view of the given problem:
We consider an unstructured
universe,
(15)
{M(s,b,))
(M(blfl))
(17)
INflW,)I
{E(w,f$)
(19) mw,g, 11
(20)
03 b,c-, 1)
(21) IE(b,s,)}
(22)
-typeh(C):P
(23)
02 (c,h k, ) ) 1
(24)
type i(S):P
(25)
(E(s,i(s.,)))
(26)
Xype j(AA):G
(27)
IE(a,a2)
the objects of which are associated with
properties
Figure
(expressed by unary predicates)
- for instance "is a wolf",
The many-sorted
Schubert's
(a.,a2) 1
version of
problem in clause
"is an animal",
notation
"is a grain" etc. - and where relations
between these properties
2.1
,E(a,j
In this axiomatization
are given by im-
S,A,G
plications.
the symbols W,F,B,C,
and P are used as sort symbols
are ordered by the subsort
But there is another, more natural way of
to the subsort declarations
looking at the given scenario, which, in-
331
which
order according
(7) - (12), i.e.
W,F,... ,S are subsorts of A and G is a sub-
Figure
sort of P. The type declarations
(1) - (6),
e.g. Xyp& w:W, define a signature
in which
The MKRP-solution
of the many-
version of Schubert's problem
For this proof the system uses the replace-
for instance w is a constant of sort W.
The type declarations
2.2
ment principle
(22), (24) and (26)
[Rob651
the set-of-support
(cf. clause 28) and
strategy
CWRC651 with
denote an extension of the given signature
clause 27 as the set of support. Having
computed by the system for the skolem-
computed the 5th resolvent,
functions h, i and j, e.g. h is an unary
the control of the search was taken over by
function of sort P with domainsort
the terminator module
C. The
lower case letters, e.g. alfa2,
.. .. are universally quantified variables
C~0831, which had
subscripted
found a unit-refutation
PI
clause set.
of the sort denoted by the corresponding
for the remaining
But why does the system find a solution for
upper case letter, e.g. A,P,... .
The MKRP-system
i.e. clause 32,
the many-sorted
was extended to a many-
formulation, when it didnot
find one for the unsorted type? The reason
sorted theorem prover on the basis of the
is the significantly
many-sorted
as cornparted to the clause set of figure 1.1:
calculus as proposed
In this calculus,
the subsortorder
signature cause a restriction
cation procedure
in CWa1831,
and the
For the many-sorted
outermost
CWa184bl: A variable xcan
clauses with 65 literals.
The resulting
as the sort of the
symbol of t) is a subsort of or
figure 2.1
and 27(l)
search space is further reduced
by the constraints
procedure:
equals the sort of x. For instance we can
resolve upon the literals 20(l)
case there are only 12
clauses with 16 literals instead of 27
of the unifi-
only be unified with a term t iff the sort
of t (which is determined
reduced search space
imposed on the unification
For instance we can compute the
resolvent upon the literals 20(3) and 21(3)
in
using the most general unifier
in figure 1.1
yielding
I~(x,),c(x2),S(x2)1
from which we obtain {?(x2),s(x2)>
{a,+b.,,a2+c11 (but not {b,+a,,c,+a21).
by re-
solution with clause 3. But c(x2)Cz(x2)1
However there is no such resolvent upon the
can only be resolved upon 4(l) C5(1)1
literals 20 (1)
yielding
resolution
and 21(l)
in the many-sorted
calculus since there is no sub-
a pure clause z(c) C?(s)1 ineither
step. In the many-sorted
case these deadends
sort relation between C and S. As a conse-
are
quence the variables c1 and s1 are not
step upon the literals 20( 1)
impossible:
unifiable.
figure 2.1
Using the clause set of figure 2.1
c1 and s
the MKRP-
1
the correspondins
resolution
and 21(l)
in
is blocked because the variables
are not unifiable.
system computed the following refutation
As a result the size of the initial search
within
space is totally reduced to 12 potential
(28)
10 resolution
steps:
rE(a,p,),i;i(a2a,),E(a2j(a,a2))}
;13(4)
+ 27(l)
resolvents
(compared to 94 potential
resol-
(29) {f(w,p,),E(f,j(w,f,)))
;17(1)
+ 28(2)
vents and 8 potential
(30) {E(f,j(w,f,))l
:19(l)
+ 29(l)
can be reduced to 3 potential resolvents
(31) {~(flp,),E(b,j(f,h~))}
;16(1)
+ 28(2)
(compared to 28 plus 2 potential factors)
(32)
;30(1)
+ 31(l)
if the set-of-support
IE(b,j(f,~,))l _
factors), which again
strateqy is used. The
(33) IE_(b2p,),;(s1b2),E(s,p2)1
;13(4)
+ 21(l)
following diagram compares the statistical
(34) {M(s,b,),E(s,p,)1
:32(l)
+ 33(l)
values of both solutions, where the values
(35) IE(s.,p,
;15(1)
+ 34(l)
of the handcomputed
:25(l)
+ 35(l)
the black boxes. The relation between the
size of the corresponding boxes is propor-
(36)
i 1
11
continue next page
332
solution are given in
x is a variable of sort Q in the given
tional to the ratio of the values:
clause . For instance clause 13 of figure
initial search
1.1
space
figure 2.1.
I
search depth
8 1
of clause 13 in
is a relativization
Defining S as the set of all clauses of figure 2.1,
!? as the set of all relativized
clauses of S and AC as the set of all sort
clauses
axioms for the signature and the subsort
generated
order defined in figure 2.1,
literals
verified that
it is easily
(t U A') is the set of all
generated
clauses of figure 1.1
deductions
naminqs).
performed
ness- and the Sort-Theorem
for the many-
sorted resolution
CWa1831 we obtain
(up to variable
From the Soundness-,
deduced clauses
calculus
S 17" iff (^sU A')
re-
the Complete-
I-
q
in proof
(where 1,
length of
denotes a refutation
sorted calculus and
refutation
Figure
q
2.3
I-
denotes a refutat-
ion in the ordinary resolution
The statistical values of both
Moreover
solutions
is constructive,
one direction
TtIE EENERAL
SOLUTION
into a refutation
calculus).
of this equivalence
i.e. there exists an algo-
rithm which translates
3,
q
in themany-
each refutation
of S
of (6 U A'). Hence by
Having found a solution of a many-sorted
solving the many-sorted
version of Schubert's
problem, a solution of the original problem
steamroller,
we have
version of Schubert's
to verify that this solution also solves
is also obtained using the above transfor-
the original problem.
mations.
It is well known how to compare a many-
4,
CONCLUSION
sorted calculus with its unsorted counterpart by so-called
zations
sort
axioms
Most mathematical
andrezativi-
ted structure and it is not a mere accident
(cf. CObe62, Wa1831): The sort
that almost all mathematical
axioms serve to express the signature and
written
the subsort order in terms of first-order
formulas
(viz. implications).
problems have a many-sor-
in a many-sorted
textbooks
language
are
(albeit
often very implicit).
The relativi-
zation of a formula expresses the sort of
The advantage of many-sorted
each variable by atomic formulas using sort
ving was also recoqnized by CHay71, Hen72,
symbols as unary predicates.
Wey77, Cha78, BM79, Coh831. Many-sorted
first-order
In clause notation we obtain for instance
figure 2.1
1.1
to the type declaration
by
Obe62, Ide641 and CWa1831 extends the re-
1 of
sults to the resolution
and we obtain clause 7 of figure
as the sort axiom for the subsort decla-
ration 7 of figure 2.1.
calculi were investigated
LHer30, Sch38, Sch51, Wan52, Hai57, Gi158,
clause 1 of figure 1.1 as the sort axiom
corresponding
theorem pro-
calculus with para-
modulation.
The advantage of this calculus for automated
The relativization
of a clause is obtained by extending the
theorem proving was demonstrated
clause with all literals of form Q(x), where
Schubert's
333
steamroller.
here using
Of course, the real
power of a many-sorted
only obtained,
theorem prover is
Ideison. A.V. Calculi of Constructive Logic
with Subordinate
Variables.
American Mathematical Society Translations
(2) 99 (1972)
- translation
of Trudy Mat. Inst. Steklov
72 (1964)
CObe621
OberscheZp, A. Untersuchungen
if the problem to be solved
has a many-sorted
structure:
in several example runs
the performance
CIde641
It turned out
(cf. CWa1831) that
of the system increases
with an increasing
cardinality
tigen Quantorenlogik.
len 145 (1962)
of the sub-
sort order relation.
[Rob651
Often problems with a many-sorted
ture are presented
struc-
in an unsorted axioma-
sorted axiomatization
many-sorted
an un-
Schmidt, A. Die Zulassigkeit der Behandlung
mehrsortiger
Theorien mittels der Dblichen
einsortigen
Pradikatenlogik.
Mathematische
Annalen 123 (1951)
CSch781
Schubert, L. Private
Csch841
Schmidt-Schauss, M. Mechanical
[SW831
Siekmann, J. and G. Wrightson (eds.) Automation of Reasoning - Classical Papers on
Computational
Logic, vol 1, Springer-Verlag (1983)
Cwa1831
Walther, C. A Many-Sorted Calculus based
on Resolution
and Paramodulation.
Proc. of
the 8th International
Joint Conference
on
Artificial
Intelligence
(IJCAI-83), Karlsruhe (1983)
I would like to thank J. Siekmann for his
helpful criticism and support which greatly
contributedtothepresentform
ofthispaper.
References
C~0831
Antoniou, G. and H.J. Ohlbach Terminator.
Proc. of the 8th Intern. Joint Conference
on Artificial
Intelligence
(IJCAI-83),
Karlsruhe
(1983)
CBES811
BZisius, K., Eisinger, N., Siekmann, J.,
SmoZka, G., HeroZd, A., and C. Walther The
Markgraf Karl Refutation
Procedure.
Proc.of
the 7th International
Joint Conf. on Artificial Intelligence
(IJCAI-81), Vancouver
(1981)
CBM791
Academic
Press
Champeaux, D. de A Theorem Prover Dating a
Semantic Network. Proc. of AISB/GI Conf.,
Hamburg
(1978)
[coh831
Cohn, A.G. Improving
[Gil581
[Hay711
Hayes, P. A Logic of Actions.
CWRCSSI
Machine InUnit, Univ.
Henschen, L.J. N-Sorted
Theorem Proving
ACM Conference,
Theories.
17 (1952)
Weyhrauch, R.W. FOL A Proof Checker for
First-Order
Logic. MEMO AIM-235.1,
Stanford Artificial
Intelligence
Laboratory,
Stanford University
(1977)
Wos, L.T., Robinson, G.A. and D.F. Carson
Efficiency
and Completeness
of the Set of
Support Strategy in Theorem Proving.
JACM 12 (1965), also in [SW831
of Restricted
Quantification
I. The Journal of Symbolic
Logic 22 (1957)
telligence 6, Metamathematics
of Edinburgh
(1971)
[Her301
CWey771
GiZmore, P.C. An Addition to "Logic of ManySorted Theories". Compositio
Mathematics
13
(1958)
Hailperin, T. A Theory
[Hen721
[Wan52 1 Wang, H. Logic of Many-Sorted
The Journal of Symbolic Logic
the Expressiveness
of
Many-Sorted
Logic. Proc. of the 3rd Nat.
Conf. on Artificial
Intelligence
(AAAI-83),
Washington
(1983)
[Hai
Generation
of Sorts in Clause Sets. Interner Bericht,
KaisersFachber. Informatik, Universitat
lautern (forthcoming
1984)
in Many-Sorted
CWal84bJ Walther, C. Unification
Theories. Proc. of the 6th European Conf.
on Artificial
Intelligence
(ECAI-84), Pisa
(forthcoming
1984)
(1979)
CCha781
Communication
Steamroller
- A Case
CWa184al WaZther, C. Schubert's
Study in Many-Sorted
Resolution.
Interner
Bericht 5/84, Institut fur Informatik I,
Universitat
Karlsruhe
(1984)
Boyer, R.S. and J S. Moore A Computational
Logic.
Schmidt, A. uber deduktive
[Sch511
CSch841.
Acknowledgement
12
Theorien mitmehreren Sorten von Grunddingen.
Mathematische
Annalen 115 (1938)
into an equivalent
axiomatization
Robinson, J.A. A Machine-Oriented
Logic
Based on the Resolution Principle. JACM
(1965) , also in Csw831
CSch381
tization. For such problems an algorithm
has been developed which translates
zur mehrsorMathematische
Anna-
Logic for Automatic
in Higher-Order
Logic. Proc.
Boston (1972)
Herbrand, J. Recherches
sur la theorie dela
demonstration
(These Paris), Warsaw
(1930)
chapter 3. Also in "Logical Writings"
(W.D. Goldfarb ed.), D.Reidel Publ.Co.(l971)
334
Download