Results 11 - 20
of
34
Ultrametric Semantics of Reactive Programs
"... Abstract—We describe a denotational model of higher-order functional reactive programming using ultrametric spaces and nonexpansive maps, which provide a natural Cartesian closed generalization of causal stream functions and guarded recursive definitions. We define a type theory corresponding to thi ..."
Abstract
-
Cited by 4 (4 self)
- Add to MetaCart
Abstract—We describe a denotational model of higher-order functional reactive programming using ultrametric spaces and nonexpansive maps, which provide a natural Cartesian closed generalization of causal stream functions and guarded recursive definitions. We define a type theory corresponding to this semantics and show that it satisfies normalization. Finally, we show how reactive programs written in this language may be implemented efficiently using an imperatively updated dataflow graph, and give a separation logic proof that this low-level implementation is correct with respect to the high-level semantics. I.
Dance: A declarative language for the control of humanoid robots
, 2003
"... Robots are becoming increasingly common in, and important to, many commercial, industrial, and military applications. This paper focuses on how to program humanoid robots, and in particular how to program their movements and interactions as easily and as effectively as possible. The core of this eff ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
Robots are becoming increasingly common in, and important to, many commercial, industrial, and military applications. This paper focuses on how to program humanoid robots, and in particular how to program their movements and interactions as easily and as effectively as possible. The core of this effort is the design of a domain-specific language called Dance that is highly abstract, easy to use, yet has enough expressive power to describe a wide range of useful robot movement. Dance consists of a non-reactive base inspired by Labanotation, a graphical notation for human motion, and a reactive layer based on Yampa, our latest incarnation of functional reactive programming. The reactive layer is structured using arrows, a generalization of monads, and gives a robot the ability to react to its environment in critical ways. Dance is also independent of the robot platform being used. Our target is two humanoid robots being designed and constructed in the Yale Vision and Robotics Laboratory. We have also written a simulator in which a 3D-rendering of a humanoid robot is controlled by a Dance program. 1
Mixed-level Embedding and JIT Compilation for an Iteratively Staged DSL
"... Abstract. This paper explores how to implement an iteratively staged domain-specific language (DSL) by embedding into a functional language. The domain is modelling and simulation of physical systems where models are expressed in terms of non-causal differential-algebraic equations; i.e., sets of co ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
Abstract. This paper explores how to implement an iteratively staged domain-specific language (DSL) by embedding into a functional language. The domain is modelling and simulation of physical systems where models are expressed in terms of non-causal differential-algebraic equations; i.e., sets of constraints solved through numerical simulation. What sets our language apart is that the equational constraints are first class entities allowing for an evolving model structure characterised by repeated generation of updated constraints. Hence iteratively staged. Our DSL can thus be seen as a combined functional and constraint programming language, albeit a two-level one, with the functional language chiefly serving as a meta language. However, the two levels do interact throughout the simulation. The embedding strategy we pursue is a mixture of deep and shallow, with the deep embedding enabling justin-time (JIT) compilation of the constraints as they are generated for efficiency, while the shallow embedding is used for the remainder for maximum leverage of the host language. The paper is organised around a specific DSL, but our implementation strategy should be applicable for iteratively staged languages in general. Our DSL itself is further a novel variation of a declarative constraint programming language. 1
Optimisation of dynamic, hybrid signal function networks
- In Trends in Functional Programming (TFP ’08
, 2008
"... Abstract: Functional Reactive Programming (FRP) is an approach to reactive programming where systems are structured as networks of functions operating on signals. FRP is based on the synchronous data-flow paradigm and supports both continuous-time and discrete-time signals (hybrid systems). What set ..."
Abstract
-
Cited by 3 (3 self)
- Add to MetaCart
Abstract: Functional Reactive Programming (FRP) is an approach to reactive programming where systems are structured as networks of functions operating on signals. FRP is based on the synchronous data-flow paradigm and supports both continuous-time and discrete-time signals (hybrid systems). What sets FRP apart from most other languages for similar applications is its support for systems with dynamic structure and for higher-order data-flow constructs. This raises a range of implementation challenges. This paper contributes towards advancing the state of the art of FRP implementation by studying the notion of signal change and change propagation in a setting of hybrid signal function networks with dynamic structure. To sidestep some problems of certain previous FRP implementations that are structured using arrows, we suggest working with a notion of composable, multi-input and multi-output signal functions. A clear conceptual distinction is also made between continuous-time and discrete-time signals. We then show how establishing change-related properties of the signal functions in a network allows such networks to be simplified (static optimisation) and can help reducing the amount of computation needed for executing the networks (dynamic optimisation). Interestingly, distinguishing between continuous-time and discrete-time signals allows us to characterise the change-related properties of signal functions more precisely than what we otherwise would have been able to, which is helpful for optimisation.
An Intuitive and Resource-Efficient Event Detection Algebra
, 2004
"... In reactive systems, execution is driven by external events to which the system should respond with appropriate actions. Such events can be simple, but systems are often supposed to react to sophisticated situations involving a number of simpel events occurring in accordance with some pattern. A sys ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
In reactive systems, execution is driven by external events to which the system should respond with appropriate actions. Such events can be simple, but systems are often supposed to react to sophisticated situations involving a number of simpel events occurring in accordance with some pattern. A systematic approach to handle this type of systems is to separate the mechanism for detecting composite events from the rest of the application logic. A detection mechanism listens for simple event occurrences and notifies the application when one of the complex event patterns of interest occur. The event detection mechanism can for example be based on an event algebra, i.e., expressions that correspond to the event patterns of interest are built from simple events and operators from the algebra. This thesis presents a novel event algebra with two important characteristics: It complies with algebraic laws that intuitively ought to hold for the operators of the algebra, and for a large class of expressions the detection can be correctly performed with limited resources in terms of memory and time. In addition to the declarative algebra semantics, we present an imperative detection algorithm and show that it correctly implements the algebra. This algorithm is analysed with respect to memory requirements and execution time complexity. To increase the efficiency of the algebra, we also present a semantic-preserving transformation scheme by which many expressions can be transformed to meet criteria under which limited resource requirements are guaranteed. Finally, we present a prototype implementation that combines the algebra with the event system in Java.
The essence of dataflow programming (short version
- Proc. of 3rd Asian Symp. on Programming Languages and Systems, APLAS 2005, v. 3780 of Lect. Notes in Comput. Sci
, 2005
"... Abstract. We propose a novel, comonadic approach to dataflow (stream-based) computation. This is based on the observation that both general and causal stream functions can be characterized as coKleisli arrows of comonads and on the intuition that comonads in general must be a good means to structure ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
Abstract. We propose a novel, comonadic approach to dataflow (stream-based) computation. This is based on the observation that both general and causal stream functions can be characterized as coKleisli arrows of comonads and on the intuition that comonads in general must be a good means to structure context-dependent computation. In particular, we develop a generic comonadic interpreter of languages for contextdependent computation and instantiate it for stream-based computation. We also discuss distributive laws of a comonad over a monad as a means to structure combinations of effectful and context-dependent computation. We apply the latter to analyse clocked dataflow (partial stream based) computation. 1
Higher-order non-causal modelling and simulation of structurally dynamic systems
- Linköping University Electronic Press
, 2009
"... This paper explores a novel approach to the implementation of non-causal modelling and simulation languages supporting highly structurally dynamic systems. One reason the support for structural dynamics is limited in present mainstream non-causal modelling and simulation languages is that they are d ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
This paper explores a novel approach to the implementation of non-causal modelling and simulation languages supporting highly structurally dynamic systems. One reason the support for structural dynamics is limited in present mainstream non-causal modelling and simulation languages is that they are designed and implemented on the assumption that symbolic processing of models and ultimately compilation of simulation code takes place prior to simulation. We seek to lift that restriction, without sacrificing efficiency, by exploiting just-in-time (JIT) compilation to allow new simulation code, reflecting structural changes, to be generated as the simulation progresses. Our work is carried out in a framework called Functional Hybrid Modelling that supports higher-order modelling, as higher-order modelling lends itself naturally to expressing structural dynamism. However, the central ideas of the paper should be of general interest in the area of structural dynamism. The paper provides an in-depth description of the implementation techniques we have developed as well as a performance evaluation.
A Semantic Model for Graphical User Interfaces
"... We give a denotational model for graphical user interface (GUI) programming using the Cartesian closed category of ultrametric spaces. The ultrametric structure enforces causality restrictions on reactive systems and allows well-founded recursive definitions by a generalization of guardedness. We ca ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
We give a denotational model for graphical user interface (GUI) programming using the Cartesian closed category of ultrametric spaces. The ultrametric structure enforces causality restrictions on reactive systems and allows well-founded recursive definitions by a generalization of guardedness. We capture the arbitrariness of user input (e.g., a user gets to decide the stream of clicks she sends to a program) by making use of the fact that the closed subsets of an ultrametric space themselves form an ultrametric space, allowing us to interpret nondeterminism with a “powerspace ” monad. Algebras for the powerspace monad yield a model of intuitionistic linear logic, which we exploit in the definition of a mixed linear/non-linear domain-specific language for writing GUI programs. The non-linear part of the language is used for writing reactive stream-processing functions whilst the linear sublanguage naturally captures the generativity and usage constraints on the various linear objects in GUIs, such as the elements of a DOM or scene graph. We have implemented this DSL as an extension to OCaml, and give examples demonstrating that programs in this style can be short and readable.
Exploiting structural dynamism in Functional Hybrid Modelling for simulation of ideal diodes
- Czech Technical University Publishing House
, 2010
"... nhn@cs.nott.ac.uk(Henrik Nilsson) Current main-stream non-casual modelling and simulation languages, like Modelica, are designed and implemented on the assumption that model causality remains fixed during simulation. This simplifies the language design and facilitates the generation of efficient sim ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
nhn@cs.nott.ac.uk(Henrik Nilsson) Current main-stream non-casual modelling and simulation languages, like Modelica, are designed and implemented on the assumption that model causality remains fixed during simulation. This simplifies the language design and facilitates the generation of efficient simulation code. In particular, simulation code can be generated once and for all, at compile time. However, for hybrid models, the assumption of fixed causality is very limiting: there are many examples, including simple ones, that cannot be simulated. A half-wave rectifier with an ideal diode and an in-line inductor is one such example. Functional Hybrid Modelling is a new approach to non-causal modelling where models are first-class entities and structural dynamism is supported by switching among model configurations. Fixed causality is thus not assumed. Continuous simulation remains efficient thanks to just-in-time generation of simulation code at structural changes and the use of a standard, industrial-strength solver. Re-generation of code at each structural change of course incurs an overhead, but this is typically modest. In this paper we demonstrate how Functional Hybrid Modelling makes it possible to simulate electrical circuits with ideal diodes in a straightforward manner. We consider both a half-wave rectifier and a significantly more challenging full-wave rectifier.
An Ultrametric Model of Reactive Programming
, 2010
"... We describe a denotational model of higher-order functional reactive programming using ultrametric spaces, which provide a natural Cartesian closed generalization of causal stream functions. We define a domain-specific language corresponding to the model. We then show how reactive programs written i ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
We describe a denotational model of higher-order functional reactive programming using ultrametric spaces, which provide a natural Cartesian closed generalization of causal stream functions. We define a domain-specific language corresponding to the model. We then show how reactive programs written in this language may be implemented efficiently using an imperatively updated dataflow graph and give a higher-order separation logic proof that this lowlevel implementation is correct with respect to the high-level semantics.

