Docsity

Operational Semantics and Type Systems: Understanding Functional Programming, Study notes of Programming Languages

Partial preview of the text

Download Operational Semantics and Type Systems: Understanding Functional Programming and more Study notes Programming Languages in PDF only on Docsity!

Operational Semantics

SInt A ` n โ†’ n

SVar x^7 โ†’^ v^ โˆˆ^ A A ` x โ†’ v

SFun

A e 2 โ†’ v A, x 7 โ†’ v e 1 โ†’ vโ€ฒ A ` (fun x = e 1 ) e 2 โ†’ vโ€ฒ^

SAdd

A e 1 โ†’ v 1 A e 2 โ†’ v 2 A ` + e 1 e 2 โ†’ v 1 + v 2

Type Systems

TInt A ` n : int

TVar x^ :^ t^ โˆˆ^ A A ` x : t

TFun

A, x : t e : tโ€ฒ A ฮปx : t.e : t โ†’ tโ€ฒ^

TApp

A e 1 : t โ†’ tโ€ฒ^ A e 2 : t A ` e 1 e 2 : tโ€ฒ