(require (lib "reduction-semantics.ss" "reduction-semantics") (lib "iswim.ss" "reduction-semantics" "examples") (lib "gui.ss" "reduction-semantics")) (define ck1 (reduction iswim-grammar [(M_1 M_2) : k_1] (term [M_1 : ("arg" M_2 k_1)]))) (define ck2 (reduction iswim-grammar [(on_1 M_1 M_2 ...) : k_1] (term [M_1 : ("narg" (on_1) (M_2 ...) k_1)]))) (define ck3 (reduction iswim-grammar [V_1 : ("fun" ("lam" X_1 M_1) k_1)] (term-let ([M_2 (iswim-subst (term M_1) (term X_1) (term V_1))]) (term [M_2 : k_1])))) (define ck4 (reduction iswim-grammar [V_1 : ("arg" M_2 k_1)] (term [M_2 : ("fun" V_1 k_1)]))) (define ck5 (reduction iswim-grammar [V_1 : ("narg" (V_2 ... on_1) () k_1)] (term-let ([V_3 (delta*n (term on_1) (reverse (term (V_1 V_2 ...))))]) (term [V_3 : k_1])))) (define ck6 (reduction iswim-grammar [V_1 : ("narg" (V_2 ... on_1) (M_1 M_2 ...) k_1)] (term [M_1 : ("narg" (V_1 V_2 ... on_1) (M_2 ...) k_1)]))) (define :->ck (list ck1 ck2 ck3 ck4 ck5 ck6)) (traces iswim-grammar :->ck `((("lam" x ("+" 10 ("-" 11 x))) (("lam" z z) 12)) : "mt"))