CS 541 Lecture -*- Outline -*- * why study the theory of programming languages? ** arguments for the study of theory *** need to abstract and generalize already seen the major kinds of languages, learning new languages would be mostly details. want to study various languages in a simplier and more uniform setting *** programming is langauge design esp. OO programming, build vocabulary of types and procedures, this is a new, higher-level langauge if you also build combining forms (as we did in functional prog) then face problems of describing recursion, higher order stuff that is hard to specify in English language like notations found in other areas of CS (as we saw) *** formal semantic description techniques are a standard design notation analogy: blueprints less ambiguous, more precise **** deep understanding of elements of existing languages needed to design future languages (parallelism, etc.) the more ways you can understand features the better you'll know them programming semantics design extensions **** one key to future implementation techniques and optimizations e.g., designing faster Prolog compilers global optimization problems **** tools for comparing languages semantic differences key, may study formalizations of expressive power **** tools for judging your design ideas notions of orthoganality, etc. keeps you honest (precise) reveals interactions **** help you to be an expert at design (architect) architecture vs. program design (understand theory to use it) engineering design (bridges) *** formal description can be used as a prototype operational semantics directly leads to interpreter denotational semantics also gives prototype interpreter *** techniques themselves useful in programming and reasoning fixpoint semantics essentially functional programming verification techniques based on theory (term rewriting) reading reference manuals ** broader intellectual context *** self-reproduction von Neumann was interested in: can a machine reproduce itself? lambda calc. is simplified model of a machine that grows more machines (\x.x x x) (\x. x x x) *** Hilbert's program Hilbert wanted to know, was there a way to mechanically prove all true theorems? Russell and Whitehead wrote principia mathematica, hoping to give a foundation for all of mathematics Goedel's incompleteness theorem used a kind of self-reference, the ability of a theorem to talk about it's own truth. this relies on the ability to treat functions as data *** Want to be able to explain and classify programming language features e.g., what does a semicolon (;) mean in Pascal? How do you explain backtracking in Prolog? What kind of thing is a program?