Results 1 - 10
of
11
The Programming Language Jigsaw: Mixins, Modularity And Multiple Inheritance
, 1992
"... This dissertation provides a framework for modularity in programming languages. In this framework, known as Jigsaw, inheritance is understood to be an essential linguistic mechanism for module manipulation. In Jigsaw, the roles of classes in existing languages are "unbundled," by providing a suite o ..."
Abstract
-
Cited by 138 (4 self)
- Add to MetaCart
This dissertation provides a framework for modularity in programming languages. In this framework, known as Jigsaw, inheritance is understood to be an essential linguistic mechanism for module manipulation. In Jigsaw, the roles of classes in existing languages are "unbundled," by providing a suite of operators independently controlling such effects as combination, modification, encapsulation, name resolution, and sharing, all on the single notion of module. All module operators are forms of inheritance. Thus, inheritance is not in conflict with modularity in this system, but is indeed its foundation. This allows a previously unobtainable spectrum of features to be combined in a cohesive manner, including multiple inheritance, mixins, encapsulation and strong typing. Jigsaw has a rigorous semantics, based upon a denotational model of inheritance. Jigsaw provides a notion of modularity independent of a particular computational paradigm. Jigsaw can therefore be applied to a wide variet...
Traits: Composable Units of Behavior
, 2002
"... Inheritance is the fundamental reuse mechanism in object-oriented programming languages; its most prominent variants are single inheritance, multiple inheritance, and mixin inheritance. In the first part of this paper, we identify and illustrate the conceptual and practical reusability problems that ..."
Abstract
-
Cited by 123 (31 self)
- Add to MetaCart
Inheritance is the fundamental reuse mechanism in object-oriented programming languages; its most prominent variants are single inheritance, multiple inheritance, and mixin inheritance. In the first part of this paper, we identify and illustrate the conceptual and practical reusability problems that arise with these forms of inheritance. We then present a simple compositional model for structuring object-oriented programs, which we call traits. Traits are essentially groups of methods that serve as building blocks for classes and are primitive units of code reuse. In this model, classes are composed from a set of traits by specifying glue code that connects the traits together and accesses the necessary state.
Traits: Composable units of behaviour
- In Proc. European Conference on Object-Oriented Programming
, 2003
"... Abstract. Despite the undisputed prominence of inheritance as the fundamental reuse mechanism in object-oriented programming languages, the main variants — single inheritance, multiple inheritance, and mixin inheritance — all suffer from conceptual and practical problems. In the first part of this p ..."
Abstract
-
Cited by 32 (0 self)
- Add to MetaCart
Abstract. Despite the undisputed prominence of inheritance as the fundamental reuse mechanism in object-oriented programming languages, the main variants — single inheritance, multiple inheritance, and mixin inheritance — all suffer from conceptual and practical problems. In the first part of this paper, we identify and illustrate these problems. We then present traits, a simple compositional model for structuring object-oriented programs. A trait is essentially a group of pure methods that serves as a building block for classes and is a primitive unit of code reuse. In this model, classes are composed from a set of traits by specifying glue code that connects the traits together and accesses the necessary state. We demonstrate how traits overcome the problems arising from the different variants of inheritance, we discuss how traits can be implemented effectively, and we summarize our experience applying traits to refactor an existing class hierarchy.
Lowest common ancestors in trees and directed acyclic graphs
- J. Algorithms
, 2005
"... We study the problem of finding lowest common ancestors (LCA) in trees and directed acyclic graphs (DAGs). Specifically, we extend the LCA problem to DAGs and study the LCA variants that arise in this general setting. We begin with a clear exposition of Berkman and Vishkin’s simple optimal algorithm ..."
Abstract
-
Cited by 30 (0 self)
- Add to MetaCart
We study the problem of finding lowest common ancestors (LCA) in trees and directed acyclic graphs (DAGs). Specifically, we extend the LCA problem to DAGs and study the LCA variants that arise in this general setting. We begin with a clear exposition of Berkman and Vishkin’s simple optimal algorithm for LCA in trees. The ideas presented are not novel theoretical contributions, but they lay the foundation for our work on LCA problems in DAGs. We present an algorithm that finds all-pairs-representative LCA in DAGs in Õ(n 2.688) operations, provide a transitive-closure lower bound for the all-pairs-representative-LCA problem, and develop an LCA-existence algorithm that preprocesses the DAG in transitive-closure time. We also present a suboptimal but practical O(n 3) algorithm for all-pairs-representative LCA in DAGs that uses ideas from the optimal algorithms in trees and DAGs. Our results reveal a close relationship between the LCA, all-pairs-shortest-path, and transitive-closure problems. We conclude the paper with a short experimental study of LCA algorithms in trees and DAGs. Our experiments and source code demonstrate the elegance of the preprocessing-query algorithms for LCA in trees. We show that for most trees the suboptimal Θ(n log n)-preprocessing Θ(1)-query algorithm should be preferred, and demonstrate that our proposed O(n 3) algorithm for allpairs-representative LCA in DAGs performs well in both low and high density DAGs.
Clos: Integrating object-oriented and functional programming
- Communications of the ACM
, 1991
"... Lisp has a long history as a functional language, where action is invoked by calling a procedure, and where procedural abstraction and encapsulation provide convenient modularity boundaries. A number of attempts have been made to graft object-oriented programming into this framework without losing t ..."
Abstract
-
Cited by 20 (0 self)
- Add to MetaCart
Lisp has a long history as a functional language, where action is invoked by calling a procedure, and where procedural abstraction and encapsulation provide convenient modularity boundaries. A number of attempts have been made to graft object-oriented programming into this framework without losing the essential character of Lisp—to include the benefits of data abstraction, extensible type classification, incremental operator definition, and code reuse through an inheritance hierarchy. CLOS—the Common Lisp Object System[2], which is an outcome of the ANSI standardization process for Common Lisp—represents a marriage of these two traditions. We explore the landscape in which the major object-oriented facilities exist, showing how the CLOS solution is effective within the two contexts. 1 Incremental Definition of Operations A generic function, or polymorphic function as it is sometimes called, is one whose implementation depends on the types of its arguments. That is, the code that is executed for a particular set of arguments is mechanically determined
An Algebraic Semantics of Subobjects
- In Proceedings of the Tenth Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'95
, 1996
"... Existing formalisms of inheritance are not sufficient to model the complexities of the kind of multiple inheritance exemplified in C++. Any satisfactory formalism must model the complicating effects of virtual and nonvirtual base classes as well as virtual and non-virtual methods. By abstracting the ..."
Abstract
-
Cited by 14 (2 self)
- Add to MetaCart
Existing formalisms of inheritance are not sufficient to model the complexities of the kind of multiple inheritance exemplified in C++. Any satisfactory formalism must model the complicating effects of virtual and nonvirtual base classes as well as virtual and non-virtual methods. By abstracting the implementational notion of a subobject and formalizing subobject selection, we develop a formalism to model this combination of features. Not intended as a formal semantics of C++, the resulting model should nevertheless provide an essential level of understanding for language theorists and implementors in their dealings with C++ and related languages. 1 Introduction The style of multiple inheritance first proposed for Simula by Krogdahl[21] and later developed into the C++ multiple inheritance system by Stroustrup[35, 15] exemplifies a particular kind of inheritance in which the underlying imperative is to maintain the integrity of subobjects. Subobjects are historically an implementation...
Finding Least Common Ancestors in Directed Acyclic Graphs
- PROC. 12TH ANNUAL ACM-SIAM SYMPOSIUM ON DISCRETE ALGORITHMS (SODA’01
, 2001
"... ..."
Least Common Ancestors in Trees and Directed Acyclic Graphs
, 2001
"... and with a nave algorithm. We compare the performance of these algorithms as a function of the number of queries performed and the imbalance of the tree. For DAGs, we compare a transitive-closure based algorithm, an intelligent traversal algorithm, and our input-sensitive algorithm that uses LCA in ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
and with a nave algorithm. We compare the performance of these algorithms as a function of the number of queries performed and the imbalance of the tree. For DAGs, we compare a transitive-closure based algorithm, an intelligent traversal algorithm, and our input-sensitive algorithm that uses LCA in trees. We compare the performance of these algorithms as a function of DAG density. We show that the input-sensitive algorithm outperforms the other two algorithms on all test data. Keywords: Least Common Ancestor (LCA), Directed Cyclic Graph (DAG), Range Minimum Query (RMQ), Shortest Path, Cartesian Tree, Genealogy, Pedigree, Data Structure. 1. INTRODUCTION One of the fundamental algorithmic problems on trees is how to nd the least common ancestor (LCA) of a given pair of nodes. The LCA of nodes u and v in a tree is the ancestor of u and v that is located farthest from the root. The
Specialization Inheritance and Specialization Bounded Polymorphism
, 1996
"... We define a specialization inheritance mechanism for object-oriented programming, admitting covariant redefinition of both methods and instance variables in subclassing. We investigate on the semantic weakness that makes such very flexible inheritance infeasible for a statically type-checked program ..."
Abstract
- Add to MetaCart
We define a specialization inheritance mechanism for object-oriented programming, admitting covariant redefinition of both methods and instance variables in subclassing. We investigate on the semantic weakness that makes such very flexible inheritance infeasible for a statically type-checked programming language supporting polymorphic assignment and polymorphic method invocation. We show that the source of troubles is not in the covariant redefinition of methods, and present a suitable multiple dispatch mechanism. This multiple dispatch uses static type information in order to drive the execution of method invocations. Moreover it exploits the notion of method linearization (that we define in the paper) at both compile-time and run-time. The covariant redefinition of instance variables can be the source of runtime type errors in polymorphic instructions, when the update problem occurs. We devise a general mechanism to recover from the update problem. In order to be allowed to redefine ...

