272 research outputs found

    Brand Objects for Nominal Typing

    Get PDF
    Combinations of structural and nominal object typing in systems such as Scala, Whiteoak, and Unity have focused on extending existing nominal, class-based systems with structural subtyping. The typical rules of nominal typing do not lend themselves to such an extension, resulting in major modifications. Adding object branding to an existing structural system integrates nominal and structural typing without excessively complicating the type system. We have implemented brand objects to explicitly type objects, using existing features of the structurally typed language Grace, along with a static type checker which treats the brands as nominal types. We demonstrate that the brands are useful in an existing implementation of Grace, and provide a formal model of the extension to the language

    Modular language processors as framework completions

    Get PDF
    Journal ArticleThe conceptual and specificational power of denotational semantics for programming language design has been amply demonstrated. We report here on a language implementation method that is similarly semantically motivated, but is based upon object-oriented design principles, and results in flexible and evolvable language processors. We apply this technique to the area of object-oriented (O-O) languages, in the form of a general metalevel architecture for objects and inheritance that facilitates the development of compilers and interpreters for 0-0 languages. This development strategy maintains architectural modularity by mapping conceptual language design decisions to isolatable parts of resulting language processors. Our architecture, which is presented as an OO framework, is characterized by (i) support for a broad set of modularity features including encapsulation and strong typing, and (ii) an "unbundled" view of inheritance, semantic features of which are decomposed by means of a set of module combination operations (combinators). We describe an implementation of our framework in C++, and assess its utility by constructing a compiler for a simple 0 - 0 extension to the programming language C. We further argue the flexibility of the resulting processor by outlining the incorporation of several significant extensions to the basic module language. We claim that the use of such a framework for compiler construction has many advantages, including a systematic language development method, processor software reuse, language extensibility, and potential for interoperability among languages.

    The programming language jigsaw: mixins, modularity and multiple in heritance

    Get PDF
    technical reportThis 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 variety of languages especially special purpose languages where the effort of designing specific mechanisms for modularity is difficult to justify but which could still benefit from such mechanisms. The framework is used to derive an extension of Modula-3 that supports the new operations An efficient implementation strategy is developed for this extension The performance of this scheme is on a par with the methods employed by the highest performance object oriented language processors currently available

    ETYMA: a framework for modular systems

    Get PDF
    Journal ArticleModularity, i.e. support for the flexible construction, adaptation, and combination of units of software, is an important goal in many systems. In most cases, however, systems achieve only a few aspects of modularity. The problem can be traced to the inflexibility, or the limited view of modularity taken by the underlying architecture of these systems. As a remedy, we show that the notions fundamental to object-oriented programming, i.e. classes and inheritance, can be formulated as a simple meta-level architecture that can be effectively reused in a wide variety of contexts. We have realized such an architecture as an O-O framework, and constructed two significant and distinct completions of it. Systems based on this framework benefit not only from design and code reuse, but also from the flexibility that the architecture offers. In addition, the architecture represents a unification of the fundamental ideas of several similar but subtly different module systems

    Objects as session-typed processes

    Full text link
    A key idea in object-oriented programming is that objects encapsulate state and interact with each other by message exchange. This perspective suggests a model of computation that is inherently concurrent (to facilitate simultaneous mes-sage exchange) and that accounts for the effect of message exchange on an object’s state (to express valid sequences of state transitions). In this paper we show that such a model of computation arises naturally from session-based commu-nication. We introduce an object-oriented programming lan-guage that has processes as its only objects and employs lin-ear session types to express the protocols of message ex-change and to reason about concurrency and state. Based on various examples we show that our language supports the typical patterns of object-oriented programming (e.g., en-capsulation, dynamic dispatch, and subtyping) while guar-anteeing session fidelity in a concurrent setting. In addition, we show that our language facilitates new forms of expres-sion (e.g., type-directed reuse, internal choice), which are not available in current object-oriented languages. We have implemented our language in a prototype compiler

    An Object-Oriented Model for Extensible Concurrent Systems: the Composition-Filters Approach

    Get PDF
    Applying the object-oriented paradigm for the development of large and complex software systems offers several advantages, of which increased extensibility and reusability are the most prominent ones. The object-oriented model is also quite suitable for modeling concurrent systems. However, it appears that extensibility and reusability of concurrent applications is far from trivial. The problems that arise, the so-called inheritance anomalies are analyzed and presented in this paper. A set of requirements for extensible concurrent languages is formulated. As a solution to the identified problems, an extension to the object-oriented model is presented; composition filters. Composition filters capture messages and can express certain constraints and operations on these messages, for example buffering. In this paper we explain the composition filters approach, demonstrate its expressive power through a number of examples and show that composition filters do not suffer from the inheritance anomalies and fulfill the requirements that were established
    • …
    corecore