Re: [racket-users] Redex - constraining what is used to fill a hole

2015-12-13 Thread Robby Findler
On Sunday, December 13, 2015, Sam Caldwell wrote: > > I'm not completely following the design goals here because it seems > > like the desire to reduce only State-Qs could be achieved by writing > > rules that reduced only State-Qs (not arbitrary states). Or are you > > saying that State-Qs are o

Re: [racket-users] Redex - constraining what is used to fill a hole

2015-12-13 Thread Sam Caldwell
> I'm not completely following the design goals here because it seems > like the desire to reduce only State-Qs could be achieved by writing > rules that reduced only State-Qs (not arbitrary states). Or are you > saying that State-Qs are only allowed in the context? If so, then you > could write E

Re: [racket-users] Redex - constraining what is used to fill a hole

2015-12-13 Thread Robby Findler
I'm not completely following the design goals here because it seems like the desire to reduce only State-Qs could be achieved by writing rules that reduced only State-Qs (not arbitrary states). Or are you saying that State-Qs are only allowed in the context? If so, then you could write E differentl

Re: [racket-users] Redex - constraining what is used to fill a hole

2015-12-12 Thread Sam Caldwell
Thanks for clarifying, Robby. I'm modeling reduction on nested states. In addition to a collection of straightforward rules, there is a rule that specifies when to reduce a state-inside-a-state. I can specify this using evaluation contexts, but in order for the relation to remain deterministic I n

Re: [racket-users] Redex - constraining what is used to fill a hole

2015-12-12 Thread Robby Findler
I can see why you might have expected that to work that way. Unfortunately, it doesn't. The identifiers in those places in shortcuts (Add2, x, and n in your examples below) are not pattern positions. They are simply identifiers. In the code you wrote, one could change the rule's left-hand side to

[racket-users] Redex - constraining what is used to fill a hole

2015-12-11 Thread Sam Caldwell
Hi, I'm working on a redex model where I want to constrain the shape of terms used to fill the hole in an evaluation context. I thought it would be fairly straightforward to do so using a `with` clause in my reduction-relation, but I've run into some difficulty, and consulting the docs [1] left me