This preview shows pages 1–6. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: cs3723 1 Language Semantics Lambda Calculus: Variables and Functions cs3723 2 Describing Semantics Informal definitions Tutorials: learn by working examples Reference Manuals Natural language explanation for each syntax rule Formal definitions (skip) Attribute grammars Associate attributes (values) with each grammar symbol Associate semantics rules with each grammar rule Operational semantics Interpret the language on an abstract machine or using another language Denotational semantics Define language constructs as mathematical functions Axiomatic semantics (proof rules) Define properties (invariance) of language constructs Goal: communication, automation and validation cs3723 3 Lambda Calculus Mathematical system for functions Computation with functions Captures essence of variable binding Function parameters and substitution Can be extended with types, expressions, stores and sideeffects Introduced by Church in 1930s Notation for function expressions Proof system for equality of expressions Calculation rules for function application (invocation) cs3723 4 Pure Lambda Calculus Abstract syntax : M ::= x  λ x.M  M M x represents variable names Each expression in Lambda Calculus is called a lambda term or a lambda expression Concrete syntax: how to resolve ambiguity? ( M M ) has higher precedence than λ x.M ; i.e, λ x.M N <=> λ x. (M N) M M is left associative; i.e. x y z <=> (x y) z Add parentheses to allow alternative grouping of operations Compare: concrete syntax in Lisp/Scheme M ::= x  (lambda (x) M)  (M M) cs3723 5 The Applied Lambda Calculus Can pure lambda calculi express all computation? Yes, it is Turing complete. Other values/operations can be represented as function abstractions. For example, booleans can be expressed as True = λ t. ( λ f. t) False = λ t. ( λ f. f) But we are not going to be extreme....
View
Full
Document
This note was uploaded on 10/13/2009 for the course CS 3773 taught by Professor Staff during the Spring '08 term at The University of Texas at San Antonio San Antonio.
 Spring '08
 STAFF
 Software engineering

Click to edit the document details