Tools

"... 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 ..."

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 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 special ..."

Class libraries are generally designed with an emphasis on versatility and extensibility. Applications that use a library typically exercise only part of the library&apos;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&apos;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&apos;s functionality. Unfortunately, this leads to situations where the objects cr...

"... 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 cha ..."

Object-oriented applications may contain data members that can be removed from the application without affecting program behavior. Such &quot;dead&quot; 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...

"... We present an operational semantics and type safety proof for multiple inheritance in C++. The semantics models the behaviour 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 se ..."

We present an operational semantics and type safety proof for multiple inheritance in C++. The semantics models the behaviour 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 behaviour 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 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 ..."

. 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...

"... 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. 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

"... We study the algorithmic complexity of supporting late binding in dynamic object-oriented programming languages. Dynamic object-oriented languages (such as most Prototype-based languages and systems like CLOS) allow creation of new class definitions at runtime. Late binding means that procedure-call ..."

We study the algorithmic complexity of supporting late binding in dynamic object-oriented programming languages. Dynamic object-oriented languages (such as most Prototype-based languages and systems like CLOS) allow creation of new class definitions at runtime. Late binding means that procedure-call name resolution, i.e., mapping of procedure calls to method definitions, is done at run-time, rather than compile-time. Late binding is an essential feature of object-oriented programming and is present in most object-oriented languages, e.g., Java, CLOS, Smalltalk, C++ (virtual functions), etc. Name resolution for late binding is easily solved for static languages such as Java and C++; for dynamic languages, however, it is a complex problem. We propose an abstraction of the late binding problem for dynamic object-oriented languages in terms of operations on dynamic trees, and prove a time lower bound of OMEGA(lg N) per operation, ...

"... 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 unifyin ..."

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. 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 Type System (CTS) exposed by.NET. 1 ETH Programming Language History Oberon [1] is the latest member of the Pascal family of compact programming languages. From its ancestors Pascal and Modula-2 it inherits a concise, highly expressive and self-explanatory syntax, strictly enforced data types, and a module concept. In addition, Oberon features sub-typing and polymorphism

"... 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 ..."

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.

"... 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 ..."

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&apos;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.