[racket] Where to put the ellipsis?

From: Justin R. Slepak (jrslepak at ccs.neu.edu)
Date: Mon Jul 15 07:19:07 EDT 2013

Not knowing your intent here, I can't say for sure where you should put the ellipsis. The left-hand side of the reduction rule binds (V ...) -- a V from each of a list of (tid ____)s. If the goal is to treat them all as the same V duplicated in each (tid ____), you can use a where clause and metafunction to bind the unique element of that list of Vs (but you may want to change the LHS pattern to make sure that list is nonempty). If the goal is just to apply that side-condition to every V, I usually use a separate metafunction that will perform the side-condition check on each element of a list (and return #t or #f).

---
Justin Slepak
PhD student, Computer Science dept.

----- Original Message -----
From: Monica Tomson <monica.tomson at gmail.com>
To: users at racket-lang.org
Sent: Mon, 15 Jul 2013 04:28:57 -0400 (EDT)
Subject: [racket] Where to put the ellipsis?

Hi,

I have the following reduction rule, it keeps on throwing the compiling
error:missing ellipsis with pattern variable in template in: V

I am confused where to put the ellipsis?


(--> ;((V ε) S (fn ((λ X M) ε_f) κ))
        ;((M (update ε_f X σ_n)) S κ)
     ((tid  (V ε (fn ((λ X M) ε_f) κ))) ...) ; tid, context
     ((tid  (M  (update ε_f X σ_n) κ)) ...)
     tcesk3
     (where σ_n ,(fresh-σ))
     (side-condition
      (not (redex-match thread-cesk-iswim-plus X (term V ))) )  ; ERROR:
syntax: missing ellipsis with pattern variable in template in: V
    (side-condition
      (begin (store-update! (term σ_n) (term (V ε)) Store) #t)))

Thanks,

--Shuying



Posted on the users mailing list.