EScala is an extension of Scala with support for declarative event-driven programming. It provides mechanisms for declarative definition of events and employs aspect-oriented techniques for exposing implicitly existin...
详细信息
ISBN:
(纸本)9781450305563
EScala is an extension of Scala with support for declarative event-driven programming. It provides mechanisms for declarative definition of events and employs aspect-oriented techniques for exposing implicitly existing events, which reduces the need for explicit triggering of events. EScala provides a conservative integration of declarative events into an object-oriented language. events are declared as attributes of objects and are subject to inheritance and subtype polymorphism. The language fully preserves encapsulation of objects and modular compilation of classes. Designs based on declarative events are as efficient as conventional event-driven designs. Attendees of the demonstration will see a live example that illustrates the expressiveness gained by the features of EScala. We will show how events can be defined in a declarative way and how to use such events for defining interactions among objects. We will demonstrate how declarative events can be used to replace observers and so result in more concise and modular design. Finally, we will show how to use the events library with a standard Scala compiler.
The event-driven programming pattern is pervasive in a wide range of modern software applications. Unfortunately, it is not easy to achieve good performance and responsiveness when developing event-driven applications...
详细信息
The event-driven programming pattern is pervasive in a wide range of modern software applications. Unfortunately, it is not easy to achieve good performance and responsiveness when developing event-driven applications. Traditional approaches require a great amount of programmer effort to restructure and refactor code, to achieve the performance speedup from parallelism and asynchronization. Not only does this restructuring require a lot of development time, it also makes the code harder to debug and understand. We propose an asynchronous programming model based on the philosophy of OpenMP, which does not require code restructuring of the original sequential code. This asynchronous programming model is complementary to the existing OpenMP fork-join model. The coexistence of the two models has potential to decrease developing time for parallel event-driven programs, since it avoids major code refactoring. In addition to its programming simplicity, evaluations show that this approach achieves good performance improvements consistent with more traditional event-driven parallelization. (C) 2018 Elsevier B.V. All rights reserved.
This paper deals with software design principles and guidelines to improve the reusability and maintainability of event-driven (ED) programs. The paper examines how well the principles of structured software design fr...
详细信息
This paper deals with software design principles and guidelines to improve the reusability and maintainability of event-driven (ED) programs. The paper examines how well the principles of structured software design from the procedural programming field can be applied to the event-driven environment. Taking into account the unique characteristics of event-driven programming (E-DP), additional guidelines that are specific to this field are proposed. The guidelines presented here deal with modularizing event procedures, graphical representation of E-D programs, sharing data between event/general procedures, using user-defined objects, and developing cohesive procedures and forms. (C) 1998 Elsevier Science Inc. All rights reserved.
Autonomous provides mobile robot with the ability to traverse from one point to another point while avoiding any obstacles that lie within its path. One of the challenges is to reduce the complexity of the development...
详细信息
ISBN:
(纸本)9781457719677
Autonomous provides mobile robot with the ability to traverse from one point to another point while avoiding any obstacles that lie within its path. One of the challenges is to reduce the complexity of the development of programs that can provide the pertaining artificial intelligence. The objective of this paper is to describe the implementation of autonomous navigation through the use of event-driven programming technique which was based on finite state machines (FSM). By using FSM to describe the behaviour of a navigating mobile robot, an equivalent algorithm can be developed. The algorithm can be relatively easy translated to a suitable program with event-driven programming technique. Two types of navigation, maze navigation and grid following;were implemented by persons with minimum to intermediate programming skill;exhibiting the flexibility and ease of implementation of this technique.
The event-driven programming pattern is pervasive in a wide range of modern software applications. Unfortunately, it is not easy to achieve good performance and responsiveness when developing event-driven applications...
详细信息
ISBN:
(纸本)9781509028252
The event-driven programming pattern is pervasive in a wide range of modern software applications. Unfortunately, it is not easy to achieve good performance and responsiveness when developing event-driven applications. Traditional approaches require a great amount of programmer effort to restructure and refactor code, to achieve the performance speedup from parallelism and asynchronization. Not only does this restructuring require a lot of development time, it also makes the code harder to debug and understand. We propose an asynchronous programming model based on the philosophy of OpenMP, which does not require code restructuring of the original sequential code. This asynchronous programming model is complementary to the existing OpenMP fork-join model. The coexistence of the two models has potential to decrease developing time for parallel event-driven programs, since it avoids major code refactoring. In addition to its programming simplicity, evaluations show that this approach achieves good performance improvements consistent with more traditional event-driven parallelization.
We describe the design and implementation of P, a domain-specific language to write asynchronous eventdriven code. P allows the programmer to specify the system as a collection of interacting state machines, which co...
详细信息
ISBN:
(纸本)9781450320146
We describe the design and implementation of P, a domain-specific language to write asynchronous eventdriven code. P allows the programmer to specify the system as a collection of interacting state machines, which communicate with each other using events. P unifies modeling and programming into one activity for the programmer. Not only can a P program be compiled into executable code, but it can also be tested using model checking techniques. P allows the programmer to specify the environment, used to "close" the system during testing, as nondeterministic ghost machines. Ghost machines are erased during compilation to executable code;a type system ensures that the erasure is semantics preserving. The P language is designed so that a P program can be checked for responsiveness-the ability to handle every event in a timely manner. By default, a machine needs to handle every event that arrives in every state. But handling every event in every state is impractical. The language provides a notion of deferred events where the programmer can annotate when she wants to delay processing an event. The default safety checker looks for presence of unhandled events. The language also provides default liveness checks that an event cannot be potentially deferred forever. P was used to implement and verify the core of the USB device driver stack that ships with Microsoft Windows 8. The resulting driver is more reliable and performs better than its prior incarnation (which did not use P);we have more confidence in the robustness of its design due to the language abstractions and verification provided by P.
In event-driven programming we can react to an event by binding methods to it as handlers, but such a handler binding in current event systems is explicit and requires explicit reason about the graph of event propagat...
详细信息
ISBN:
(纸本)9781467365635
In event-driven programming we can react to an event by binding methods to it as handlers, but such a handler binding in current event systems is explicit and requires explicit reason about the graph of event propagation even for straightforward cases. On the other hand, the handler binding in reactive programming is implicit and constructed through signals. Recent approaches to support either event-driven programming or reactive programming show the need of using both the two styles in a program. We propose an extension to expand event systems to support reactive programming by enabling the automation of handler bindings. With such an extension programmers can use events to cover both the implicit style in reactive programming and the explicit style in event-driven programming. We first describe the essentials of reactive programming, signals and signal assignments, in terms of events, handlers, and bindings, then point out the lack of automation in existing event systems. Unlike most research activities we expand event systems to support signals rather than port signals to event systems. In this paper we also show a prototype implementation and translation examples to evaluate the concept of automation.
We describe the design and implementation of P, a domain-specific language to write asynchronous eventdriven code. P allows the programmer to specify the system as a collection of interacting state machines, which co...
详细信息
ISBN:
(纸本)9781450320146
We describe the design and implementation of P, a domain-specific language to write asynchronous eventdriven code. P allows the programmer to specify the system as a collection of interacting state machines, which communicate with each other using events. P unifies modeling and programming into one activity for the programmer. Not only can a P program be compiled into executable code, but it can also be tested using model checking techniques. P allows the programmer to specify the environment, used to "close" the system during testing, as nondeterministic ghost machines. Ghost machines are erased during compilation to executable code; a type system ensures that the erasure is semantics preserving. The P language is designed so that a P program can be checked for responsiveness-the ability to handle every event in a timely manner. By default, a machine needs to handle every event that arrives in every state. But handling every event in every state is impractical. The language provides a notion of deferred events where the programmer can annotate when she wants to delay processing an event. The default safety checker looks for presence of unhandled events. The language also provides default liveness checks that an event cannot be potentially deferred forever. P was used to implement and verify the core of the USB device driver stack that ships with Microsoft Windows 8. The resulting driver is more reliable and performs better than its prior incarnation (which did not use P); we have more confidence in the robustness of its design due to the language abstractions and verification provided by P.
This paper presents a formulation of multiparty session types (MPSTs) for practical fault-tolerant distributed programming. We tackle the challenges faced by session types in the context of distributed systems involvi...
详细信息
This paper presents a formulation of multiparty session types (MPSTs) for practical fault-tolerant distributed programming. We tackle the challenges faced by session types in the context of distributed systems involving asynchronous and concurrent partial failures s such as supporting dynamic replacement of failed parties and retrying failed protocol segments in an ongoing multiparty session s in the presence of unreliable failure detection. Key to our approach is that we develop a novel model of event-driven concurrency for multiparty sessions. Inspired by real-world practices, it enables us to unify the session-typed handling of regular I/O events with failure handling and the combination of features needed to express practical fault-tolerant protocols. Moreover, the characteristics of our model allow us to prove a global progress property for well-typed processes engaged in multiple concurrent sessions, which does not hold in traditional MPST systems. To demonstrate its practicality, we implement our framework as a toolchain and runtime for Scala, and use it to specify and implement a session-typed version of the cluster management system of the industrial-strength Apache Spark data analytics framework. Our session-typed cluster manager composes with other vanilla Spark components to give a functioning Spark runtime;e.g., it can execute existing third-party Spark applications without code modification. A performance evaluation using the TPC-H benchmark shows our prototype implementation incurs an average overhead below 10%.
The iPhone SDK provides a powerful platform for the development of applications that make use of iPhone capabilities, such as sensors, GPS, Wi-Fi, or Bluetooth connectivity. We observe that so far the development of i...
详细信息
The iPhone SDK provides a powerful platform for the development of applications that make use of iPhone capabilities, such as sensors, GPS, Wi-Fi, or Bluetooth connectivity. We observe that so far the development of iPhone applications has mostly been restricted to using Objective-C. However, developing applications in plain Objective-C on the iPhone OS suffers from limitations, such as the need for explicit memory management and lack of syntactic extension mechanism. Moreover, when developing distributed applications in Objective-C, programmers have to manually deal with distribution concerns, such as service discovery, remote communication, and failure handling. In this paper, we discuss our experience in porting the Scheme programming language to the iPhone OS and how it can be used together with Objective-C to develop iPhone applications. To support the interaction between Scheme programs and the underlying iPhone APIs, we have implemented a language symbiosis layer that enables programmers to access the iPhone SDK libraries from Scheme. In addition, we have designed high-level distribution constructs to ease the development of distributed iPhone applications in an event-driven style. We validate and discuss these constructs with a series of examples, including an iPod controller, a maps application, and a distributed multiplayer Scrabble-like game. We discuss the lessons learned from this experience for other programming language ports to mobile platforms. Copyright (c) 2011 John Wiley & Sons, Ltd.
暂无评论