SEwPR PLT Redex code error? (pg 225)

40 views
Skip to first unread message

Andrew Kent

unread,
Feb 23, 2016, 1:09:08 PM2/23/16
to Racket Users
A student today pointed out the standard reduction definition for ISWIM on pg 225 in SEwPR is broken:

#lang racket
(require redex)

;; iswim
;; definition from pg 217
(define-language iswim
((M N L K) X (λ X M) (M M) b (o2 M M) (o1 M))
(o o1 o2)
(o1 add1 sub1 iszero)
(o2 + - *)
(b number)
((V U W) b X (λ X M))
(E hole (V E) (E M) (o V ... E M ...))
(X Y Z variable-not-otherwise-mentioned))

(define-metafunction iswim
subst : any ... -> any)

;; iswim-standard
;; definition from pg 225
(define iswim-standard
(reduction-relation
iswim
(v ((λ X M) V) (subst M X V) vω)
(v (o b ...) (δ (o b ...)) δ)
with
[(--> (in-hole E M) (in-hole E N)) (v M N)]))


Error message: "reduction-relation: shortcut name may not be a non-terminal in: M"

Only posting this here since I couldn't find anything about it on the errata.

Have a good day!

Best,
Andrew

Matthias Felleisen

unread,
Feb 23, 2016, 1:22:53 PM2/23/16
to Andrew Kent, Racket Users

This is must be a regression. The build-process for the second part includes running the figures (and their tests).
> --
> 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.

Robby Findler

unread,
Feb 23, 2016, 1:27:06 PM2/23/16
to Matthias Felleisen, Andrew Kent, Racket Users
This is a backwards incompatibility that we discussed on this very
mailing list, actually. The syntax error message I believe pinpoints
the change that needs to be made to the model -- simply renaming the
variables M and N should do the trick.

Sorry for the inconvenience.

Robby

Sam Caldwell

unread,
Feb 23, 2016, 1:27:22 PM2/23/16
to Matthias Felleisen, Andrew Kent, Racket Users
I am pretty sure it is a result of this change:

https://groups.google.com/d/topic/racket-users/blV3EEkJxVk/discussion

Matthias Felleisen

unread,
Feb 23, 2016, 1:33:50 PM2/23/16
to Sam Caldwell, Andrew Kent, Racket Users

My fault!
Reply all
Reply to author
Forward
0 new messages