[Haskell-cafe] EDSL's using Filet-O-Fish of Barrelfish project

C K Kashyap ckkashyap at gmail.com
Mon Feb 15 08:33:44 EST 2010


Thank you very much,

What would be your recommendation on how to get a grasp of FoF - would the
tic-tac-toe sample help - could you share that please?

Regards,
Kashyap

On Sun, Feb 14, 2010 at 11:27 PM, Pierre-Evariste Dagand <pedagand at gmail.com
> wrote:

> Hi,
>
> On Sun, Feb 14, 2010 at 4:44 PM, C K Kashyap <ckkashyap at gmail.com> wrote:
> > For example, lets say, I wanted to write a EDSL for Linux's network
> drivers. Could I use
> > Filet-O-Fish and generate a EDSL that allows me to write a driver in a
> > really highlevel manner and then generate the "C" code for it?
>
> That sounds perfectly reasonable to me.
>
> However, you write "generate a EDSL that allows me to [...]".
> Filet-o-Fish will not "generate" an EDSL for you. Filet-o-Fish will
> help you implement the *back-end* of your (E)DSL compiler. You still
> have to define a syntax and a semantics for your (E)DSL. FoF is here
> to bridge the gap from your (E)DSL semantics to C, by doing it for
> you.
>
> In Barrelfish, we have implemented the capability system this way: we
> have defined the syntax and semantics of a DSL for specifying
> capability systems, called Hamlet. Then, the Hamlet compiler back-end
> has been implemented with FoF, which allowed us, for example, to
> quickcheck some key property of the generated C code, by working at
> the (more friendly) FoF code level (assuming that FoF is "correct"
> ;-).
>
> For fun, we have implemented tic-tac-toe in the capability system.
> Each game state is represented by a capability, you can "retype" a
> capability from one to another iif this is a valid tic-tac-toe move.
> For a 3x3 board, that's more than 4.800 unique capabilities, which is
> quite a huge number of caps for an OS :-) You won't find that code in
> the official Barrelfish, though.
>
> Whereas this work was done in the specific context of Barrelfish,
> other people have designed DSLs for Linux. The examples I have in
> mind, related to your question are:
>  * Devil [http://phoenix.inria.fr/index.php/projects/past-projects/devil]:
> a device interface language, but still quite low-level compared to
> what you're interested in ;
>  * Bossa [http://bossa.lip6.fr/]: a DSL for specifying schedulers for
> Linux, which automatically turns the spec into code directly
> integrated in the Linux kernel.
>
> I had the opportunity to discuss with the designer of these systems
> and it is clear to me that this could be done with FoF as well.
>
>
> Hope this help,
>
> --
> Pierre-Evariste DAGAND
> http://perso.eleves.bretagne.ens-cachan.fr/~dagand/
>



-- 
Regards,
Kashyap
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100215/eb51070a/attachment.html


More information about the Haskell-Cafe mailing list