-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Formatter updates, allow spec to be read from cli
- Loading branch information
1 parent
96259e6
commit 6212d64
Showing
34 changed files
with
951 additions
and
1,055 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,9 @@ _coverage | |
# vscode settings | ||
.vscode | ||
|
||
# Mac OS | ||
.DS_Store | ||
|
||
# Executable | ||
adelfa | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
profile = janestreet | ||
version = 0.26.1 | ||
|
||
wrap-comments=true | ||
assignment-operator=end-line |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Specification "stlc.lf". | ||
|
||
%subject reduction for stlc | ||
Theorem sr_eval : forall E V T D1 D2, | ||
{D1 : eval E V} => {D2 : of E T} => exists D, {D : of V T}. | ||
induction on 1. intros. case H1. | ||
%case 1: application; D1 = eval-app M N V R T1 a1 a2, E = app M N | ||
case H2. %D2 = of_app M N T D3 D4 D5 | ||
apply IH to H8 H14. | ||
case H16. | ||
inst H20 with n2 = N. inst H21 with n3 = D5. | ||
apply IH to H9 H22. | ||
exists (D n3 n2 n1 n). | ||
search. | ||
%case 2: abstraction; D1 = eval-abs R T1, E = abs T1 ([x]R x) | ||
exists D2. | ||
search. | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
ty : type. | ||
arr : {T:ty}{U:ty} ty. | ||
|
||
tm : type. | ||
app : {E1:tm}{E2:tm} tm. | ||
abs : {T:ty}{R:{x:tm}tm} tm. | ||
|
||
of : {E:tm}{T:ty}type. | ||
of_app : {M:tm}{N:tm}{T:ty}{U:ty} | ||
{a1:of M (arr U T)} {a2:of N U} | ||
of (app M N) T. | ||
of_abs : {R : {x:tm} tm}{T:ty}{U:ty} | ||
{a1:({x:tm}{z:of x T} of (R x) U)} | ||
of (abs T ([x] R x)) (arr T U). | ||
|
||
eval : {E1:tm}{E2:tm}type. | ||
eval_abs : {R: {x:tm} tm}{T:ty} | ||
eval (abs T ([x] R x)) (abs T ([x] R x)). | ||
eval_app : {M:tm}{N:tm}{V:tm}{R:{x:tm} tm}{T:ty} | ||
{a1:eval M (abs T ([x] R x))}{a2:eval (R N) V} | ||
eval (app M N) V. |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.