[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CLOS: precedence of classes
- To: clisp-list@ma2s2.mathematik.uni-karlsruhe.de
- Subject: Re: CLOS: precedence of classes
- From: Pascal POIZAT - DEA Info <poizat@ensinfo.univ-nantes.fr>
- Date: Fri, 27 Jan 1995 14:22:44 +0100
If you do
c1->()
c2->c1
c3->c1,c2
(inheritance links) then CLOS generates a cycling precedence list for c3.
Don't forget that it will add an extra link between c1->c2 thus making (c1,c2) a cycle.
c1
/\ /\
| |
c2 <--- c3
this is what you did.
Then CLOS modifies this to obtain:
c1
/\ | /\
| \/ |
c2 <-- c3
and here there is a cycle between c1 and c2.
This is because you specified c1 before c2 in c3's inheritance list.
When you say that c inherits from c1 c2 c3 ... ci ci+1 ... cn
then you create implicit (for CLOS) links between c1 and c2, c2 and c3, ..., ci and ci+1,
cn-1 and cn.
Just try modifying class3 by making it like this:
(defclass class3 (class2 class1) ()) it should work.
Pascal Poizat
DEA Informatique, Nantes, France
(pre PhD year in Computer Science)
Applying Rewriting to Object Specifications using CLOS.
PS: thanks for mailing me the place where to find the last version of CLISP-HIGH.
poizat@ensinfo.univ-nantes.fr
PS2: I mailed this directly to you, since if you receive hundreds of answers you
could join them and then mail them to the mailing-list.