Results 1 -
8 of
8
Reengineering class hierarchies using concept analysis
- In ACM Trans. Programming Languages and Systems
, 1998
"... A new method is presented for analyzing and reengineering class hierarchies. In our approach, a class hierarchy is processed along with a set of applications that use it, and a fine-grained analysis of the access and subtype relationships between objects, variables and class members is performed. Th ..."
Abstract
-
Cited by 103 (7 self)
- Add to MetaCart
A new method is presented for analyzing and reengineering class hierarchies. In our approach, a class hierarchy is processed along with a set of applications that use it, and a fine-grained analysis of the access and subtype relationships between objects, variables and class members is performed. The result of this analysis is again a class hierarchy, which is guaranteed to be behaviorally equivalent to the original hierarchy, but in which each object only contains the members that are required. Our method is semantically well-founded in concept analysis: the new class hierarchy is a minimal and maximally factorized concept lattice that reflects the access and subtype relationships between variables, objects and class members. The method is primarily intended as a tool for finding imperfections in the design of class hierarchies, and can be used as the basis for tools that largely automate the process of reengineering such hierarchies. The method can also be used as a space-optimizing source-to-source transformation that removes redundant fields from objects. A prototype implementation for Java has been constructed, and used to conduct several case studies. Our results demonstrate that the method can provide valuable insights into the usage of the class hierarchy in a specific context, and lead to useful restructuring proposals.
Class Hierarchy Specialization
- Acta Informatica
, 1997
"... Class libraries are generally designed with an emphasis on versatility and extensibility. Applications that use a library typically exercise only part of the library's functionality. As a result, objects created by the application may contain unused members. We present an algorithm that specializes ..."
Abstract
-
Cited by 31 (8 self)
- Add to MetaCart
Class libraries are generally designed with an emphasis on versatility and extensibility. Applications that use a library typically exercise only part of the library's functionality. As a result, objects created by the application may contain unused members. We present an algorithm that specializes a class hierarchy with respect to its usage in a program P . That is, the algorithm analyzes the member access patterns for P's variables, and creates distinct classes for variables that accessdifferent members. Class hierarchy specialization reduces object size,and is hence primarily a space optimization. However, execution time may also be reduced through reduced object creation/destruction time, and caching/paging effects. 1 Introduction Class libraries are generally designed with an emphasis on versatility and extensibility. An application that uses a class library typically exercises only part of the library's functionality. Unfortunately, this leads to situations where the objects cr...
A Study of Dead Data Members in C++ Applications
- In Proc. PLDI
, 1998
"... Object-oriented applications may contain data members that can be removed from the application without affecting program behavior. Such "dead" data members may occur due to unused functionality in class libraries, or due to the programmer losing track of member usage as the application changes over ..."
Abstract
-
Cited by 29 (5 self)
- Add to MetaCart
Object-oriented applications may contain data members that can be removed from the application without affecting program behavior. Such "dead" data members may occur due to unused functionality in class libraries, or due to the programmer losing track of member usage as the application changes over time. We present a simple and efficient algorithm for detecting dead data members in C++ applications. This algorithm has been implemented using a prototype version of the IBM VisualAge C++ compiler, and applied to a number of realistic benchmark programs ranging from 600 to 58,000 lines of code. For the non-trivial benchmarks, we found that up to 27.3% of the data members in the benchmarks are dead (average 12.5%), and that up to 11.6% of the object space of these applications may be occupied by dead data members at run-time (average 4.4%). 1 Introduction Object-oriented applications may contain data members (instance variables) that can be removed from the application without affecting p...
An operational semantics and type safety proof for multiple inheritance in C++
- IN OOPSLA ’06
, 2006
"... We present an operational semantics and type safety proof for multiple inheritance in C++. The semantics models the behavior of method calls, field accesses, and two forms of casts in C++ class hierarchies exactly, and the type safety proof was formalized and machine-checked in Isabelle/HOL. Our sem ..."
Abstract
-
Cited by 8 (0 self)
- Add to MetaCart
We present an operational semantics and type safety proof for multiple inheritance in C++. The semantics models the behavior of method calls, field accesses, and two forms of casts in C++ class hierarchies exactly, and the type safety proof was formalized and machine-checked in Isabelle/HOL. Our semantics enables one, for the first time, to understand the behavior of operations on C++ class hierarchies without referring to implementation-level artifacts such as virtual function tables. Moreover, it can—as the semantics is executable—act as a reference for compilers, and it can form the basis for more advanced correctness proofs of, e.g., automated program transformations. The paper presents the semantics and type safety proof, and a discussion of the many subtleties that we encountered in modeling the intricate multiple inheritance model of C++.
OSUIF: SUIF 2.0 With Objects
- In 2nd SUIF Compiler Workshop
, 1997
"... . OSUIF is an extension to SUIF 2.0 that provides support for the compilation of object-oriented languages. OSUIF extends standard SUIF in three main areas: symbol table, intermediate language, and exception handling. The resulting system should be able to support compilers for many (but not all) ob ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
. OSUIF is an extension to SUIF 2.0 that provides support for the compilation of object-oriented languages. OSUIF extends standard SUIF in three main areas: symbol table, intermediate language, and exception handling. The resulting system should be able to support compilers for many (but not all) object-oriented languages. The two initial OSUIF front ends will support C++ and Java. 1. Introduction The original SUIF system [SCG94] is a research compiler for procedural languages like C and Fortran. While these languages cover a large spectrum of compiler research, many software developers (including the SUIF developers) use object-oriented languages today. As a result, compilation of object-oriented languages has become a relevant research area. Object-oriented languages like C++ and Java are quite different from procedural languages. The most striking language difference may be the support for polymorphism that allows pieces of code to be reused with objects of different types. This p...
Active Oberon for .NET: A Case Study in Object Model Mapping
, 2001
"... Active Oberon is a substantial evolution of the programming language Oberon. It distinguishes itself by a novel object model and by its integration into the .NET language interoperability framework. The three concepts characterizing Active Oberon are: (a) active object types, (b) a single and unifyi ..."
Abstract
- Add to MetaCart
Active Oberon is a substantial evolution of the programming language Oberon. It distinguishes itself by a novel object model and by its integration into the .NET language interoperability framework. The three concepts characterizing Active Oberon are: (a) active object types, (b) a single and unifying notion of abstraction called definition, and (c) a static module construct. These concepts are in fact powerful combinations of concepts: Active objects integrate active behavior with reactive message handling, definitions unify the units of usage, implementation and inheritance, and modules represent both package and static object. The rigid concept of class hierarchy has been sacrificed in Active Oberon to a more flexible concept of aggregation that is based on a generalized IMPLEMENTS relation. The relations IMPORTS and REFINES are used to specify static module dependencies and to derive new definitions from existing ones respectively. Active Oberon also features a block statement that is used to group sets of statements sharing certain processing attributes, in particular the handling of exceptions. Finally, a uses clause allows the use of namespaces within a module without qualification. This article is a report on a work in progress. We divide our presentation into three parts: (a) A short recall of the history of programming languages developed at the ETH, (b) an extensive conceptual overview of Active Oberon's object model called the Active Object System (AOS), (c) a discussion of the mapping of the AOS into the Common T!]pe S!]stem (CTS) exposed by .NET.
A Member Lookup Algorithm for C++
- In Proceedings of the ACM SIGPLAN'97 Conference on Programming Language Design and Implementation (Las Vegas, NV
, 1997
"... The member lookup problem in C++ is the problem of resolving a specified member name in the context of a specified class. Member lookup in C++ is complicated by the presence of virtual inheritance and multiple inheritance. In this paper, we present an efficient algorithm for member lookup in C++. We ..."
Abstract
- Add to MetaCart
The member lookup problem in C++ is the problem of resolving a specified member name in the context of a specified class. Member lookup in C++ is complicated by the presence of virtual inheritance and multiple inheritance. In this paper, we present an efficient algorithm for member lookup in C++. We also present a formalism for the multiple inheritance mechanism of C++, which we use as the basis for deriving our algorithm. The formalism may also be of use as a formal basis for deriving other C++ compiler algorithms.
Object Model Construction for Inheritance in C++ and its Applications to Program Analysis
"... Abstract. Modern object-oriented programming languages such as C++ provide convenient abstractions and data encapsulation mechanisms for software developers. However, these features also complicate testing and static analysis of programs that utilize object-oriented programming concepts. In particul ..."
Abstract
- Add to MetaCart
Abstract. Modern object-oriented programming languages such as C++ provide convenient abstractions and data encapsulation mechanisms for software developers. However, these features also complicate testing and static analysis of programs that utilize object-oriented programming concepts. In particular, the C++ language exhibits features such as multiple inheritance, static and dynamic typecasting that make static analyzers for C++ quite hard to implement. In this paper, we present an approach where static analysis is performed by lowering the original C++ program into a semantically equivalent C program. However, unlike existing translation mechanisms that utilize complex pointer arithmetic operations, virtual-base offsets, virtual-function pointer tables, and calls to run-time libraries to model C++ features, our translation is targeted towards making static program analyzers for C++ easier to write and provide more precise results. We have implemented our ideas in a framework for C++ called CILpp that is analogous to the popular C Intermediate Language (CIL) framework. We evaluate the effectiveness of our translation in a bug finding tool that uses abstract interpretation and model checking. The bug finding tool uncovered several previously unknown bugs in C++ open source projects. 1

