[plt-scheme] Redex q. about using 'with' for parallel composition

From: John Clements (clements at brinckerhoff.org)
Date: Mon Oct 26 13:11:13 EDT 2009

I'd like to use redex to extend a small relation to parallel  
composition.  That is: if a list contains a and b that reduce to a'  
and b', then I'd like to be able to extend this relation to

blah ... a blah ... b blah ...

reduces to

blah ... blah ... blah ... a' b'

(I'm just moving the a' and b' to the end for readability.)

Put differently, I'd like a with clause like this:

[(--> (sel-or-act_1 ... a sel-or-act_2 ... b sel-or-act_3 ...)
          (sel-or-act_1 ... sel-or-act_2 ... sel-or-act_3 ... c d))
     (==> (a b) (c d))]

Unfortunately, redex's 'with' won't let me do this, because it's  
unhappy about the shape of (==> (a b) (c d)).  I also can't write it  
as (==> a b c d).

Naturally, I can accomplish this differently by just not using the  
'with' clause and expanding the individual reductions into the desired  
form.  However, I thought I'd ask whether there's another easy way to  
accomplish this.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2484 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20091026/4b82b348/attachment.p7s>

Posted on the users mailing list.