plt-redex

plt-redex: capture-avoiding substitution for free?

China☆狼群 提交于 2019-12-10 15:51:33
问题 Every time I define a language in PLT redex, I need to manually define a (capture-avoiding) substitution function. For example, this model isn't finished because subst isn't defined: #lang racket/base (require redex/reduction-semantics) (define-language Λ [V ::= x (λ x M)] [M ::= (M M) V] [C ::= hole (V C) (C M)] [x ::= variable-not-otherwise-mentioned]) (define -->β (reduction-relation Λ [--> (in-hole C ((λ x M) V)) (in-hole C (subst M x V))])) But the definition of subst is obvious. Can PLT