lecture 06 -- Interfaces and Tools for Defining Recursive Data Types-1

Lecture 06 -- Interfaces and Tools for Defining Recursive Data Types-1

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

View Full Document Right Arrow Icon
10/19/2010 1 T. METIN SEZGIN OCT 20 2010 Lecture 6 Interfaces and Tools for Defining Recursive Data Types Defining Sets Using Grammars Components of a grammar Terminals Non-terminals (syntactic categories) Productions (no context) Optional bits Naming conventions BNF, CNF Kleene notation Star {<exp>} * , Plus {<exp>} + , Separated list Plus {<exp>} +(,) Grammar example S-lists Grammar example Binary Trees Grammar example Lambda Calculus Occurs-free? The grammar The procedure
Background image of page 1

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

View Full Document Right Arrow Icon
10/19/2010 2
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: We can improve things by having  Constructors  Predicates  Extractors Occurs-free?  The grammar  The procedure Occurs-free? Rule for designing interfaces  Constructors  Predicates  Extractors Wouldn’t it be great if someone did the plumbing for us?  The idea: Define the data type The new occurs-free? Use the cases construct 10/19/2010 3 The new occurs-free? The general form of define-datatype Example uses of define-datatype...
View Full Document

{[ snackBarMessage ]}

Page1 / 3

Lecture 06 -- Interfaces and Tools for Defining Recursive Data Types-1

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

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