[Yhc] Fwd: Re: Yhc port to Mindstorms

Neil Mitchell ndm at cs.york.ac.uk
Thu Mar 1 11:55:04 EST 2007


Hi,

Tobias Muehlberg and I have just given the aforementioned talk.  The
abstract is at the bottom of this email, and the slides are available
at:

  http://www.cs.york.ac.uk/plasma/talkrelated/318.pdf

> I'm keen to get more details of this.  Did it use Yhc?  Where does
> Lava come in?  (We were thinking of using some form of FRP, as in
> Frob or Yampa.)  -- P

My approach was just to add a C backend to Lava, in which circuits get
turned into C.  Lava alone is not great for control systems, but Koen
Claessen and Gordon Pace have defined an Esterel-like language
(amongst other languages), called Flash, on top of Lava.  Essentially,
if you write an interepreter/semantics for your own custom language in
Lava, then you get a compiler from that language to VHDL (and now C)
for free.  See Koen's thesis for more details:

  http://www.cs.chalmers.se/~koen/pubs/phd01-thesis.ps

    (in particular chapter 6, and perhaps chapter 5)

The seperation of Lava and languages like Flash reminds me of the
pure/monadic divide when programming in Haskell, e.g. Lava (pure)
functions can be called from Flash (impure) programs, and Flash
programs can be turned into Lava functions by "running" them.

The Lava homepage is:

  http://www.cs.chalmers.se/~koen/Lava/

I can provide my C/MindStorms backend to anyone who wants it.  But it
is not the most efficient code!

Perhaps this general approach is more attractive to hardware designers
than software programmers, because Lava expands out most recursion at
compile time (which is good for parallelism, but not for binary size).
This isn't a problem when you have languages like Flash available, but
you might then ask "is this really programming in Haskell"?  So, read
the slides and judge for yourself!

Thanks everyone for your interest!

Matt.


Room    : CS202J
Date    : 01 March 2007
Time    : 12:15 -- 13:15
Speaker : Matthew Naylor, Jan Tobias Muehlberg
Title   : FUN with Lego Mindstorms

Abstract:
In this talk, we will present how Lego Mindstorms robots can
serve as a delightful example for the development of
safety-critical embeded software systems. We will give a brief
overview of Esterel's SCADE suite and show how it can be used to
design programs for Lego robots, to prove safety properties for
these programs and to generate C source code that actually runs
on the Mindstorms RCX. In addition to this, Matthew will explain
how the whole stuff can be done using Haskell. The talk is based
on our experience from the Reactive Systems Design module.

----- End forwarded message -----


More information about the Yhc mailing list