Subject:
|
Do you like functional programming?
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Tue, 1 May 2007 18:01:04 GMT
|
Viewed:
|
5402 times
|
| |
| |
If so, this might be of interest to you. I saw it posted on
Lambda the Ultimate:
http://www.haskell.org/haskellwiki/The_Monad.Reader
The first article is entitled A Recipe for controlling Lego using Lava.
If youre not familiar with the Lava Hardware
Description Language, its a Haskell library used to compose structural circuit
descriptions and to help define physical circuit layouts.
Rather than try to summarize his article, Ill just quote the abstract/summary
he wrote himself:
The Haskell library Lava is great for describing the structure of digital
circuits: large, regular circuits can be captured by short, clear descriptions.
However, structural circuit description alone and hence Lava has a somewhat
limited application domain. Many circuits are more appropriately expressed in
terms of their desired behaviour.
In this article, I present a new module for Lava called Recipe that
provides a set of behavioural programming constructs, including mutable
variables, sequential and parallel composition, iteration and choice. Mutable
state is provided in the form of rewrite rules normal Lava functions from
state to state giving a powerful blend of the structural and behavioural
styles.
The approach taken here is also applicable to software-based embedded systems
programming. Indeed, I have developed a simple C backend for Lava, and my final
example a program that controls a brick-sorter robot runs on a Lego
Mindstorms RCX microcontoller.
|
|
1 Message in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|