USENIX Technical Program - Abstract - Domain-Specific Languages 99
Monadic Robotics
John Peterson, Yale University; and Greg Hager, The Johns Hopkins University
Abstract
We have developed a domain specific language for the construction of
robot controllers, Frob (Functional ROBotics). The semantic basis for
Frob is Functional Reactive Programming, or simply FRP, a purely
functional model of continuous time, interactive systems. FRP is
built around two basic abstractions: behaviors, values defined
continuously in time, and events, discrete occurances in time. On
this foundation, we have constructed abstractions specific to the
domain of robotics. Frob adds yet another abstraction: the
task, a basic unit of work defined by a continuous behavior and a
terminating event.
This paper examines two interrelated aspects of Frob. First, we study
the design of systems based on FRP and how abstractions defined using
FRP can capture essential domain-specific concepts for systems
involving interaction over time. Second, we demonstrate an
application of monads, used here to implement Frob tasks. By
placing our task abstraction in a monadic framework, we are able to
organize task semantics in a modular way, allowing new capabilities to
be added without pervasive changes to the system.
We present several robot control algorithms specified using Frob.
These programs are clear, succinct, and modular, demonstrating the
power of our approach.
|