CS 641 Lecture -*- Outline -*- * review of 541 ** motivational questions *** what is the best programming language? why? *** what are or could be the economic impacts of a language? *** how does Prog Lang relate to other areas of Com Sci? ** concepts/semantics *** types and subtypes (Watt Ch 7) what is a subtype? What is it good for? how does this relate to the simply typed lambda calculus? *** exception handling (Watt Ch 8) what is it good for? how to model it? ** syntax (if covered) what is the context-free/lexical separation about? ambiguity? ** language design compare SML, Prolog and Smalltalk (or C++), SR what goals? how do they come out in the design? expressiveness? aesthetics? efficiency? what is easy to do in each (what is it good for)? what is hard to do in each? what can each teach us about design what features of SML, Prolog, and Smalltalk are not so good? how to improve? ** denotational semantics *** is SML translation faithful? what about bottom? too operational? (e.g. finiteness of integers) *** problems with recursive definitions well-definedness, separation from SML ---------------- val rec q: int -> int (* really int_{\bot} *) = fn (x) => if x = 0 then 1 else q(x + 1) ---------------- Are such definitions well-defined? e.g., f1(x) = if (x equals zero) then one else \bot f2(x) = if (x equals zero) then one else two f3(x) = one and infinitely many others! e.g., example which has no solution? exactly one solution? => need more technical aparatus, see chapter 5 in Schmidt *** what else can be done with denotational semantics? **** language comparisons calling mechanisms (chapter 8) other features **** better understanding of power of underlying model continuations higher order functions self-reference and OOP **** reasoning denotational techniques for proving programs correct can prove soundness of other verification systems **** semantics for new kinds of languages use semantics as a design tool heart of implementation, enough to be convincing can use as prototype