ASSIP-T.
A THEOREM PROVING MACHINE
Werner D i l g e r F i d u n h o f e r - I n s t i t u t f ur I n f o r n i a t i o n s - und Datonverarbeitung D-7500 K a r l s r u h e 1 ABSTRACT An a s s o c i a t i v e processor f o r theorem p r o v i n g i n f i r s t order l o g i c i s d e s c r i b e d . It. is designed on the b a s i s of the deduct i o n plan method, i n t r o d u c e d by Cox and P i e t r z y k o w s k i . The main f e a t u r e s of t h i s method are the s e p a r a t i o n of u n i f i c a t i o n from d e d u c t i o n and the i n c o r p o r a t i o n of a method f o r i n t e l l i g e n t b a c k t r a c k i n g - This k i n d of b a c k t r a c k i n g is based on a s p e c i a l u n i f i c a t i o n p r o c e d u r e . An improved v e r s i o n o f t h i s u n i t i z a t i o n procedure i s g i v e n , which o u t p u t s a u n i f i c a t i o n graph w i t h c on s t r a i n t s . In the case of a u n i f i c a t i o n c on f I i c t , s u f f i c i e n t in f: o n n a t i o n f o r a di re c ted b a c k t r a c k i n g step can be gained f r om the u n i f i e s t i o n g r a p h. A c c o r d i n g t o the d e d u c t i o n p l a n method, the ASSIP-T memory c o n s i s t s of two p a r t s , one f o r the d e d u c t i o n p l a n and the o t h e r f o r the u n i f i c a t i o n g r a p h . ASSIP-T can p e r f o r m ded u c t i o n and u n i f i c a t i o n i n p a r a l l e l . Both m e m o ry p a r t s c o n s i s t of. a set of s u b p a r t s each of which keeps the i n f o r m a t i o n about c l a u s e s or t e r m s , r e s p e c t i v e l y . A subpart is a 1i n e a r a r r ay of c e l l s pr o v i d e d w i t h a c o n t r o l u n i t a nd can be re g a rd e d as a subprocessor. 1.
In Production
The progress of m i c r o e l e c t r o n i c s allows the r e a l i z a t i o n s of more and more p o w e r f u l p r o c e s s o r s f o r s p e c i a l purposes. One such type of p r o c e s s o r s is the a s s o c i a t i v e p r o c e s s o r . I t s a s s o c i a t i v e memory a l l o w s c o n t e n t o r i e n t e d p a r a l l e l access t o the data s t o r e d i n i t . T h i s makes the a s s o c i a t i v e processors w e l l s u i t e d f o r p a t t e r n handling processes. I n a r t i f i c i a l i n t e l l i g e n c e e . g . , most processes are p a t t e r n d i r e c t e d d e d u c t i o n s . One o f i t i s theorem p r o v i n g . In t h i s paper a model of an ass o c i a t i v e processor i s d e s c r i b e d which i s able t o prove theorems o f f i r s t order l o g i c . It is designed on the b a s i s of the d e d u c t i o n p l a n method, i . e . i t i n c o r p o r a tes a method f o r i n t e l l i g e n t b a c k t r a c k i n g . A f t e r some b a s i c d e f i n i t i o n s in the second s e c t i o n , the d e d u c t i o n plan method i s d e s c r i b e d . The s p e c i a l u n i f i c a t i o n procedure used w i t h i n t h i s method f o l l o w s . The o u t p u t of t h i s procedure is a u n i f i c a -
H a n s - A l b e r t Schneide r Computer Science Department University of Kaiserslautern P o s t f a c h 3 04 9 D-6750 Kaisorslautern
W. Dilger and H.-A. Schneider 1195
of pairs of torms arising f r o m t h e pairing of literals by edges is uniliable, the deduction plan is correct. Cf. for this section (Cox and Pietrzykowski 1979) a n d (Cox and Pietrzykowski 19 81). Def in
ition
type of the edge e, a the starting literal and v the target literal. A literal u of a clause cl is called key literal i f f there is an incoming edge with type SUB and target literal u. Each literal u of a clause cl is called a sub problem i f f it is not a key literal. A subproblem u E cl is open i f f there is no outcoming edge with starting literal u. A subproblem u is called closed iff it is no t. o pen . o s (G) 1 s the set of open subproblems of a deduction graph G. G is called closed, i f f os(G) - 0. A node cl is called predecessor of a node cl ., i f f there is a path from cl to cl r) which contains only edges of type The deduction plan method is a resolution based method, i.e. a refutation method. It starts with a set of clauses and tries to construct a "closed" and "correct" deduction plan. If it succeeds, the clause set is proved to be unsatisfiable. The central idea of the method is to separate deduction from unification. This allows the application of a special unification algorithm which, in the case of a u n i f i cation conflict, not simply stops with failure, rather it yields information about the causes of unification conflicts, namely certain deduction steps, which then can be reset. In section 5 this way of processing is called "intelligent backtracking " . The nodes of the deduction plan are the input clauses and eventually variants of them. Two clauses can be connected by an edge if they contain literals with the same precidate symbol but different signs (negated or not negated). Therefore a (labelled) edge between two clauses cl and cl2 is a triple (cl1 (t,u,v) ,cl2,) , where u and v are literals in cl1 and cl2 respectively, satisfying the condition on their predicate symbols and negation signs, t is the type of the edge. There are two types of edges: SUB and RED. All edges are of type SUB except those refering backward to a clause which is already in use. If each l i t e r a l in each clause included in the plan occurs in an edge, the deduction plan is closed. If the set
SUB (SUB-path). If u is the starting l i teral of the first edge of a SUB-path from cl to cl2 , then u is called preceding literal of cl2 and cl2 is called successor of c 1 . We omit the definition of the deduction plan here. It is a deduction graph which is constructed by a number of deduction steps, i.e. edge drawing steps, starting from a basic plan which consists of one node only.
is a set of eight input clauses. Figure 1 shows a closed deduction plan for S. The edges are drawn in such a way that they begin beyond the starting literal and point to the target literal. Therefore they are only labelled by their type and, beyond i t , by the numbers of the steps in the plan construction within which the edges were drawn. The literals and -R(x5) are key literals, the other literals are subproblems. The first clause in S is the basic node, it is a predecessor
1196 W. Dilger and H.-A. Schneider
W. Dilger and H.-A. Schneider 1 197
the edges in the UwC arc l a b e l l e d by {c }. At the end of the t r a n s f o r m a t i o n step the UwC has the form r e p r e s e n t e d in f i g u r e J. The
sorting
step
The t r a n s f o r m a t i o n step c l a s s i f i e s the nodes of UwC in such a way t h a t two nodes be 1 o n g to the s ame c 1 a s s i f f the re i s a c o n n e c t i o n between them. In the example above we have f o u r c l a s s e s . In the sorting s t e p , f i r s t a gr aph U i s c o n s t r u c t e d w h i c h c o n s i s t s of these classes as nodes and which has a d i r e c t e d edge l a b e l l e d by f from c l a s s X to c l a s s Y i f f t h e r e is a term f ( p , . . . , p ) in X and an e x p r e s s i o n P
,
by 0. So we get the complete UwC of figure 5. Soundness and completeness of the u n i f i c a t i o n a l g o r i t h m are proved i n ( D i l g e r and J a n s o n 1984). The main theorem i s : A c o n s t r a i n t set C i s u n i f i a b l e i f f a l l terms in UwC which are connected by a simple conn e c t i o n begin w i t h the same f u n c t i o n symb o l and UwC c o n t a i n s n o s i ra p1e 1o o p s. Thus, e . g . , our example c o n s t r a i n t set is not uni fi able because the UwC of figure r ) c o n t a i n s a simp 1 e 1 oop . S.
In t e l l i g c n t B a ckt r acking
(i f_ { 1 , . . . ,n) ) i n Y.
This graph is shown f o r f i g u r e 4. Now the edges to a c y c l e are added to between the a p p r o p r i a t e
the example in of U which belong the UwC as edges nodes and l a b e l l e d
Consider the d e d u c t i o n p l a n of s e c t i o n 3, r e p r e s e n t e d i n f i g u r e 1 . F o l l o w i n g the edges a c c o r d i n g to t h e i r numbers we get the c o n s t r a i n t s
1198 W. Dilgerand H.-A. Schneider
is another clause in the i n p u t clause set which f i t s s o close the l i t e r a l , namely { - S ( b ) } . This y i e l d s the c l o s e d c o r r e c t d e d u c t i o n p l a n of f i g u r e 7. Thn reader is i n v i t e d t o check t h a t b a c k t r a c k i n g w i t h .ncs 2 - { 6 } does not r e s u l t in a c 1 o s e d plan . 6. The
s t r u c t u r e Of ASSIP-T.
In che d e d u c t i o n p l a n method, deduct i o n and u n i f i c a t i o n are separated from each o t h e r . For d e d u c t i o n , the data s t r u c ture "do d uc t i on p l a n " i s u s e d , f o r uni f i c d t i on the data s t r u c t u r e " u t i i f i c a t i o n
g r ,iph w i i h c o n s t r a i n L s " . In A S S1 P - T , b o t h ar e k ep t in appr opr i a te pr\ r t s of the a s s o d a t i v e m e in o r y . Thus, t h e ass o c i a t i v e memory is d i v i d e d in two main p a r t s , AMI f o r the d e d u c t i o n p l a n and AM2 f o r the UwC, o f . f i g u r e 0. The c o n t r o l u n i t o f t he p r o cess o r c o n s i s t s of f o 11 r componen t s : - the he a d co nt ro 1 HC - t w o s u b c o n t. r o Is S C 1 a n d S C 2 - a c o n v e n t i o rial mem o ry CM
B a c k t r a c k i n g is performed as f o l l o w s . Take f or the b a c k t r a c k i n g step mes = {S} Edge number fj and node -S(a) are removed from the p l a n . Thereby, the l i t e r a l S(x.) be comes an open subprobleni. But there
Th e sub c o n t r o l s operate on the UwC. The y t- an work i n d e p e n d e n t l y f r oin each ot.h e r , but under c o n t r o l of H C, so they can wo r k in p a r a l l e l and t h i s is u s e f u l d u r i n g the i n i t i a l c o n s t r u c t i o n o f the UwC an d d u r i n g i t s r e c o n s t r u c t i o n a f t e r a b ack t r a c k i n g s t e p . Thus, we h a v e n o t o n l y P a r a l l e l access to the data in the a s s o c ai t i v e memories, r a t h e r t h e r e are t w o f u r t h e r steps t o p a r a l l e l p r o c e s s i n g : o n e by the p a r a l l e l t r e a t m e n t of dedue-
W. Dilger and H.-A. Schneider
1199
1200 W. Dilger and H.-A. Schneider
in p r a c t i c e , but we have to work out ano t h e r r e p r e s e n t a t i o n of the edges. By means of s e v e r a l head c o n t r o l - s u b c o n t r o l g r o u p s , we should be able to p e r f o r m 0Rp a r a l l e l as w e l l as A N D - p a r a l l e l p r o c e s s i n g due to the s e p a r a t i o n of deduct i o n and u n i f i c a t i o n . REFERENCES Cox, P.T. On d e t e r m i n i n g the causes of n o n u n i f i a b i l i t y . Auckland Computer Science Report No 23, U n i v e r s i t y of A u c k l a n d , 1901. Cox, P.T. and P i e t r z y k o w s k i , T. Deduction p l a n s : A b a s i s f o r i n t e l l i g e n t backt r a c k i n g . U n i v e r s i t y o f Waterloo Res. Rep. C S - 7 9 - 4 1 , 1979. Cox, P.T. and P i e t r z y k o w s k i , T. Deduction p l a n s : A b a s i s f o r i n t e l l i g e n t backt r a c k i n g . IEEE Trans. P a t t e r n Anal y s i s and Machine I n t e l l i g e n c e , v o l . PAMI-3, (1) 1981, 5 2-65. D i l g e r , W. and Janson, A. U n i f i k a t i o n s graphen a l s Grundlage f u r i n t e l l i ge rites B a c k t r a c k i n g . Proc. of the German Workshop on A r t i f i c i a l I n telligence,Informatik-Fachberichte 76, S p r i n g e r - V e r J a g , 1983, 189-196. D i l g e r , W . and Janson, A. A u n i f i c a t i o n graph w i t h c o n s t r a i n t s f o r i n t e l l i gent b a c k t r a c k i n g i n d e d u c t i o n systems. I n t e r n e r B e r i c h t 100/84, Fachbereich I n f o r m a t i k , U n i v e r s i t a t K a i s e r s l a u t e r n , 19 84. D i l g e r , W. and Schneider, I I . - A . A theorem proving associative processor, In preparations . F u , K . S . and I c h i k a w a , T . ( e d s ) Special_ computer a r c h i t e c t u r e s f o r p a t t e r n p r o c e s s i n g . CRC Press, Boca Raton, F l o r i d a , " 19 8 2. Kohonen, T . Self"-organizations and ass o c i a t i v e memory. S p r i n g e r , B e r l i n , 19 84. Moto-oka, T. and F u c h i , K. The a r c h i t e c t u r e s i n the f i f t h g e n e r a t i o n comp u t e r s . Proc. of the IFIP 83 , 19 83, 5 89-602. Parhami, B. A s s o c i a t i v e memories and p r o c e s s o r s : An overview and s e l e c t e d b i b l i o g r a p h y . Proc. of the IEEE 6 1, 1973, 722-730. You, S.S. and Fung, H.S. A s s o c i a t i v e processor a r c h i t e c t u r e - a s u r v e y . Proc. of the Sagamore Computer Confe rence 1975.