Many types of interactive applications, including reactive systems implemented in hardware, inter... more Many types of interactive applications, including reactive systems implemented in hardware, interactive physics simulations and games, raise particular challenges when it comes to testing and debugging. Reasons include de facto lack of reproducibility and difficulties of automatically generating suitable test data. This paper demonstrates that certain variants of functional reactive programming (FRP) implemented in pure functional languages can mitigate such difficulties by offering referential transparency at the level of whole programs. This opens up for a multi-pronged approach for assisting with testing and debugging that works across platforms, including assertions based on temporal logic, recording and replaying of runs (also from deployed code), and automated random testing using QuickCheck. When combined with extensible forms of FRP that allow for constrained side effects, it allows us to not only validate software simulations but to analyse the effect of faults in reactive ...
ABSTRACT Functional reactive programming, or FRP, is a paradigm for programming hybrid systems --... more ABSTRACT Functional reactive programming, or FRP, is a paradigm for programming hybrid systems -- i.e., systems containing a combination of both continuous and discrete components -- in a high-level, declarative way. The key ideas in FRP are its notions of continuous, time-varying values, and time-ordered sequences of discrete events.
ABSTRACT This paper describes Braincurry, a domain-specific, declarative language for describing ... more ABSTRACT This paper describes Braincurry, a domain-specific, declarative language for describing and analysing experiments in neuroscience. Braincurry has three goals: to allow experiments and data analysis to be described in a way that is sufficiently abstract to serve as a definition; to facilitate carrying out experiments by executing such descriptions; and to be directly usable by end users: neurosci-entists. We adopted an experimental and incremental approach to the design and implementation of Braincurry, focusing on the neurophysiological response to vi-sual stimuli in locusts as a test case. Braincurry is currently implemented as an embedding in Haskell, which is a highly effective tool for this kind of exploratory language design. The declarative nature of Haskell and its flexible syntax fitted with our goals. We discuss the requirements for a realistic language meeting the above goals, describe the current Braincurry design and how it may be gener-alised, and explain how some particularly challenging hard real-time requirements were met.
GUI programming in Haskell has developed along two lines: a purely functional one that includes F... more GUI programming in Haskell has developed along two lines: a purely functional one that includes Fudgets, FranTk, and, most recently, Fruit while a more conventional eld of re- search has let to wxHaskell, a powerful portable GUI library in the imperative, object oriented style. This research began with a project to combine Fruit with wx- Haskell. While this effort demonstrated
Abstract In this paper, we present an implementation of a modular synthesizer in Haskell using Ya... more Abstract In this paper, we present an implementation of a modular synthesizer in Haskell using Yampa. A synthesizer, be it a hardware instrument or a pure software implementation, as here, is said to be modular if it provides sound-generating and sound-shaping ...
Machine (FAM), which can be considered as an optimized SECD machine, has been constructed [Car84]... more Machine (FAM), which can be considered as an optimized SECD machine, has been constructed [Car84]. However, the environment based scheme seems to be best suited for languages with strict semantics [FH88, p. 241]. Also, it is probably not so suitable for parallel ...
ABSTRACT The modeling and simulation of physical systems is of key importance in many areas of sc... more ABSTRACT The modeling and simulation of physical systems is of key importance in many areas of science and engineering, and thus can bene- fit from high-quality software tools. In previous research we have demonstrated how functional programming can form the basis of an expressive language for causal hybrid modeling and simulation. There is a growing realization, however, that a move toward non-causal modeling is necessary for coping with the ever increasing size and complexity of modeling problems. Our goal is to combine the strengths of functional programming and non-causal modeling to create a powerful, strongly typed fully declarative modeling language that provides modeling and simulation capabilities beyond the current state of the art. Although our work is still in its very early stages, we believe that this paper clearly articulates the need for improved modeling languages and shows how functional programming techniques can play a pivotal role in meeting this need.
In this demonstration, we present an implementation of a modular synthesizer in Haskell using Yam... more In this demonstration, we present an implementation of a modular synthesizer in Haskell using Yampa. A synthesizer, be it a hard- ware instrument or a pure software implementation, as here, is said to be modular if it provides sound-generating and sound-shaping components that can be interconnected in arbitrary ways. Yampa, a Haskell-embedded implementation of Functional Reactive Pro- gramming, supports flexible
ABSTRACT Functional Reactive Programming (FRP) is a framework for reactive programming in a funct... more ABSTRACT Functional Reactive Programming (FRP) is a framework for reactive programming in a functional setting. FRP has been applied to a number of domains, such as graphical an-imation, graphical user interfaces, robotics, and computer vision. Recently, we have been ...
This article describes the implementation of a debugger for lazy functional languages like Haskel... more This article describes the implementation of a debugger for lazy functional languages like Haskell. The key idea is to construct a declarative trace which hides the operational details of lazy evaluation. However, to avoid excessive memory consumption, the trace is constructed one piece at a time, as needed during a debugging session, by automatic re-execution of the program being debugged. The article gives a fairly detailed account of both the underlying ideas and of our implementation, and also presents performance figures which demonstrate the feasibility of the approach.
Machine (FAM), which can be considered as an optimized SECD machine, has been constructed [Car84]... more Machine (FAM), which can be considered as an optimized SECD machine, has been constructed [Car84]. However, the environment based scheme seems to be best suited for languages with strict semantics [FH88, p. 241]. Also, it is probably not so suitable for parallel ...
Lazy functional languages are declarative and allow the programmer to write programs where operat... more Lazy functional languages are declarative and allow the programmer to write programs where operational issues such as the evaluation order are left implicit. This should be reflected in the design of debuggers for such languages to avoid burdening the programmer with ...
Many types of interactive applications, including reactive systems implemented in hardware, inter... more Many types of interactive applications, including reactive systems implemented in hardware, interactive physics simulations and games, raise particular challenges when it comes to testing and debugging. Reasons include de facto lack of reproducibility and difficulties of automatically generating suitable test data. This paper demonstrates that certain variants of functional reactive programming (FRP) implemented in pure functional languages can mitigate such difficulties by offering referential transparency at the level of whole programs. This opens up for a multi-pronged approach for assisting with testing and debugging that works across platforms, including assertions based on temporal logic, recording and replaying of runs (also from deployed code), and automated random testing using QuickCheck. When combined with extensible forms of FRP that allow for constrained side effects, it allows us to not only validate software simulations but to analyse the effect of faults in reactive ...
ABSTRACT Functional reactive programming, or FRP, is a paradigm for programming hybrid systems --... more ABSTRACT Functional reactive programming, or FRP, is a paradigm for programming hybrid systems -- i.e., systems containing a combination of both continuous and discrete components -- in a high-level, declarative way. The key ideas in FRP are its notions of continuous, time-varying values, and time-ordered sequences of discrete events.
ABSTRACT This paper describes Braincurry, a domain-specific, declarative language for describing ... more ABSTRACT This paper describes Braincurry, a domain-specific, declarative language for describing and analysing experiments in neuroscience. Braincurry has three goals: to allow experiments and data analysis to be described in a way that is sufficiently abstract to serve as a definition; to facilitate carrying out experiments by executing such descriptions; and to be directly usable by end users: neurosci-entists. We adopted an experimental and incremental approach to the design and implementation of Braincurry, focusing on the neurophysiological response to vi-sual stimuli in locusts as a test case. Braincurry is currently implemented as an embedding in Haskell, which is a highly effective tool for this kind of exploratory language design. The declarative nature of Haskell and its flexible syntax fitted with our goals. We discuss the requirements for a realistic language meeting the above goals, describe the current Braincurry design and how it may be gener-alised, and explain how some particularly challenging hard real-time requirements were met.
GUI programming in Haskell has developed along two lines: a purely functional one that includes F... more GUI programming in Haskell has developed along two lines: a purely functional one that includes Fudgets, FranTk, and, most recently, Fruit while a more conventional eld of re- search has let to wxHaskell, a powerful portable GUI library in the imperative, object oriented style. This research began with a project to combine Fruit with wx- Haskell. While this effort demonstrated
Abstract In this paper, we present an implementation of a modular synthesizer in Haskell using Ya... more Abstract In this paper, we present an implementation of a modular synthesizer in Haskell using Yampa. A synthesizer, be it a hardware instrument or a pure software implementation, as here, is said to be modular if it provides sound-generating and sound-shaping ...
Machine (FAM), which can be considered as an optimized SECD machine, has been constructed [Car84]... more Machine (FAM), which can be considered as an optimized SECD machine, has been constructed [Car84]. However, the environment based scheme seems to be best suited for languages with strict semantics [FH88, p. 241]. Also, it is probably not so suitable for parallel ...
ABSTRACT The modeling and simulation of physical systems is of key importance in many areas of sc... more ABSTRACT The modeling and simulation of physical systems is of key importance in many areas of science and engineering, and thus can bene- fit from high-quality software tools. In previous research we have demonstrated how functional programming can form the basis of an expressive language for causal hybrid modeling and simulation. There is a growing realization, however, that a move toward non-causal modeling is necessary for coping with the ever increasing size and complexity of modeling problems. Our goal is to combine the strengths of functional programming and non-causal modeling to create a powerful, strongly typed fully declarative modeling language that provides modeling and simulation capabilities beyond the current state of the art. Although our work is still in its very early stages, we believe that this paper clearly articulates the need for improved modeling languages and shows how functional programming techniques can play a pivotal role in meeting this need.
In this demonstration, we present an implementation of a modular synthesizer in Haskell using Yam... more In this demonstration, we present an implementation of a modular synthesizer in Haskell using Yampa. A synthesizer, be it a hard- ware instrument or a pure software implementation, as here, is said to be modular if it provides sound-generating and sound-shaping components that can be interconnected in arbitrary ways. Yampa, a Haskell-embedded implementation of Functional Reactive Pro- gramming, supports flexible
ABSTRACT Functional Reactive Programming (FRP) is a framework for reactive programming in a funct... more ABSTRACT Functional Reactive Programming (FRP) is a framework for reactive programming in a functional setting. FRP has been applied to a number of domains, such as graphical an-imation, graphical user interfaces, robotics, and computer vision. Recently, we have been ...
This article describes the implementation of a debugger for lazy functional languages like Haskel... more This article describes the implementation of a debugger for lazy functional languages like Haskell. The key idea is to construct a declarative trace which hides the operational details of lazy evaluation. However, to avoid excessive memory consumption, the trace is constructed one piece at a time, as needed during a debugging session, by automatic re-execution of the program being debugged. The article gives a fairly detailed account of both the underlying ideas and of our implementation, and also presents performance figures which demonstrate the feasibility of the approach.
Machine (FAM), which can be considered as an optimized SECD machine, has been constructed [Car84]... more Machine (FAM), which can be considered as an optimized SECD machine, has been constructed [Car84]. However, the environment based scheme seems to be best suited for languages with strict semantics [FH88, p. 241]. Also, it is probably not so suitable for parallel ...
Lazy functional languages are declarative and allow the programmer to write programs where operat... more Lazy functional languages are declarative and allow the programmer to write programs where operational issues such as the evaluation order are left implicit. This should be reflected in the design of debuggers for such languages to avoid burdening the programmer with ...
Uploads
Papers by Henrik Nilsson