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