Redex v6.4 "broke" LambdaJS

51 views
Skip to first unread message

natash...@brown.edu

unread,
Sep 6, 2017, 2:22:14 PM9/6/17
to Racket Users
(For some reason the mail I sent to users<at>racket-lang.org last week never made it to the Google Group, so I'm posting directly...)

Hello,

I'm a 2nd year PhD student working with Shriram Krishnamurthi on improving Redex's testing/checking performance and capabilities.

I was looking to use LambdaJS (http://cs.brown.edu/research/plt/dl/jssem/v1/) as a case study, but unfortunately jscore.ss does not compile under the latest version of Redex.

The shortcut used in the eval reduction relation
...
with
[(--> (σ (in-hole E e_1)) (σ (in-hole E e_2)))
(==> e_1 e_2)]))
now throws an error "reduction-relation: shortcut name may not be a non-terminal in: e_1."

I believe this was caused by the following change (https://github.com/racket/redex/blob/master/redex-lib/redex/HISTORY.txt) in Redex v6.4:

changed shortcuts in --> so that non-terminals are no
longer allowed for the names in the shortcut "parameters"
These shortcut names were never constrained to actually be
non-terminals, so this change is intended entirely to be
able to give a helpful error message in an attempt to avoid
confusion

As a Redex novice, I'm failing to avoid confusion in this case. Any advice on a simple way to change the shortcut / reduction relation to respect this change in Redex is greatly appreciated.

Thanks for the help!

Ben Greenman

unread,
Sep 6, 2017, 2:40:11 PM9/6/17
to natash...@brown.edu, Racket Users
I think it'll work if you delete the underscores, e.g. change "e_1" to "e1".


--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sam Caldwell

unread,
Sep 6, 2017, 2:45:18 PM9/6/17
to Ben Greenman, natash...@brown.edu, Racket Users
History behind this change: https://groups.google.com/d/msg/racket-users/1SVVqsg4ARQ/vVxKiAvaAQAJ
Relevant commit: https://github.com/racket/redex/commit/cbb2d88b98fb814325f0d4ee468e1abaf4f6c3a7

So changing e_1 and e_2 to be anything that is *not* a non-terminal in your model should do the trick.

-Sam Caldwell

natash...@brown.edu

unread,
Sep 6, 2017, 3:02:50 PM9/6/17
to Racket Users, benjamin...@gmail.com, natash...@brown.edu
> To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "Racket Users" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

Thank you for the relevant group posting... I see, it's an identifier because it is in the context of a shortcut. I was mistaking the type of e_1 to be a pattern in the context of inner in-hole. Unfortunately, I did not parse 'shortcut name' in the error message to mean 'shortcut name for an expected identifier.' Thanks for the clarification!
Reply all
Reply to author
Forward
0 new messages