Re: [racket-dev] Merging nonterminals in union-language

2013-03-02 Thread Robby Findler
Thanks for the pull request (and sorry for the delay in replying here). I've pushed your commit and another one that covers things like docs and otherwise a few other changes to your commit. Please let me know if things don't work out for you. Robby On Thu, Feb 28, 2013 at 10:47 PM, William J. B

Re: [racket-dev] Merging nonterminals in union-language

2013-02-28 Thread William J. Bowman
I am at Northeastern. I use my own address as a central point for the multiple present and past addresses, and usually don't bother spoofing the `from' header. Perhaps I'll add a note about that to my email signature. Thanks for the tips about reduction semantics! I've created a pull request. W

Re: [racket-dev] Merging nonterminals in union-language

2013-02-28 Thread Robby Findler
Yeah, I agree it does make sense to do this kind of merging with examples like the one you posted or else you get very very bad performance in matching. And the merging is coming about because of the way the language is structured; it isn't accidental "lucky" merging; you expect the same production

Re: [racket-dev] Merging nonterminals in union-language

2013-02-28 Thread William J. Bowman
By the way, when I was tinkering, I originally got my example working *without* merging nts (lines 1967-1983). I only added it after inspecting the output of `compiled-lang-lang'. The resulting union-language had the same nonterminal in a language several times with overlapping right-hand-sides, so

Re: [racket-dev] Merging nonterminals in union-language

2013-02-28 Thread William J. Bowman
I had a feeling I was doing something wrong, but I'm not familiar enough with the Redex source to do much more than hack until it does what I want :) Here is a small example of what I'd like to do: https://gist.github.com/bluephoenix47/5059837 This example seems to work with my patch, but obviou

Re: [racket-dev] Merging nonterminals in union-language

2013-02-28 Thread Robby Findler
The reason I didn't do that is very much related to lines 1967-1983 in your diff. That isn't a good idea: what you really want to do there is check to see if different patterns generate the same languages or not. But that's not something that is easily done (I'm guessing it is computable, but very

[racket-dev] Merging nonterminals in union-language

2013-02-28 Thread William J. Bowman
Hello all, I've been hacking on some languages in Redex, and found myself abstracting commons parts into base languages, and gradually building new languages via `define-extended-language' and `define-union-language'. Unfortunately, I hit a wall when I discovered `define-union-language' doesn't l