+1<br><br><div class="gmail_quote">2011/7/26 Eric Tanter <span dir="ltr"><<a href="mailto:etanter@dcc.uchile.cl">etanter@dcc.uchile.cl</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
+1!<br>
<br>
-- Éric<br>
<div><div></div><div class="h5"><br>
<br>
On Jul 26, 2011, at 9:30 PM, Casey Klein wrote:<br>
<br>
> On Mon, Jul 25, 2011 at 11:20 PM, David Van Horn <<a href="mailto:dvanhorn@ccs.neu.edu">dvanhorn@ccs.neu.edu</a>> wrote:<br>
>><br>
>> Cute! Thanks for the cool planet package. Here's a slightly larger example<br>
>> using Redex, adapted from redex/examples/arithmetic.rkt:<br>
>><br>
>> #lang planet asumu/sweet racket<br>
>> require rename-in(redex [term quote])<br>
>><br>
>> define-language lang<br>
>> e n<br>
>> δ1(e)<br>
>> δ2(e e)<br>
>> δ1 √ add1 sub1<br>
>> δ2 + - * /<br>
>> E hole<br>
>> δ1(E)<br>
>> δ2(e E)<br>
>> δ2(E e)<br>
>> n number<br>
>><br>
>> define v<br>
>> reduction-relation lang<br>
>> { √(n) --> ,sqrt('n) }<br>
>> { add1(n) --> ,add1('n) }<br>
>> { sub1(n) --> ,sub1('n) }<br>
>> { +(n_1 n_2) --> ,+('n_1 'n_2) }<br>
>> { -(n_1 n_2) --> ,-('n_1 'n_2) }<br>
>> { *(n_1 n_2) --> ,*('n_1 'n_2) }<br>
>> { /(n_1 n_2) --> ,/('n_1 'n_2) }<br>
>><br>
>> define -->_v<br>
>> context-closure v lang E<br>
>><br>
>> traces -->_v '-(*(√(36) /(1 2)) +(1 2))<br>
>><br>
><br>
> If only Redex could typeset in this syntax :)<br>
><br>
> _________________________________________________<br>
> For list-related administrative tasks:<br>
> <a href="http://lists.racket-lang.org/listinfo/users" target="_blank">http://lists.racket-lang.org/listinfo/users</a><br>
<br>
<br>
_________________________________________________<br>
For list-related administrative tasks:<br>
<a href="http://lists.racket-lang.org/listinfo/users" target="_blank">http://lists.racket-lang.org/listinfo/users</a></div></div></blockquote></div><br><br clear="all"><br>-- <br>Ismael<br><br>