15–212: Fundamental Structures of Computer Science II Some Notes on Structural Induction
نویسنده
چکیده
These notes provide a brief introduction to structural induction for proving properties of ML programs. We assume that the reader is already familiar with ML and the notes on evaluation and natural number induction for pure ML programs. We write e k =⇒ e′ for a computation of k steps, e =⇒ e′ for a computation of any number of steps (including 0), e ↪→ v for a complete computation of e to a value v, and n = m or e = e′ for mathematical equality. We define e ∼= e′ (e is operationally equivalent to e′) to hold if for any value v, e ↪→ v iff e′ ↪→ v, that is, if e and e′ either both have values (in which case it must be the same), or neither has a value. This notion will have to be refined when the language is extended by effects. Structural inductions in ML arises as inductions over the structure of values defined by datatype declarations. Most datatype declarations give rise to an induction principle which may be used to prove properties of recursive functions with arguments of the given type.
منابع مشابه
15–212: Fundamental Structures of Computer Science II Some Notes on Induction
These notes provide a brief introduction to induction for proving properties of ML programs. We assume that the reader is already familiar with ML and the notes on evaluation for pure ML programs. Recall that we write n for the representation of the integer n in ML (and, in particular, 0 = 0, 1 = 1, etc.). We write e k =⇒ e′ for a computation of k steps, e =⇒ e′ for a computation of any number ...
متن کامل15–212: Fundamental Structures of Computer Science II Some Notes on Grammars and Parsing
These notes are intended as a “rough and ready” guide to grammars and parsing. The theoretical foundations required for a thorough treatment of the subject are developed in the Formal Languages, Automata, and Computability course. The construction of parsers for programming languages using more advanced techniques than are discussed here is considered in detail in the Compiler Construction course.
متن کامل15–212: Fundamental Structures of Computer Science II Some Notes on Mutable References
Our notion of step in the operational semantics is defined abstractly and does not coincide with the actual operations performed in an implementation of ML. Since we will be mainly concerned with proving correctness, but not complexity of implementation, the number of steps is largely irrelevant and we will write e =⇒ e′ for reduction. Evaluation and reduction are related in the sense that if e...
متن کامل15–212: Fundamental Structures of Computer Science II Notes on Regular Expression Matching
Regular expression matching is a very useful technique for describing commonly-occurring patterns in strings. For example, the Unix shell (and most other command processors) provides a mechanism (called “globbing”) for describing a collection of files by patterns such as *.sml or hw[1-3].sml. The emacs text editor provides a richer, but substantially similar, pattern language for its “regexp se...
متن کامل15–212: Fundamental Structures of Computer Science II Some Notes on Interpreters
Specifications are an indispensible part of software development. They explain what must be implemented without necessarily saying how. Depending of the nature of the problem domain, specifications may range from incomplete, natural language descriptions to mathematically precise formulations of the functionality to be implemented. Much of the task of software engineering is to decompose a larg...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1997