4 research outputs found

    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

    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

    Understanding aspects via implicit invocation

    No full text
    Aspect-oriented (AO) design and programming methods promise to improve the modularity properties of software-intensive systems. However, AO is also seen as violating fundamental design principles; and we lack a theory to guide its appropriate use. Our work rests on the idea that successful AO techniques have deep roots in implicit invocation (II) mechanisms. Elaborating this connection provides for an expedited development of both a theoretical understanding and an effective practice of AO design techniques. In this paper we show, in particular, that this bridge can be exploited to enable model checking of AO systems using existing techniques for II systems. 1
    corecore