CSE-321 Programming Languages Inductive Definitions POSTECH March 14, 2007 박성우.

Slides:



Advertisements
Similar presentations
Some important properties Lectures of Prof. Doron Peled, Bar Ilan University.
Advertisements

1 Valid and Invalid arguments. 2 Definition of Argument Sequence of statements: Statement 1; Statement 2; Therefore, Statement 3. Statements 1 and 2 are.
Prof. Shachar Lovett Clicker frequency: CA CSE 20 Discrete math Prof. Shachar Lovett
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
CS 1813 Discrete Mathematics, Univ Oklahoma Copyright © 2000 by Rex Page 1 Lecture 3 CS 1813 – Discrete Mathematics Truth Inference and the Logical Way.
1 Introduction to Computability Theory Lecture5: Context Free Languages Prof. Amos Israeli.
Quick Review Get paper and pencil out. Not graded just for review.
1 Operational Semantics Mooly Sagiv Tel Aviv University Textbook: Semantics with Applications.
CS 454 Theory of Computation Sonoma State University, Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Original slides by Vahid and.
Inductive Definitions COS 510 David Walker. Inductive Definitions Inductive definitions play a central role in the study of programming languages They.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
TR1413: Discrete Mathematics For Computer Science Lecture 3: Formal approach to propositional logic.
Advanced Formal Methods Lecture 7: Isabelle – Sets Mads Dam KTH/CSC Course 2D1453, Material from L. Paulson.
2-1 Sample Spaces and Events Conducting an experiment, in day-to-day repetitions of the measurement the results can differ slightly because of small.
C LAUS B RABRAND © S EMANTICS (Q1,’06) A UG 31, 2006 C LAUS B RABRAND © 2005–2006, University of Aarhus [ ] [
CS 330 Programming Languages 09 / 16 / 2008 Instructor: Michael Eckmann.
Operational Semantics Semantics with Applications Chapter 2 H. Nielson and F. Nielson
Room Change!!!! Starting Wednesday Room 302. Inductive Definitions COS 441 Princeton University Fall 2004.
Sequences and Series (T) Students will know the form of an Arithmetic sequence.  Arithmetic Sequence: There exists a common difference (d) between each.
Understanding PML Paulo Pinheiro da Silva. PML PML is a provenance language (a language used to encode provenance knowledge) that has been proudly derived.
CSE 311 Foundations of Computing I Lecture 16 Recursively Defined Sets and Structural Induction Spring
F22H1 Logic and Proof Week 6 Reasoning. How can we show that this is a tautology (section 11.2): The hard way: “logical calculation” The “easy” way: “reasoning”
CSE 311 Foundations of Computing I Lecture 17 Structural Induction: Regular Expressions, Regular Languages Autumn 2011 CSE 3111.
1 State SymbolRead- Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:
Type Safety Kangwon National University 임현승 Programming Languages.
CSE-321 Programming Languages Inductive Definitions POSTECH March 15, 2006 박성우.
MA/CSSE 474 Theory of Computation Decision Problems DFSMs.
CSE 311 Foundations of Computing I Lecture 17 Structural Induction Spring
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
MA/CSSE 474 Theory of Computation Regular Expressions Intro.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
CSE Winter 2008 Introduction to Program Verification January 31 proofs through simplification.
Today’s Topics Introduction to Proofs Rules of Inference Rules of Equivalence.
CS6133 Software Specification and Verification
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Mathematical Preliminaries
CSE 311 Foundations of Computing I Lecture 9 Proofs and Set Theory Autumn 2012 CSE
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
Recursive Data Structures and Grammars Themes –Recursive Description of Data Structures –Grammars and Parsing –Recursive Definitions of Properties of Data.
Logic UNIT 1.
1 First order theories (Chapter 1, Sections 1.4 – 1.5) From the slides for the book “Decision procedures” by D.Kroening and O.Strichman.
Inductive Proofs Kangwon National University 임현승 Programming Languages These slides were originally created by Prof. Sungwoo Park at POSTECH.
CS412/413 Introduction to Compilers Radu Rugina Lecture 13 : Static Semantics 18 Feb 02.
Operational Semantics Mooly Sagiv Tel Aviv University Textbook: Semantics with Applications Chapter.
Inductive Definitions Kangwon National University 임현승 Programming Languages These slides were originally created by Prof. Sungwoo Park at POSTECH.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2012 CSE
Operational Semantics Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
Lecture 10 Methods of Proof CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
CSE-321 Programming Languages Abstract Machine E POSTECH May 1, 2006 박성우.
1 A well-parenthesized string is a string with the same number of (‘s as )’s which has the property that every prefix of the string has at least as many.
13.3 Arithmetic and Geometric Series and Their Sums Finite Series.
CSE 311 Foundations of Computing I Lecture 19 Recursive Definitions: Context-Free Grammars and Languages Spring
Operational Semantics Mooly Sagiv Reference: Semantics with Applications Chapter 2 H. Nielson and F. Nielson
Turing Machines Sections 17.6 – The Universal Turing Machine Problem: All our machines so far are hardwired. ENIAC
CSE 311 Foundations of Computing I Lecture 19 Recursive Definitions: Context-Free Grammars and Languages Autumn 2012 CSE
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–10: Soundness of Propositional Calculus 12 th August, 2010.
Chapter 5 With Question/Answer Animations 1. Chapter Summary Mathematical Induction - Sec 5.1 Strong Induction and Well-Ordering - Sec 5.2 Lecture 18.
P Symbol Q E(Q) a b a b a b Convert to a DFA: Start state: Final States:
CSE 311 Foundations of Computing I Lecture 20 Context-Free Grammars and Languages Autumn 2012 CSE
CSE 311 Foundations of Computing I Lecture 15 Strong Induction and Recursive Definitions Spring
Context-Free Languages & Grammars (CFLs & CFGs) (part 2)
CSE-321 Programming Languages Simply Typed -Calculus
CSE 311 Foundations of Computing I
CSE 311: Foundations of Computing
CS 270 Math Foundations of CS
CS21 Decidability and Tractability
Instructor: Aaron Roth
CSCE 355 Foundations of Computation
Presentation transcript:

CSE-321 Programming Languages Inductive Definitions POSTECH March 14, 2007 박성우

2 Why Inductive Definitions? Definition of SML –finite in size SML programs –infinite in number We need a mechanism by which a finite description of SML produces infinitely many SML programs. –We need inductive definitions.

3 Outline Inductive definitions of syntactic categories Judgments and inference rules Derivable rules and admissible rules Inductive proofs

4 Natural Numbers

5 Natural Numbers - Examples

6 Regular Binary Trees

7 Mutual Induction

8 Strings of Parentheses

9 Strings of Matched Parentheses

10 Strings of Matched Parentheses

11 Strings of Parentheses

12 Outline Inductive definitions of syntactic categories Judgments and inference rules Derivable rules and admissible rules Inductive proofs

13 Judgments An object of knowledge that may or may not be provable. Examples –"1 - 1 is equal to 0." –"1 + 1 is equal to 0." –"It is raining." –"S S O belongs to the syntactic category nat." –...

14 Question "1 - 1 is equal to 0" is a judgment. What is the meaning of "1 - 1 is equal to 0" without arithmetic rules? Judgments make sense only if there are inference rules for proving or refuting them.

15 Inference Rules

16 Examples of Inference Rules

17 Examples of Axioms

18 Natural Numbers using Judgments Judgment Inference rules

19 Metavariables is called a metavariable. –It is just a placeholder for a sequence of O and S. –We are not talking about " nat." –We are talking about "S S O nat."

20 Derivation Tree

21 Even and Odd Numbers

22 Regular Binary Trees

23 Full Regular Binary Trees

24 A Full Regular Binary Tree

25 Outline Inductive definitions of syntactic categories Judgments and inference rules Derivable rules and admissible rules Inductive proofs

26 Question We know arithmetic rules. But do we use arithmetic rules to calculate 4 * 9? –Why not just use 4 * 9 = 36 from the multiplication table?

27 Inference rules A derivation tree May I use the following rule? From a Derivation Tree

28 Derivable Rule There is a derivation tree from the premises to the conclusion. May be used as if it was an original inference rule.

29 Is this rule derivable? No! –no derivation tree like

30 But does this rule make sense? Yes!

31 Admissible Rules There is a proof that the premise implies the conclusion. May be used as if it was an original inference rule if the system does not change.

32 Derivable Rules vs. Admissible Rules Which is stronger? –A derivable rule is an admissible rule? Yes No –An admissible rule is a derivable rule? Yes No

33 A derivable rule remains valid no matter what. An admissible rule may be invalidated when a new inference rule is introduced. Now is the rule below still admissible? Derivable Rules vs. Admissible Rules

34 Announcement Assignment 2 is out. –Due at 1am, March 21 (next Wednesday) –tail-recursive functions, structures,... Course notes –Sections cover today's lecture. –Sections 2.4 and 2.5 might be expanded a bit this weekend.