LambdaCalculus - cs3723 1 Language Semantics Lambda...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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 side-effects  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.

Page1 / 19

LambdaCalculus - cs3723 1 Language Semantics Lambda...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online