Subject: Re: class dictionaries and super classes
From: Karl Lieberherr (lieber@ccs.neu.edu)
Date: Fri Dec 08 2000 - 11:52:48 EST
Hi Brendan:
>From bcoffey@ccs.neu.edu Thu Dec 7 19:30:22 2000
>Date: Thu, 7 Dec 2000 19:30:20 -0500 (EST)
>From: "Brendan M. Coffey" <bcoffey@ccs.neu.edu>
>To: Karl Lieberherr <lieber@ccs.neu.edu>
>cc: Brian Vincenzo Mollo <bmollo@ccs.neu.edu>
>Subject: class dictionaries and super classes
>
>Prof. Lieberherr:
>
>Brian and I have two questions:
>
>1) Which CD file should all of our check methods be robust against?
>the sem-check.cd file (the really huge one) is structured completely
>differently from many of the other class dictionaries that are
>"circulating" among the class, such as the scs.cd file in
></course/com1205/f00/project/final-cd/>.
Use the one in:
/course/com1205/f00/project/final-cd/
which is actually the same as the one in
/course/com1205/f00/project/sem-check-full/
>
>2) We are having the following problem in implementing the cyclic
>inheritance check: how can we traverse from a class to its
>superclass(es)? There appears to be no reference to a parent in most
>of the class dicitonaries people are working with. Further, should the
>cyclic inheritance check assume that there is no multiple inheritance?
>If not, the problem becomes significantly more difficult.
>
>If you look in Bob's (turacma's) directory (we certainly have), he uses
>a class dictionary that has been subtly modified to contain some
>references to superclass structures of his own invention. Is this the
>way we should attack it--by modifying the class dictionary itself?
This is quite typical that you add more structure to your classes
during the implementation. It is a good idea to store for each class
its super classes and these links can be set by a traversal through
the subclasses of all super classes.
Before you check the inheritance cycle rule, it is good to check
the multiple inheritance rule to simplify the checking of the
inheritance cycle rule.
>Thanks,
>Brendan & Brian
>
-- Karl L.
This archive was generated by hypermail 2b28 : Fri Dec 08 2000 - 11:53:10 EST