Type Systems for Programming Languages Hongwei Xi University



















- Slides: 19
Type Systems for Programming Languages Hongwei Xi University of Cincinnati Spring, 2000 11/29/2020 Introduction 1
Welcome! • 20 -ECES-717: Type Systems for Programming Languages – Introduction to type disciplines in programming language design and implementation – Emphasis on the use of mathematical methods in programming language studies 11/29/2020 Introduction 2
Course Overview • Type Systems – What is type safety? – What are the advantages of typed languages? – What are the disadvantages of typed languages? 11/29/2020 Introduction 3
Course Overview • Simply Typed Lambda-Calculus – – Call-by-name and Call-by-value Confluence Property (Church-Rosser) Weak Normalization Theorem Strong Normalization Theorem 11/29/2020 Introduction 4
Course Overview • Parametric Polymorphism – How can polymorphism facilitate code reuse? – How can polymorphism enforce data abstraction? 11/29/2020 Introduction 5
Course Overview • Subtyping – When is one type a subtype of another? – How can subtyping help code reuse? • Objects, Classes and Inheritance – How can we build flexible and extensible software? – How is subtyping related to inheritance? 11/29/2020 Introduction 6
Course Overview • Effects – References – Exceptions – Problematic interaction between polymorphism and effects • Value restriction 11/29/2020 Introduction 7
Course Overview • Continuation – callcc (call with current continuation) – throw – CPS compilation 11/29/2020 Introduction 8
Course Overview • Type Inference – Do types have to be obtrusive to programming? – Is it a good practice to omit writing types as much as possible? – What are the desirable properties in a type inference algorithm? 11/29/2020 Introduction 9
What is this course like? • Stressing both mathematical reasoning and implementation skill – Prove theorems – Build systems • Emphasizing mathematical rigor and clarity – “If you can’t explain it, I won’t trust it ” 11/29/2020 Introduction 10
What is this course like? • You will have to work hard in order to keep up! – Many ideas may sound unfamiliar to you. They are often formal and take time to “sink in”. – Assignments often require both mathematical reasoning and implementation skill. 11/29/2020 Introduction 11
What this course is like? • There is a draft textbook for this course on-line as well as some course notes – Taking notes is a large part of the course as we may often digress from the text book – Both studying and experimentation are essential to gaining understanding of the material 11/29/2020 Introduction 12
What is this course like? • Most of all, it’s a lot fun! – Elegant interplay between theory and practice – Rapid exposure to many fundamental ideas – Enormous potential for pursuing further studies in language design and implementation 11/29/2020 Introduction 13
Schedules • Lectures: MWF 12 -12: 50 PM BH 839 • Office Hours: – Thursday 4 -6 PM – Or by appointment (preferred) – Or stop by 811 D Rhodes 11/29/2020 Introduction 14
Programming Languages • Standard ML (preferred) – http: //cm. bell-labs. com/cm/cs/what/smlnj • Objective Caml (preferred) – http: //caml. inria. fr 11/29/2020 Introduction 15
Homework • Approximately 5 assignments – About one every two weeks – Individual work only unless specified otherwise! • Clarity and elegance count – It is not enough to just “work” on test data 11/29/2020 Introduction 16
Exams and Grades • Midterm – Monday, May 1 – In-class or Take Home (20%) • Final – Tuesday, June 6 – In-class or Take Home (40%) • Homework (40%) • All exams are open-book • Participation can make difference on letter grade 11/29/2020 Introduction 17
Academic Integrity • Strict adherence to the university guidelines – All work must be solely your own! • If you have difficulty keeping up, ask for help! – The instructor is always willing to help – Ask earlier, rather than later 11/29/2020 Introduction 18
Course Information • Everything is on the web! – Course Homepage http: //www. ececs. uc. edu/~hwxi/eces 717. html – Notes, Slides, Handouts, Assignments, Solutions – Please visit the homepage frequently! 11/29/2020 Introduction 19