Professional Documents
Culture Documents
Analogical Reasoning For Logic Programming: Recognition, Elab-Oration, Evaluation, Consolidation, As
Analogical Reasoning For Logic Programming: Recognition, Elab-Oration, Evaluation, Consolidation, As
Analogical Reasoning For Logic Programming: Recognition, Elab-Oration, Evaluation, Consolidation, As
further work we have to extend the refu- reverse. The other case is more compli-
tation tree so that the resolvent and the cated because we do not have any infor-
positive clauses of each particular resolu- mation about the corresponding literal in
tion step together with their substitutions the target domain. So, only the argument
are contained. We use the following struc- terms will be replaced but the predicate
ture of a refutation tree where the symbol symbols will not be changed.
[] stands for an empty clause: The definition for determining the
Tree= { (Resl,Cll, 01),..., ground literals needed to prove the target
example is given by the following replace
(Res,,_l, Ct,,-1, ON-l>,
(o) } mapping M, ept where f is a mapping rela-
tion like identity, inclusion or subset:
where Oi = Oct,, because Resl are in-
stantiated clauses and On,s~ is empty. M, ept(ps(. . . , ar gs~, . . .) ) =
I p~(...,arg,,,...) : (pt,p,) e M,,~,~
--,append([1],[2, 3], [1, 2, 3]) and (argt,,i,arg~,j) • Mte~m
append([XlT], L, [XIT1]) pt(...,argt,,...) : (pt,p~) • Mte,n
append(T, L, T1) and (f(argt,),i,f(arg~,),j) • Mt~,~
pt(...,argtj,...) : (pt,ps) ¢ Mte,~
-~appc,d(O, [2, 31,[2, 31) and (argt¢,j, arg~,j) • Mt~m
t/append(0,L, L) pt(...,arg~,...) :otherwise
M~vt transforms the ground literal
O p~(..., arg~i,...) of the source proof tree
into the ground literal needed for the tar-
Figure 4: The refutation tree get proof tree according to the informa-
tion about term mappings stored in Mt~,~.
The following tree is generated of the ex- Figure 5 shows an example of elabora-
ample of figure 4. tion where the terms and the predicate
symbol of the ground literal of the source
Tree = refutation tree, append([], [2, 3], [2, 3]), are
{ (~append([1],[2,3],[1,2,3])), mapped onto member(2, [2, 31). For exam-
(append([XIT],L,[XIT1]) ple, the first rule of M~pt applies to the
V-~append(T,L,T1)), second argument of append([], [2, 3], [2, 3])
(X--,1, T~[], L~[2,3], T1~[2,3])), and the second rule to the third argument.
(-~append([],[2,3],[2,3])),
(append([],L,L)), Mt~m: ((member, append)
(L-*[2,3])), ((2, 1, [2, 3], 2), ([1, 2, 3], 2, [1, 2, 3], 3))}
o)} Ground literal: append(I],[2,3],[2,3])
Mrepz(append([], [2, 31, [2, 3]))
3.2 Elaboration
= member(2, [2, 31)
Elaboration maps all ground literals of
the proof tree into the domain of the tar- Figure 5: An elaboration step
get example. Two cases can be distin-
guished depending on the ground literals
3.3 Evaluation
and the term mapping Mte~,~: if the pred-
icate symbol occurs in Mt,~m, then, the The evaluation step uses the mapped
argument mapping can be used simply in ground literals and the refutation tree of
395
{
Figure 9: A consolidation step
{..., ( ( a r g , , , 0 ---, x,)...}
: (argt,,i, a r g , j , j ) E Mt~,m
{ . . , ((a,'o,,, i) --, x~)...}
: (f(arg,,),i,f(arg,~),j) ~ M,o,,, 4 Concluding Remarks
{..,0,...} : otherwise
where Oolk are the substitutions of the In this paper we introduced MARs, a tool
recognition step and Mt,,m is the term re- for defining new Prolog predicates by anal-
placement set. f is a mapping relation for ogy. Particular methods are presented for
two argument terms. each of the four steps of the analogical rea-
soning process. The main contribution of
MARs is that it is a logically well founded
Mt~m: {(member, append) but simple model of analogical reasoning.
((2,1, [2, 31,2), ([1, 2, 3], 2, [1, 2, 3], 3))) However, MARs has to be evaluated in
more detail and to be extended to be ap-
OClk : plicable for more complex kinds of anal-
{ X--*l, T-*[], L--*[2,3],TI--*[2,3])} ogy.
Oi,k (Ocl,,) = We plan to improve MARs along serveral
{((2,1)~L),((1,2)~X),(([2,3],2)-+T1)} lines. First, applying MARs to other ana-
logical pairs of predicates, e.g. union ..,
Figure 8: The inverse substitution intersection or s u m I i s t ,.. multlist, has
shown that it is useful to submit more
Figure 8 shows an example of establish- than one example or to use an oracle. In
ing the inverse substitution. For instance, many cases the information included in
the application of the first rule of O;~k to the term mappings and the source proof
397
tree is not sufllcent to determine the cor- A. Prieditis (Hrsg.), Analogica. Mor-
rect target literals. For instance, using gan Kaufmann, 1988.
more examples, e.g. union([], [2, 3], [2, 31),
union([1,21, [2, 31, [1, 2, 3]), in addition to [Greiner 88] R. Greiner. Learning by un-
the analogical example union(J1,21, [2, 31, derstanding analogies. PhD thesis,
[1,2,31) ..o intersection([1,2], [2,31, [2]) Stanford University, 1988.
makes it possible to define union analog- [Hall 89] R. P. Hall. Computational ap-
ically to intersection without asking an proaches to analogical reasoning: A
oracle. comparative analysis. Artificial In-
Second, we intend to resolve the limita- telligence, 39:3-120, 1989.
tions on the structure of the known pred-
icates that have to be very similar. Espe- [KedarCabelli 88] S. Kedar-Cabelli. To-
cially the treatment of the predicates ap- wards a computational model of pur-
pearing in the proof tree of an example pose-directed analogy. In A. Priedi-
but not in the replacement list has to be tis (Hrsg.), Analogica. Morgan Kauf-
investigated in more detail. mann, 1988.
Third, we plan to apply MARs to other
domains like language processing in or- [MuggletonBuntine 88] S. Muggleton und
der to define new grammar rules analog- W. Buntine. Machine invention
ically. Comparing grammar rules shows of first-order predicates by inverting
that they are often very similar especiMly resolution. In A. Arbor (Hrsg.), Fifth
in their structure so that an analogical def- International Conference on Mach-
inition will succeed in many cases. Using ine Learning. Morgan Kaufmann,
the DCG formalism to describe grammar 1988.
rules makes it possible to use MARs be-
[Wirth 89] R. Wirth. Lernverfahren zur
cause the grammar rules can be treated in
Vervollstiindigung yon Hornklausel-
a similar way as logical predicates.
mengen durch inverse Resolution.
Doktorarbeit, Institut ffir Informa-
References tik, Universit£t Stuttgart, 1989.