comp.lang.ada
 help / color / mirror / Atom feed
From: cis.ohio-state.edu!elephant.cis.ohio-state.edu!weide@ucbvax.Berkeley.EDU  (Bruce Weide)
Subject: Re: OOD, Ada, and Inheritance
Date: 4 Dec 92 20:49:17 GMT	[thread overview]
Message-ID: <1992Dec4.204917.18188@cis.ohio-state.edu> (raw)

In article <knight.723417566@cunews> knight@mrco.carleton.ca (Alan
Knight) writes:
>
>At a guess, I would say that "similar" abstract behaviours are those
>that can be viewed as the same at some level of abstraction, but
>differ when viewed at others. For example, you say that the matrix
>implementations would have identical abstract behaviour, but a great
>many of them would give (usually slightly) different answers. For some
>applications, these differences would be very significant, for others
>they might not be. Both levels of abstraction could still be
>implementation-neutral.
>

Maybe we're making progress now...  But first I repeat the question
that promoted Alan's response: "What do we mean by 'similar' abstract
behavior?  Without writing down precisely what behaviors we're talking
about, I don't see how we can answer this question."

It is possible to write down the behavior of procedures, etc., that
manipulate what we might call "computational reals."  Computational
reals can be modeled formally as ordinary (mathematical) real numbers.
Now one might insist on exact answers from the operations on these
objects, and end up with an unimplementable specification.  Or one
might write that the answers given by the operations are within some
tolerances of the abstract mathematical answers, as Alan proposes
above.  Even if you want to do the former, you can consider this to be
a special case of the latter.  The tolerances are PARAMETRICALLY
defined in the abstract specification, so you can just let these
tolerances = 0 if you always want exact answers and don't care if the
thing can be implemented.

So when do two implementations of computational reals behave
INDENTICALLY?  SIMILARLY?  Here's one possible answer: They behave
IDENTICALLY when they are correct implementations of the specification
for the same tolerances (parameters); any such implementations should
be functionally indistinguishable in any client program.  They behave
SIMILARLY when they are correct implementations of the specification
for different tolerances (parameters).

More questions now arise from Alan's answer:
The same applies
>to a linked-list implementation with an end-of-list that is of a
>separate class rather than just being null.
>

These examples surely require some specs for further discussion.  Our
formal mathematical specifications for lists and trees don't include
anything like this vocabulary (e.g., end-of-list as a separate
class?).  We can have any number of implementations of each
abstraction and they behave identically.  So I guess I just don't
understand the problem here without seeing the abstract specification
of behavior that causes the difficulties.


Cheers,
    -Bruce

             reply	other threads:[~1992-12-04 20:49 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-12-04 20:49 Bruce Weide [this message]
  -- strict thread matches above, loose matches on Subject: below --
1992-12-04  8:54 OOD, Ada, and Inheritance cis.ohio-state.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!paladin.amer
1992-12-03 21:19 dog.ee.lbl.gov!overload.lbl.gov!agate!usenet.ins.cwru.edu!magnus.acs.ohio
1992-12-02 20:25 dog.ee.lbl.gov!network.ucsd.edu!usc!zaphod.mps.ohio-state.edu!cis.ohio-st
1992-12-02 14:58 pipex!bnr.co.uk!bnrgate!nott!cunews!cunews!knight
1992-11-20 20:28 klamath.cs.washington.edu!chambers
1992-11-17 20:37 dog.ee.lbl.gov!pasteur!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.ed
1992-11-16 15:09 eru.mt.luth.se!lunic!sunic!mcsun!uknet!comlab.ox.ac.uk!ajs
1992-11-16  8:48 cis.ohio-state.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!Sirius.dfn.d
1992-11-13 22:45 klamath.cs.washington.edu!chambers
1992-11-13 20:37 Bruce Weide
1992-11-11  4:20 sun-barr!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!darwin.sura.net!
1992-11-10 20:58 sun-barr!cs.utexas.edu!natinst.com!news.dell.com!milano!cobweb.mcc.com!br
1992-11-09 18:56 Ralph Johnson
1992-11-09 18:30 eru.mt.luth.se!lunic!sunic!lth.se!newsuser
1992-11-09 16:36 Jorge Luis Diaz-Herrera
1992-11-09 14:53 think.com!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!elephan
1992-11-07 18:49 John Goodsen
1992-11-07  1:25 mole-end!mat
1992-11-06 20:13 John Goodsen
1992-11-06  9:00 agate!doc.ic.ac.uk!uknet!root44!hrc63!mrcu!paj
1992-11-05 19:20 David Emery
1992-11-05 19:09 saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!new
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox