3 research outputs found

    Dynamic encapsulation of C++ objects

    Get PDF
    Classes in C++ provide static encapsulation of objects, by generating code which contains specific knowledge about the internals of encapsulated objects. Static encapsulation occurs at compile time, and therefore cannot directly support the evolution of objects, since recompilation of source code is required if the internal layout changes. This also prohibits the use of distributed or persistent objects without first ensuring that the internal representations of the objects match the ones in the compiled code. Dynamic encapsulation occurs at run-time, and allows the compiled code to exist without the knowledge of any particular object representation. Abstract base classes with C++ virtual functions support a limited form of dynamic encapsulation, but only for objects originally designated to inherit from those classes. Some languages, such as Smalltalk, support dynamic encapsulation, but with significantly less performance than statically encapsulated languages. An object model using dynamic type-binding is presented which allows the flexibility of dynamic encapsulation with much of the efficiency of static encapsulation. With this model, objects can potentially communicate and migrate across address space and network boundaries without specific prior knowledge of representations, and can invoke functions on local objects with no more run-time overhead than standard C++ virtual function calls. This dynamic encapsulation model is incorporated into DC++, a C++-based language with extensions that allow for the dynamic encapsulation of existing C++ objects, and DECO (the Dynamic Encapsulator of C++ Objects), a utility for converting DC++ source code into C++

    Integrating measurement techniques in an Object-Orientedsystems design process.

    Get PDF
    The theme of this thesis is the assessment of quality in class hierarchies. In particular, the notion ofinheritance and the mechanism of redefinition from a modelling perspective are reviewed. It isshown that, in Object-Oriented languages, controversial uses of inheritance can be implementedand are subject of debate as they contradict the essence of inheritance. The discovery of anunexpected use of the method redefinition mechanism confirmed that potential designinconsistencies occur more often than expected in class hierarchies. To address such problems,design heuristics and measurement techniques are investigated as the main instrument tools for theevaluation "goodness" or "badness" in class hierarchies. Their benefits are demonstrated withinthe design process. After the identification of an obscure use of the method redefinition mechanism referred to as themultiple descendant redefinition (MDR) problem, a set of metrics based on the GQMlMEDEA[Bri&aI94] model is proposed. To enable a measurement programme to take place within a designprocess, the necessary design considerations are detailed and the technical issues involved in themeasurement process are presented. Both aspects form ~. methodological approach for classhierarchy assessment and especially concentrate on the use of the redefinition mechanism.. .As one of the main criticisms of the measure~ent science is the lack orgood design feedback, the, analysis and interpretation phase. of the metfics results is seen: as a crucial phase for inferring,meaningful conclusions. A novel· data interpretation framework is pr~posed' and includes the use ofvarious graphical data representations and detection techniques. Also, the notion of redefinitionprofiles suggested a, more generic approach whereby a pattern profile can be found for a metric.The benefits of the data interpretation method for the extraction of meaningful design feedbackfrom the metrics results are discussed.The implementation of a metric tool collector enabled a set of experiments to be carried out on theSmalltalk class hierarchy. Surprisingly, the analysis of metrics results showed that methodredefmition is heavily used compared to method extension. This suggested the existence ofpotential design inconsistencies in the class hierarchy and permitted the discovery of the MDRproblem on many occasions. In addition, a set of experiments demonstrates the benefits of examplegraphical representations together with detection techniques such as alarmers. In the light offacilitating the interpretation phase, the need for additional supporting tools is highlighted. This thesis illustrates the potential benefits of integration of measurement techniques within anObject-Oriented design process. Given the identification of the MDR problem, it is believed thatthe redefinition metrics are strong and simple candidates for detecting complex design problemsoccurring within a class hierarchy. An integrated design assessment model is proposed whichlogically fits into an incremental design development process. Benefits and disadvantages of theapproach are discussed together with future work
    corecore