|
Prev: When not to use interfaces?
Next: Session Factory Error
From: S Perryman on 7 Nov 2006 07:51 <mashrur.mia(a)gmail.com> wrote in message news:1162845062.814364.177080(a)h48g2000cwc.googlegroups.com... > First of all, let me apologize for bringing this topic as it has been > talked about many times. My problem is that I was not able to find > satisfactory answers from the earlier discussion on this issue. > What is the actual definition of Abstract Data Type? > And I have found two different approach people use to answer this. > 1. (from wikipedia) A specification of a set of data and the set of > operations that can be performed on the data. Such a data type is > abstract in the sense that it is independent of various concrete > implementations. > This and other definition like it, emphases that ADT is about > separation between interface and implementation. The "Abstract" is > basically used as "abstracting implementation from the interface", > "abstracting operation from method" > 2. ADT is about modeling. It is abstract cause it only cares about the > essential properties of the "object" it is abstracting (or modeling) > This kind of definition emphases ABSTRACTION as "selective > examination of certain aspects of a problem" > Here is a link that explains this sorts definition of ADT >http://www.zib.de/Visual/people/mueller/Course/Tutorial/node4.html#SECTION00400000000000000000 > Now which is it? Both seems logical but they seem different to me. Both. 1 is the canonical definition. And 1 implies 2. By focussing on the core concepts (interface etc) rather than the details (implementation etc) , abstraction is achieved. Think of a publication. The abstract contains the key aspects in summary form, while the publication as a whole contains all the details. And so it is with ADTs. Regards, Steven Perryman
From: H. S. Lahman on 7 Nov 2006 08:10 Responding to Mashrur.mia... > Hello all, > > First of all, let me apologize for bringing this topic as it has been > talked about many times. My problem is that I was not able to find > satisfactory answers from the earlier discussion on this issue. > > What is the actual definition of Abstract Data Type? > > And I have found two different approach people use to answer this. > > 1. (from wikipedia) A specification of a set of data and the set of > operations that can be performed on the data. Such a data type is > abstract in the sense that it is independent of various concrete > implementations. > > This and other definition like it, emphases that ADT is about > separation between interface and implementation. The "Abstract" is > basically used as "abstracting implementation from the interface", > "abstracting operation from method" > > 2. ADT is about modeling. It is abstract cause it only cares about the > essential properties of the "object" it is abstracting (or modeling) > > This kind of definition emphases ABSTRACTION as "selective examination > of certain aspects of a problem" I agree with Collado. There really isn't a difference in definitions here; they just provide different spins on the basic notion of information being abstracted to the point where it is independent of implementation. > > Here is a link that explains this sorts definition of ADT > http://www.zib.de/Visual/people/mueller/Course/Tutorial/node4.html#SECTION00400000000000000000 > > Even deitel & deitel on their "C++: How to program" seem to define ADT > it like this. > > > > Now which is it? Both seems logical but they seem different to me. > > Built in types fits both the definition. For definition 1. ints or > floats or chars are ADT because, we don't need to care about the > details how they are represented, only use them through their interface > such as addition, subtraction, multiplication etc. > > For definition 2, ints or floats and chars are ADT because they only > represent certain aspect of the real life int, float or char. Real life > ints are not just 32-bit It depends on where the observer is standing to some extent for both definitions. These are 3GL fundamental data types. With respect to the hardware they are ADTs because they are independent of specific hardware implementations (endian, least significant bit, IEEE format, etc.). However, with respect to OOA/D they represent specific implementations because they are bound to hardware computational models. For example, in OOA/D information does not even have to have a data store. ************* There is nothing wrong with me that could not be cured by a capful of Drano. H. S. Lahman hsl(a)pathfindermda.com Pathfinder Solutions http://www.pathfindermda.com blog: http://pathfinderpeople.blogs.com/hslahman "Model-Based Translation: The Next Step in Agile Development". Email info(a)pathfindermda.com for your copy. Pathfinder is hiring: http://www.pathfindermda.com/about_us/careers_pos3.php. (888)OOA-PATH
From: Miguel Oliveira e Silva on 7 Nov 2006 09:37
ADT [1,2,3] are types which are completely defined by the operations available on its objects (type instances) together with their semantic properties (type invariants and operation pre/postconditions). [1] "Programming with abstract data types", Barbara Liskov and Stephen Zilles, 1974, Proceedings of the ACM SIGPLAN symposium on Very high level languages [2] "Object-Oriented Software Construction", 2ed/1ed, Bertrand Meyer, 1997/1988 [3] "A behavioral notion of subtyping", Barbara H. Liskov and Jeannette M. Wing, 1994, ACM Transactions on Programming Languages and Systems -miguel -- Miguel Oliveira e Silva mos at det.ua.pt |