110 likes | 124 Views
System F (part 2). CS 321 – PL CSE 김봉준. System F (review). f un untyped2simply u = case u of Untyped e => Simply e | _ => raise NotConvertible fun untyped2poly u = case u of Untyped e => Polymorphic e | _ => raise NotConvertible. System F (review).
E N D
System F (part 2) CS 321 – PL CSE김봉준
System F (review) • fun untyped2simply u = case u of Untyped e => Simply e | _ => raiseNotConvertible • fununtyped2poly u = case u of Untyped e => Polymorphic e | _ => raiseNotConvertible
System F (review) • Abstract Syntax • Operational Semantics • Type System
System F (review) • Ordered Set • Substitution
Type Reconstruction (review) • Not every untyped expression is typable!
Why we need System F ? • Not practical. • But the way to go more practical version. System F Predicative -Expressive -Undecidable -Less expressive -Decidable Let-Polymorphism
Isneeded “Ordered” ? • I Think, • Fusion 요리가 있기 전에 한국식, 서양식 같은 previously declared 음식 타입 필요. • 이전에는 (Proposition) Permutation 에 의해 doesn’t matter !!
Is needed “Erase” ? • I Think, • 역함수 같은 것. • Typable한 untypedexp에 타입을 붙인 후 erase하면 original exp로 돌아감. • 변한다기 보다 corresponding. • Erase(e’)=e 라면 e와 e’ 간의 유일한 대응
Untyped Typed Untypable Typable e’ e
References • PL 2006 – 교수님 PPT Slide에서 발췌