10 research outputs found

    Building scalable software systems in the multicore era

    Get PDF
    Software systems must face two challenges today: growing complexity and increasing parallelism in the underlying computational models. The problem of increased complexity is often solved by dividing systems into modules in a way that permits analysis of these modules in isolation. The problem of lack of concurrency is often tackled by dividing system execution into tasks that permits execution of these tasks in isolation. The key challenge in software design is to manage the explicit and implicit dependence between modules that decreases modularity. The key challenge for concurrency is to manage the explicit and implicit dependence between tasks that decreases parallelism. Even though these challenges appear to be strikingly similar, current software design practices and languages do not take advantage of this similarity. The net effect is that the modularity and concurrency goals are often tackled mutually exclusively. Making progress towards one goal does not naturally contribute towards the other. My position is that for programmers that are not formally and rigorously trained in the concurrency discipline the safest and most productive way to get scalability in their software is by improving modularity of their software using programming language features and design practices that reconcile modularity and concurrency goals. I briefly discuss preliminary efforts of my group, but we have only touched the tip of the iceberg

    Event type polymorphism

    Get PDF
    Subtype polymorphism is an important feature available in most modern type systems which makes code reuse and specialization possible. Recent works on separation of crosscutting concerns have created event interfaces (types) to decouple subjects from handlers. Extending the notion of subtyping to these event interfaces is a logical step. In this paper, we define event type polymorphism in the context of the Ptolemy language. Ptolemy allows declaring quantified, typed events which provide an interface between subjects and handlers. We add the notion of polymorphic event types to the Ptolemy language, defining a subtype relation among event types which in turn allows for both depth and width subtyping with regard to event context. Since Ptolemy only has explicit event announcement, our semantics is simpler and easier to reason about when compared to previously defined approaches. We also give the first formally defined static semantics for polymorphic events as well as demonstrate its usefulness via examples

    Combining Event-driven and Capsule-oriented Programming to Improve Integrated System Design

    Get PDF
    As concurrent software becomes more pervasive, models that provide both safe concurrency and modular reasoning become more important. Panini is one such model, and provides both sparse and cognizant interference based around the concept of capsules. Additionally, web frameworks, Graphical User Interface (GUI) libraries, and other projects are event-driven in nature, making events a commonly used programming paradigm for certain tasks. However, it would be difficult to use Panini in an event-driven manner, where there may be multiple capsules interested in a given event. Therefore, by integrating capsules and events one would be able to apply Panini\u27s modular reasoning to commonly event-driven tasks more easily. Several challenges must be addressed in he integration. These are defining the semantics of event messages, scheduling of handlers to maximize concurrency, and how to keep to Panini\u27s current semantics which allow modular reasoning. To solve this problem, @Paninij, an implementation of Panini, is extended to add event mechanisms to capsules. As a result, this new combined model allows capsules to interact using both procedures and event announcements. This extension of Panini is helpful for writing concurrent, modular software that lends itself more naturally to event-driven programming

    Gang-of-Four Design Patterns: A Case Study of the Unified Model and the Eos Programming Language

    Get PDF
    In earlier work, we showed that the AspectJ notions of aspect and class can be unified in a new module construct that we called the classpect, and that this new model is simpler and able to accommodate a broader set of requirements for modular solutions to complex integration problems. We embodied our unified model in the Eos language design. The main contribution of this article is a case study, which considers the implementation of the Gang-of-Four (GOF) design patterns in Eos to analyze the effect of new programming language constructs on these implementations. We also compare these implementations with the AspectJ\u27s implementation. Our result shows that the Eos implementation showed improvement in 7 out of 23 design patterns, and are no worse in case of other 16 patterns. These improvements were mainly manifested in being able to realize the intent of the design patterns more clearly. The design structures realized in the Eos implementation provide supporting evidence for the potential benefits of the unified model

    Translucid contracts: Expressive specification and modular verification of aspect oriented interfaces

    Get PDF
    As aspect-oriented (AO) programming techniques become more widely used, their use in critical systems such as aircraft and telephone networks, will become more widespread. However, careful reasoning about AO code seems difficult because: (1) advice may apply in too many places, and (2) standard specification techniques do not limit the control effects of advice. Commonly used black box specification techniques cannot easily specify control effects, such as advice that does not proceed to the advised code. In this work we avoid the first problem by using Ptolemy, a language with explicit event announcement. To solve the second problem we give a simple and understandable specification technique, translucid contracts, that not only allows programmers to write modular specifications for advice and advised code, but also allows them to reason about the code\u27s control effects. We show that translucid contracts support sound modular verification of typical interaction patterns used in AO code. We also show that translucid contracts allow interesting control effects to be specified and enforced

    A unified design of capsules

    Get PDF
    The process of reading, writing, and reasoning about concurrent programs benefits from better abstractions for concurrency than what many common languages, such as Java, offer. Capsule-oriented programming and the Panini language utilize the idea of combining state and control within a linguistic mechanism along with asynchronous message passing to provide sequentially trained programmers with an actor-like language that preserves the expected sequential semantics. The initial design of the Panini language splits the world into two distinct elements – capsules and systems. A capsule acts as the unit of both modularity and concurrency in the program. A system acts as the sole point of composition for capsule instances. The problem is that the dichotomy between systems and capsules leads to uncomposable and non-modular programs. The connections between capsule instances in a system declaration are fixed at exactly one point and all capsules instances in program must be declared and connected to each other at a single block of code. This thesis will explore the implications on modularity and reuse of systems when a basic design decision – separating capsules and systems – is relaxed to allow a capsule to declare an internal composition of other capsule instances

    Design, Semantics and Implementation of the Ptolemy Programming Language: A Language with Quantified Typed Events

    Get PDF
    Implicit invocation (II) and aspect-oriented (AO) languages provide software designers with related but distinct mechanisms and strategies for decomposing programs into modules and composing modules into systems. II languages have explicitly announced events that run registered observer methods. AO languages have implicitly announced events that run method-like but more powerful advice. A limitation of II languages is their inability to refer to a large set of events succinctly. They also lack the expressive power of AO advice. Limitations of AO languages include potentially fragile dependence on syntactic structure that may hurt maintainability, and limits on the available set of implicit events and the reflective contextual information available. Quantified, typed events, as implemented in our language Ptolemy, solve all these problems. This paper describes Ptolemy and explores its advantages relative to both II and AO languages

    Formal foundations for hybrid effect analysis

    Get PDF
    Type-and-effect systems are a powerful tool for program construction and verification. Type-and-effect systems are useful because it can help reduce bugs in computer programs, enable compiler optimizations and also provide sort of program documentation. As software systems increasingly embrace dynamic features and complex modes of compilation, static effect systems have to reconcile over competing goals such as precision, soundness, modularity, and programmer productivity. In this thesis, we propose the idea of combining static and dynamic analysis for effect systems to improve precision and flexibility. We describe intensional effect polymorphism, a new foundation for effect systems that integrates static and dynamic effect checking. Our system allows the effect of polymorphic code to be intensionally inspected. It supports a highly precise notion of effect polymorphism through a lightweight notion of dynamic typing. When coupled with parametric polymorphism, the powerful system utilizes runtime information to enable precise effect reasoning, while at the same time retains strong type safety guarantees. The technical innovations of our design include a relational notion of effect checking, the use of bounded existential types to capture the subtle interactions between static typing and dynamic typing, and a differential alignment strategy to achieve efficiency in dynamic typing. We introduce the idea of first-class effects, where the computational effect of an expression can be programmatically reflected, passed around as values, and analyzed at run time. A broad range of designs “hard-coded in existing effect-guided analyses can be supported through intuitive programming abstractions. The core technical development is a type system with a couple of features. Our type system provides static guarantees to application-specific effect management properties through refinement types, promoting “correct-by-design effect-guided programming. Also, our type system computes not only the over-approximation of effects, but also their under-approximation. The duality unifies the common theme of permission vs. obligation in effect reasoning. Finally, we show the potential benefit of intensional effects by applying it to an event-driven system to obtain safe concurrency. The technical innovations of our system include a novel effect system to soundly approximate the dynamism introduced by runtime handlers registration, a static analysis to precompute the effects and a dynamic analysis that uses the precomputed effects to improve concurrency. Our design simplifies modular concurrency reasoning and avoids concurrency hazards

    Unifying aspect- and object-oriented design

    Get PDF
    The contribution of this work is the design and evaluation of a programming language model that unifies aspects and classes as they appear in AspectJ-like languages. We show that our model preserves the capabilities of AspectJ-like languages, while improving the conceptual integrity of the language model and the compositionality of modules. The improvement in conceptual integrity is manifested by the reduction of specialized constructs in favor of uniform orthogonal constructs. The enhancement in compositionality is demonstrated by better modularization of integration and higher-order crosscutting concerns.This article is published as Rajan, Hridesh, and Kevin J. Sullivan. "Unifying aspect-and object-oriented design." ACM Transactions on Software Engineering and Methodology (TOSEM) 19, no. 1 (2009): 3. 10.1145/1555392.1555396. Posted with permission</p
    corecore