Skip to content

Compositional inference of principal typings for simple lamda-calculus based language written in C++

License

Notifications You must be signed in to change notification settings

keean/Compositional-Typing-Inference

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compositional-Typing-Inference

Compositional inference of principal typings for simple lamda-calculus based language written in C++

remember to checkout the submodule with the following commands from the root of the project after cloning:

git submodule init
git submodule update

It currently types lambda calculus + let, here is an example to show the syntax, and a typical typing derivation:

Input

\y . (let f = x y in let x = z y in q w)

Output

1.  [var x]            x : {x : a} |- a
2.  [var y]            y : {y : a} |- a
3.  [app (1) (2)]      (x y) : {x : (a -> b), y : a} |- b
4.  [var z]            z : {z : a} |- a
5.  [var y]            y : {y : a} |- a
6.  [app (4) (5)]      (z y) : {y : a, z : (a -> b)} |- b
7.  [var q]            q : {q : a} |- a
8.  [var w]            w : {w : a} |- a
9.  [app (7) (8)]      (q w) : {q : (a -> b), w : a} |- b
10. [let x (6) (9)]    (let x = (z y) in (q w)) : {q : (a -> b), w : a} |- b
11. [let f (3) (10)]   (let f = (x y) in (let x = (z y) in (q w))) : {q : (a -> b), w : a} |- b

About

Compositional inference of principal typings for simple lamda-calculus based language written in C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published