28 research outputs found

    Schedulability, Response Time Analysis and New Models of P-FRP Systems

    Get PDF
    Functional Reactive Programming (FRP) is a declarative approach for modeling and building reactive systems. FRP has been shown to be an expressive formalism for building applications of computer graphics, computer vision, robotics, etc. Priority-based FRP (P-FRP) is a formalism that allows preemption of executing programs and guarantees real-time response. Since functional programs cannot maintain state and mutable data, changes made by programs that are preempted have to be rolled back. Hence in P-FRP, a higher priority task can preempt the execution of a lower priority task, but the preempted lower priority task will have to restart after the higher priority task has completed execution. This execution paradigm is called Abort-and-Restart (AR). Current real-time research is focused on preemptive of non-preemptive models of execution and several state-of-the-art methods have been developed to analyze the real-time guarantees of these models. Unfortunately, due to its transactional nature where preempted tasks are aborted and have to restart, the execution semantics of P-FRP does not fit into the standard definitions of preemptive or non-preemptive execution, and the research on the standard preemptive and non-preemptive may not applicable for the P-FRP AR model. Out of many research areas that P-FRP may demands, we focus on task scheduling which includes task and system modeling, priority assignment, schedulability analysis, response time analysis, improved P-FRP AR models, algorithms and corresponding software. In this work, we review existing results on P-FRP task scheduling and then present our research contributions: (1) a tighter feasibility test interval regarding the task release offsets as well as a linked list based algorithm and implementation for scheduling simulation; (2) P-FRP with software transactional memory-lazy conflict detection (STM-LCD); (3) a non-work-conserving scheduling model called Deferred Start; (4) a multi-mode P-FRP task model; (5) SimSo-PFRP, the P-FRP extension of SimSo - a SimPy-based, highly extensible and user friendly task generator and task scheduling simulator.Computer Science, Department o

    Functional Programming for Embedded Systems

    Get PDF
    Embedded Systems application development has traditionally been carried out in low-level machine-oriented programming languages like C or Assembler that can result in unsafe, error-prone and difficult-to-maintain code. Functional programming with features such as higher-order functions, algebraic data types, polymorphism, strong static typing and automatic memory management appears to be an ideal candidate to address the issues with low-level languages plaguing embedded systems. However, embedded systems usually run on heavily memory-constrained devices with memory in the order of hundreds of kilobytes and applications running on such devices embody the general characteristics of being (i) I/O- bound, (ii) concurrent and (iii) timing-aware. Popular functional language compilers and runtimes either do not fare well with such scarce memory resources or do not provide high-level abstractions that address all the three listed characteristics. This work attempts to address this gap by investigating and proposing high-level abstractions specialised for I/O-bound, concurrent and timing-aware embedded-systems programs. We implement the proposed abstractions on eagerly-evaluated, statically-typed functional languages running natively on microcontrollers. Our contributions are divided into two parts - Part 1 presents a functional reactive programming language - Hailstorm - that tracks side effects like I/O in its type system using a feature called resource types. Hailstorm’s programming model is illustrated on the GRiSP microcontroller board.Part 2 comprises two papers that describe the design and implementation of Synchron, a runtime API that provides a uniform message-passing framework for the handling of software messages as well as hardware interrupts. Additionally, the Synchron API supports a novel timing operator to capture the notion of time, common in embedded applications. The Synchron API is implemented as a virtual machine - SynchronVM - that is run on the NRF52 and STM32 microcontroller boards. We present programming examples that illustrate the concurrency, I/O and timing capabilities of the VM and provide various benchmarks on the response time, memory and power usage of SynchronVM

    Schedulability Analysis for the Abort-and-Restart Model

    Get PDF
    In real-time systems, a schedulable task-set guarantees that all tasks complete before their deadlines. In functional programming, atomic execution provides the correctness of the program. Priority-based functional reactive programming (P-FRP) allows the usage of functional programming in the real-time system environment. The abort-and-restart (AR) is a scheme to implement P-FRP but an appropriate scheduling approach does not exist at the moment. Hence, efficient analysis is needed for the AR model. In this thesis, the schedulability analysis for the AR model is introduced and it shows that finding the critical instant for the AR model with periodic and sporadic tasks is intractable, and a new formulation is derived. Afterwards, a new priority assignment scheme is developed that has the performance close to the exhaustive search method, which is intractable for large systems. The technique of deferred preemption is employed and a new model, deferred abort (DA), provides better schedulability and dominates the non-preemptive model. Lastly, a tighter analysis is introduced and the technique of the multi-set approach from the analysis of cache related preemption delay is employed to introduce a new approach, multi-bag. The multi-bag approach can apply to both the AR model and the DA model. In the experiments, the schedulability of the AR model is improved at each stage of the research in this thesis

    Guaranteeing Responsiveness and Consistency in Dynamic, Asynchronous Graphical User Interfaces

    Get PDF
    This dissertation proposes a programming model for Graphical User Interfaces (GUIs) that relieves the programmer of a difficult and error-prone task: orchestrating concurrent responses to events to ensure data dependencies are always enforced correctly. In this programming model, rather than defining program responses to events, the programmer defines the data dependencies that exist in the GUI and the methods by which those dependencies may be enforced – a run-time system uses this specification to generate responses to events. The approach gives the following guarantee: the same sequence of events produces the same results, regardless of the timing of those events. The dissertation demonstrates the benefits of the proposed programming model with implementations of several example user interfaces. At the core of this programming model is a data structure known as a property model. A property model composes responses to individual events into a single reactive program that runs asynchronously. The program's results are used to update the GUI. The program is constructed in a manner that respects all data dependencies, thereby guaranteeing that results are consistent regardless of the length of time taken by individual responses. The core reactive program may be extended with features that support additional functionality, such as access to prior variable values, optional data dependencies, and identifying unused variables. The dissertation defines the semantics of the construction and execution of this reactive program formally. The dissertation shows how property models may be defined as a composition of reusable components. This is essential for modeling GUIs whose structures change in response to user events by the addition or removal of components. Components can contain data and dependencies as well as templates that describe how dependencies arise from composition with other components. Furthermore, templates can be written for arrays of components to define dependencies that arise among them. One key task of the property model is planning by which methods dependencies will be enforced. The dissertation describes how a specialized planner can be constructed that is able to create a plan for a specific property model. This specialized planner is essentially a Deterministic Finite-state Automaton (DFA), and can be orders of magnitude faster than a general-purpose planner

    Declarative Support for Prototyping Interactive Systems

    Get PDF
    The development of complex, multi-user, interactive systems is a difficult process that requires both a rapid iterative approach, and the ability to reason carefully about system designs. This thesis argues that a combination of declarative prototyping and formal specification provides a suitable way of satisfying these requirements. The focus of this thesis is on the development of software tools for prototyping interactive systems. In particular, it uses a declarative approach, based on the functional programming paradigm. This thesis makes two contributions. The most significant contribution is the presentation of FranTk, a new Graphical User Interface language, embedded in the functional language Haskell. It is suitable for prototyping complex, concurrent, multi-user systems. It allows systems to be built in a high level, structured manner. In particular, it provides good support for specifying real-time properties of such systems. The second contribution is a mechanism that allows a formal specification to be derived from a high level FranTk prototype. The approach allows this to be done automatically. This specification can then be checked, with tool support, to verify some safety properties about a system. To avoid the state space explosion problem that would be faced when verifying an entire system, we focus on partial verification. This concentrates on key areas of a design: in particular this means that we only derive a specification from parts of a prototype. To demonstrate the scalability of both the prototyping and verification approaches, this thesis uses a series of case studies including a multi-user design rationale editor and a prototype data-link Air Traffic Control system

    Proceedings of the 1994 Monterey Workshop, Increasing the Practical Impact of Formal Methods for Computer-Aided Software Development: Evolution Control for Large Software Systems Techniques for Integrating Software Development Environments

    Get PDF
    Office of Naval Research, Advanced Research Projects Agency, Air Force Office of Scientific Research, Army Research Office, Naval Postgraduate School, National Science Foundatio

    Tracing the Compositional Process. Sound art that rewrites its own past: formation, praxis and a computer framework

    Get PDF
    The domain of this thesis is electroacoustic computer-based music and sound art. It investigates a facet of composition which is often neglected or ill-defined: the process of composing itself and its embedding in time. Previous research mostly focused on instrumental composition or, when electronic music was included, the computer was treated as a tool which would eventually be subtracted from the equation. The aim was either to explain a resultant piece of music by reconstructing the intention of the composer, or to explain human creativity by building a model of the mind. Our aim instead is to understand composition as an irreducible unfolding of material traces which takes place in its own temporality. This understanding is formalised as a software framework that traces creation time as a version graph of transactions. The instantiation and manipulation of any musical structure implemented within this framework is thereby automatically stored in a database. Not only can it be queried ex post by an external researcher—providing a new quality for the empirical analysis of the activity of composing—but it is an integral part of the composition environment. Therefore it can recursively become a source for the ongoing composition and introduce new ways of aesthetic expression. The framework aims to unify creation and performance time, fixed and generative composition, human and algorithmic “writing”, a writing that includes indeterminate elements which condense as concurrent vertices in the version graph. The second major contribution is a critical epistemological discourse on the question of ob- servability and the function of observation. Our goal is to explore a new direction of artistic research which is characterised by a mixed methodology of theoretical writing, technological development and artistic practice. The form of the thesis is an exercise in becoming process-like itself, wherein the epistemic thing is generated by translating the gaps between these three levels. This is my idea of the new aesthetics: That through the operation of a re-entry one may establish a sort of process “form”, yielding works which go beyond a categorical either “sound-in-itself” or “conceptualism”. Exemplary processes are revealed by deconstructing a series of existing pieces, as well as through the successful application of the new framework in the creation of new pieces
    corecore