Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Program 1 */
- var id = function ( x : Int )
- {
- x * 1
- };
- id(10)
- --
- x ∈ Γ,x:Int
- ----------------- TVar ------------------ TNat
- Γ,x:Int ⊢ x : Int Γ,x:Int ⊢ 1 : Int id : Int -> Int ∈ Γ,id : Int -> Int
- ------------------------------------------- TMul ------------------------------------ TVar ----------------------------
- Γ,x:Int ⊢ x * 1 : Int Γ,id : Int -> Int ⊢ id : Int -> Int Γ,id : Int -> Int ⊢ 10 : Int
- ----------------------------------------------- TFun ------------------------------------------------------------------------- TCall
- Γ ⊢ function ( x : Int ) { x * 1 } : Int -> Int Γ,id : Int -> Int ⊢ id(10) : Int
- ------------------------------------------------------------------------------------------------------------------------------------- TDecl
- Γ ⊢ var id = function ( x : Int ) { x * 1 }; id(10) : Int
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement