> But I clearly don’t get what you really want so I will abandon this one. > > Good luck — Matthias >
Thanks for trying, talking to you is always instructive 😀 For people that hasn’t abandoned this one: I decided to bite the bullet and thread the ‘metaparameter’ in my definitions. This will allow me to re-enable the cache, and I’m interested in measuring how this impacts performance. (I’m not benchmarking these models, I know that isn’t Redex purpose, but there are some small programs that are beyond the reach of my models because they take too long to complete.) In the process I found a case that I can’t express: in my language definition I have a production that means “a list of maximum size ‘k’”, which I express with a side-condition. There is no way to *thread parameters* into ‘redex-match?’ and pattern matching in general, so I have to turn off this verification. The problem below is a minimal working example to illustrate my use case. Either I have to remove the ‘side-condition’ for ‘t’ or turn off the cache: #lang racket (require redex) (define k (make-parameter 0)) (define-language L [t ::= (side-condition (name t [_ ...]) (<= (length (term t)) (k)))]) (caching-enabled? #f) (displayln (redex-match? L t (term []))) ;; => #t (displayln (redex-match? L t (term [a]))) ;; => #f (displayln (redex-match? L t (term [a b]))) ;; => #f (parameterize ([k 1]) (displayln (redex-match? L t (term []))) ;; => #t (displayln (redex-match? L t (term [a]))) ;; => #t (displayln (redex-match? L t (term [a b]))) ;; => #f ) -- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

