Created
September 16, 2016 18:39
-
-
Save florence/a0bd28b1dea5cd82eee789053c3ae539 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(require redex) | |
(define-language SKI | |
(e ::= S K I (e e) natural +)) | |
(define R | |
(reduction-relation | |
SKI | |
(--> (((S e_1) e_2) e_3) | |
((e_1 e_3) (e_2 e_3))) | |
(--> ((K e_1) e_2) e_1) | |
(--> (I e_1) e_1) | |
(--> ((+ natural_1) natural_2) | |
,(+ (term natural_1) (term natural_2))))) | |
(define R* (compatible-closure R SKI e)) | |
(define-term double ((S +) I)) | |
(traces R* (term (double (double 5)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment