1. Understanding the meaning(use) of programming languages helps understanding the meaning(use) of natural langauges 1. Richard Montague. 1970. Universal Grammar. _Theoria_ 34:375--98. "There is in my opinion no important theoretical difference between natural languages and the artificial languages of logicians; indeed, I consider it possible to comprehend the syntax and semantics of both kinds of languages within a single natural and mathematically precise theory." 2. Similarities: Function/argument structure: f(x) kill(it) pronominal binding: x := x + 1 John is his own worst enemy Quantification: foreach x in [1..10] print x Print every number from 1 to 10 3. Possible differences: Parentheses: 3 * (4 + 7) ?It was four plus seven that John computed 3 multiplied by (compare: John computed 3 multiplied by four plus seven) Ambiguity: 3 * 4 + 7 Time flies like and arrow, fruit flies like a banana. Vagueness: 3 * 4 A cloud near the mountain Unbounded numbers of distinct pronouns: f(x1) + f(x2) + f(x3) + ... He saw her put it in ... [In ASL, dividing up the signing space...] 2. Standard methods in linguistics are limited. 1. First-order predicate calculus Invented for reasoning about mathematics (Frege's quantification) Alethic, order insensitive: phi & psi == psi & phi But: John left and Mary left too /= Mary left too and John left 2. Simply-typed lambda calculus Can't express the Y combinator 3. Meaning is computation. 1. Semantics is programming 2. Good programming is good semantics 1. Example 1. Programming technique Exceptions throw (raise) catch (handle) 2. Application to linguistics presupposition expressives Develop application: fn application divide by zero test and repair raise and handle fn application presupposition failure build into meaning of innocent predicates? expressives throw handle resume computation