Results 1  10
of
10
Ultrametric Semantics of Reactive Programs
"... Abstract—We describe a denotational model of higherorder 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 8 (3 self)
 Add to MetaCart
Abstract—We describe a denotational model of higherorder 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 lowlevel implementation is correct with respect to the highlevel semantics. I.
A Semantic Model for Graphical User Interfaces
, 2011
"... We give a denotational model for graphical user interface (GUI) programming in terms of the cartesian closed category of ultrametric spaces. The metric structure allows us to capture natural restrictions on reactive systems, such as causality, while still allowing recursively defined values. We capt ..."
Abstract

Cited by 7 (1 self)
 Add to MetaCart
We give a denotational model for graphical user interface (GUI) programming in terms of the cartesian closed category of ultrametric spaces. The metric structure allows us to capture natural restrictions on reactive systems, such as causality, while still allowing recursively defined values. 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 a metric space themselves form a metric space under the Hausdorff metric, allowing us to interpret nondeterminism with a “powerspace ” monad on ultrametric spaces. The powerspace monad is commutative, and hence gives rise to a model of linear logic. We exploit this fact by constructing a mixed linear/nonlinear domainspecific language for GUI programming. The linear sublanguage naturally captures the 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.
Run Your Research On the Effectiveness of Lightweight Mechanization
"... Formal models serve in many roles in the programming language community. In its primary role, a model communicates the idea of a language design; the architecture of a language tool; or the essence of a program analysis. No matter which role it plays, however, a faulty model doesn’t serve its purpos ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
Formal models serve in many roles in the programming language community. In its primary role, a model communicates the idea of a language design; the architecture of a language tool; or the essence of a program analysis. No matter which role it plays, however, a faulty model doesn’t serve its purpose. One way to eliminate flaws from a model is to write it down in a mechanized formal language. It is then possible to state theorems about the model, to prove them, and to check the proofs. Over the past nine years, PLT has developed and explored a lightweight version of this approach, dubbed Redex. In a nutshell, Redex is a domainspecific language for semantic models that is embedded in the Racket programming language. The effort of creating a model in Redex is often no more burdensome than typesetting it with LaTeX; the difference is that Redex comes with tools for the semantics engineering life cycle. In this paper we report on a validation of this form of lightweight mechanization. The largest part of this validation concerns the formalization and exploration of nine ICFP 2009 papers in Redex, an effort that uncovered mistakes in all nine papers. The results suggest that Redexbased lightweight modeling is effective and easy to integrate into the work flow of a semantics engineer. This experience also suggests lessons for the developers of other mechanization tools.
HigherOrder Functional Reactive Programming in Bounded Space
"... Functional reactive programming (FRP) is an elegant and successful approach to programming reactive systems declaratively. The high levels of abstraction and expressivity that make FRP attractive as a programming model do, however, often lead to programs whose resource usage is excessive and hard to ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
Functional reactive programming (FRP) is an elegant and successful approach to programming reactive systems declaratively. The high levels of abstraction and expressivity that make FRP attractive as a programming model do, however, often lead to programs whose resource usage is excessive and hard to predict. In this paper, we address the problem of space leaks in discretetime functional reactive programs. We present a functional reactive programming language that statically bounds the size of the dataflow graph a reactive program creates, while still permitting use of higherorder functions and highertype streams such as streams of streams. We achieve this with a novel linear type theory that both controls allocation and ensures that all recursive definitions are wellfounded. We also give a denotational semantics for our language by combining recent work on metric spaces for the interpretation of higherorder causal functions with lengthspace models of spacebounded computation. The resulting category is doubly closed and hence forms a model of the logic of bunched implications.
Causality For Free! Parametricity Implies Causality for Functional Reactive Programs
"... Functional Reactive Programming (FRP) is a model of reactive systems in which signals are timedependent values, and signal functions are functions between signals. Signal functions are required to be causal, in that output behaviour at time t is only allowed to depend on input behaviour up to time ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
Functional Reactive Programming (FRP) is a model of reactive systems in which signals are timedependent values, and signal functions are functions between signals. Signal functions are required to be causal, in that output behaviour at time t is only allowed to depend on input behaviour up to time t. In order to enforce causality, many FRP libraries are arrowized, in that they provide combinators for building signal functions, rather than allowing users to write functions directly. In this paper, we provide a definition of deep causality (which coincides with the usual definition on signals of base type, but differs on nested signals). We show that FRP types can be interpreted in System Fω extended with a kind of time, and show that in this interpretation, a “theorems for free” argument shows that parametric functions are deep causal. Since all System Fω functions are parametric, this implies that all implementable functions are deep causal. This model is the formal basis of the agdafrpjs FRP library for the dependently typed programming language Agda, which compiles to JavaScript and executes in the browser. Assuming parametricity of Agda, this allows reactive programs to be written as regular functions over signals, without sacrificing causality. All results in this paper have been mechanically verified in Agda. 1.
An Ultrametric Model of Reactive Programming
, 2010
"... We describe a denotational model of higherorder functional reactive programming using ultrametric spaces, which provide a natural Cartesian closed generalization of causal stream functions. We define a domainspecific 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 higherorder functional reactive programming using ultrametric spaces, which provide a natural Cartesian closed generalization of causal stream functions. We define a domainspecific 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 higherorder separation logic proof that this lowlevel implementation is correct with respect to the highlevel semantics.
Representing Contractive Functions on Streams
 UNDER CONSIDERATION FOR PUBLICATION IN THE JOURNAL OF FUNCTIONAL PROGRAMMING
, 2011
"... Streams, or infinite lists, have many applications in functional programming, and are naturally defined using recursive equations. But how do we ensure that such equations make sense, i.e. that they actually produce welldefined streams? In this article we present a new approach to this problem, bas ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
Streams, or infinite lists, have many applications in functional programming, and are naturally defined using recursive equations. But how do we ensure that such equations make sense, i.e. that they actually produce welldefined streams? In this article we present a new approach to this problem, based upon the topological notion of contractive functions on streams. In particular, we give a sound and complete representation theorem for contractive functions on streams, illustrate the use of this theorem as a practical means to produce welldefined streams, and show how the efficiency of the resulting definitions can be improved using another representation of contractive functions.
Representing Contractive Functions on Streams (Extended Version)
 UNDER CONSIDERATION FOR PUBLICATION IN THE JOURNAL OF FUNCTIONAL PROGRAMMING
, 2011
"... Streams, or infinite lists, have many applications in functional programming, and are naturally defined using recursive equations. But how do we ensure that such equations make sense, i.e. that they actually produce welldefined streams? In this article we present a new approach to this problem, bas ..."
Abstract
 Add to MetaCart
Streams, or infinite lists, have many applications in functional programming, and are naturally defined using recursive equations. But how do we ensure that such equations make sense, i.e. that they actually produce welldefined streams? In this article we present a new approach to this problem, based upon the topological notion of contractive functions on streams. In particular, we give a sound and complete representation theorem for contractive functions on streams, illustrate the use of this theorem as a practical means to produce welldefined streams, and show how the efficiency of the resulting definitions can be improved using another representation of contractive functions.
U N I V E R S I
"... This project aims to develop an animation framework for Links to help programmers model animation on the World Wide Web. We incorporate the idea of Functional Reactive Animation into the design of our framework. Our work strengthens the simplicity and expressiveness of Links by separating the model ..."
Abstract
 Add to MetaCart
This project aims to develop an animation framework for Links to help programmers model animation on the World Wide Web. We incorporate the idea of Functional Reactive Animation into the design of our framework. Our work strengthens the simplicity and expressiveness of Links by separating the model and the presentation. It enables programmers to be able to rapidly prototype animations. i Acknowledgements Fisrtly, I would like to express my gratitude to my supervisor, Mr. Ian Stark, for his clear guidance throughout this project. My work benefited to a great extent from his kind and intelligent advice. I need also thank Mr. Samuel Lindley, for his invaluable insight that helped me to cope with some of the most difficult problems during the development. ii Declaration I declare that this thesis was composed by myself, that the work contained herein is my own except where explicitly stated otherwise in the text, and that this work has not
Simple and Efficient HigherOrder Reactive Programming
, 2012
"... Functional reactive programming (FRP) is an elegant approach to declaratively specify reactive systems. However, the powerful abstractions of FRP have historically made it difficult to predict and control the resource usage of programs written in this style. In this paper we give a simple type theor ..."
Abstract
 Add to MetaCart
Functional reactive programming (FRP) is an elegant approach to declaratively specify reactive systems. However, the powerful abstractions of FRP have historically made it difficult to predict and control the resource usage of programs written in this style. In this paper we give a simple type theory for higherorder functional reactive programming, as well as a natural implementation strategy for it. Our type theory simplifies and generalizes prior type systems for reactive programming. At the same time, we give a an efficient implementation strategy which eagerly deallocates old values, ruling out space and time leaks, two notorious sources of inefficiency in reactive programs. Our language neither restricts the expressive power of the FRP model, nor does it require a complex substructural type system to track the resource usage of programs. We also show that for programs welltyped under our type system, our implementation strategy of eager deallocation is safe: we show the soundness of our type system under our implementation strategy, using a novel stepindexed Kripke logical relation.