Functional Reactive Programming for Real-Time Reactive Systems

Authors:

Zhanyong Wan

Abstract:

A real-time reactive system continuously reacts to stimuli from the environment by sending out responses, where each reaction must be made within certain time bound.  As computers are used more often to control all kinds of devices, such systems are gaining popularity rapidly.  However, the programming tools for them lag behind.

In this thesis we present RT-FRP, a language for real-time reactive systems.  RT-FRP can be executed with guaranteed resource bounds, and improves on previous languages for the same domain by allowing a restricted form of recursive switching, which is a source of both expressiveness and computational cost.  The balance between cost guarantee and expressiveness is achieved with a carefully designed syntax and type system.

To better suit hybrid systems and event-driven systems, we have designed two variants of RT-FRP called H-FRP and E-FRP respectively.  We give H-FRP a continuous-time semantics natural for modeling hybrid systems and an operational semantics suitable for a discrete implementation.  We show that under certain conditions the operational semantics converges to the continuous-time semantics as the sampling interval approaches zero.  We also present a provably correct compiler for E-FRP, and use E-FRP to program both real and simulated robots.

Bibtex:

 @phdthesis{wan-phd
    ,author={Wan, Zhanyong}
    ,title={Functional Reactive Programming for Real-Time Reactive
            Systems}
    ,school={Department of Computer Science, Yale University}
    ,year={2002}
    ,month={December}
    } 

Links:

wan-thesis.pdf