(require (lib "reduction-semantics.ss" "reduction-semantics") (lib "iswim.ss" "reduction-semantics" "examples") (lib "gui.ss" "reduction-semantics")) (define scc1 (reduction iswim-grammar [(M_1 M_2) : (in-hole E_1 ||)] (term [M_1 : (in-hole E_1 (|| M_2))]))) (define scc2 (reduction iswim-grammar [(on_1 M_1 M_2 ...) : (in-hole E_1 ||)] (term [M_1 : (in-hole E_1 (on_1 || M_2 ...))]))) (define scc3 (reduction iswim-grammar [V_1 : (in-hole E_1 (("lam" X_1 M_1) ||))] (term-let ([M_2 (iswim-subst (term M_1) (term X_1) (term V_1))]) (term [M_2 : (in-hole E_1 ||)])))) (define scc4 (reduction iswim-grammar [V_1 : (in-hole E_1 (|| M_2))] (term [M_2 : (in-hole E_1 (V_1 ||))]))) (define scc5 (reduction iswim-grammar [V_2 : (in-hole E_1 (on_1 V_1 ... || M_1 M_2 ...))] (term [M_1 : (in-hole E_1 (on_1 V_1 ... V_2 || M_2 ...))]))) (define scc6 (reduction iswim-grammar [V_2 : (in-hole E_1 (on_1 V_1 ... ||))] (term-let ([V_3 (delta*n (term on_1) (term (V_1 ... V_2)))]) ;; Note: delta*n always succeeds (term [V_3 : (in-hole E_1 ||)])))) (define :->scc (list scc1 scc2 scc3 scc4 scc5 scc6)) (traces iswim-grammar :->scc `((("lam" x ("+" 10 ("-" 11 x))) (("lam" z z) 12)) : ||))