CSE-321 Programming Languages Inductive Definitions POSTECH March 15, 2006 박성우.

Slides:



Advertisements
Similar presentations
Introduction to Proofs
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
22C:19 Discrete Structures Induction and Recursion Fall 2014 Sukumar Ghosh.
1 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
Recursive Definitions and Structural Induction
Proofs, Recursion and Analysis of Algorithms Mathematical Structures for Computer Science Chapter 2 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProofs,
Semantics Q S EMANTICS (Q1,’07) Week 1 Jacob Andersen PhD student
Induction and recursion
Quick Review Get paper and pencil out. Not graded just for review.
1 Operational Semantics Mooly Sagiv Tel Aviv University Textbook: Semantics with Applications.
Inductive Definitions COS 510 David Walker. Inductive Definitions Inductive definitions play a central role in the study of programming languages They.
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 [ ] [
Operational Semantics Semantics with Applications Chapter 2 H. Nielson and F. Nielson
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
Room Change!!!! Starting Wednesday Room 302. Inductive Definitions COS 441 Princeton University Fall 2004.
C LAUS B RABRAND © S EMANTICS (Q1,’05) S EP 1, 2005 C LAUS B RABRAND © 2005, University of Aarhus [ ] [
Induction and recursion
Sequences and Series (T) Students will know the form of an Arithmetic sequence.  Arithmetic Sequence: There exists a common difference (d) between each.
Induction and recursion
CSE 311 Foundations of Computing I Lecture 16 Recursively Defined Sets and Structural Induction Spring
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
Today in Precalculus Notes: Sequences Homework Go over quiz.
CSE-321 Programming Languages Inductive Definitions POSTECH March 14, 2007 박성우.
Chapter 5: Sequences, Mathematical Induction, and Recursion 5.9 General Recursive Definitions and Structural Induction 1 Erickson.
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.
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
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.
INM175 Topic 8 1 Module INM175 Discrete Mathematics Topic 8 Algebraic Theories.
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.
Mathematical Induction Section 5.1. Climbing an Infinite Ladder Suppose we have an infinite ladder: 1.We can reach the first rung of the ladder. 2.If.
Classifications LanguageGrammarAutomaton Regular, right- linear Right-linear, left-linear DFA, NFA Context-free PDA Context- sensitive LBA Recursively.
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.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
Operational Semantics Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
CSE-321 Programming Languages Abstract Machine E POSTECH May 1, 2006 박성우.
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
CSE 311 Foundations of Computing I Lecture 19 Recursive Definitions: Context-Free Grammars and Languages Autumn 2012 CSE
Operational Semantics Mooly Sagiv Reference: Semantics with Applications Chapter 2 H. Nielson and F. Nielson
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.
Section Recursion  Recursion – defining an object (or function, algorithm, etc.) in terms of itself.  Recursion can be used to define sequences.
MDFP Mathematics and Statistics 1 GEOMETRIC Progressions.
Week 14 - Friday.  What did we talk about last time?  Simplifying FSAs  Quotient automata.
CSE 311 Foundations of Computing I Lecture 15 Strong Induction and Recursive Definitions Spring
MA/CSSE 474 Theory of Computation Decision Problems, Continued DFSMs.
Context-Free Languages & Grammars (CFLs & CFGs) (part 2)
CSE-321 Programming Languages Simply Typed -Calculus
Induction and recursion
CSE 311: Foundations of Computing
Proof That There Is No Smallest Number
Induction and recursion
Notes Over 11.5 Recursive Rules
8/27/2015 Agenda Science Starter Rehearse class procedures
Logical Entailment Computational Logic Lecture 3
CSCE 355 Foundations of Computation
Presentation transcript:

CSE-321 Programming Languages Inductive Definitions POSTECH March 15, 2006 박성우

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 Inductive definitions of judgments 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 Outline Inductive definitions of syntactic categories V Inductive definitions of judgments Derivable rules and admissible rules Inductive proofs

10 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." –"succ succ zero belongs to the syntactic category nat." –...

11 Inference Rules

12 Examples of Inference Rules

13 Examples of Axioms

14 Remember: Judgments make sense only if there are inference rules for proving or refuting them. Example: –Without arithmetic rules, what is the meaning of: "1 - 1 is equal to 0"?

15 Natural Numbers using Judgments Judgment Inference rules

16 Metavariables is called a metavariable. –It is just a placeholder for a sequence of zero and succ. –We are not talking about " nat." –We are talking about " succ succ zero nat."

17 Derivation Tree

18 Even and Odd Numbers

19 Regular Binary Trees

20 Full Regular Binary Trees

21 A Full Regular Binary Tree

22 Proof

23 Outline Inductive definitions of syntactic categories V Inductive definitions of judgments V Derivable rules and admissible rules Inductive proofs

24 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?

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

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

27 Is this rule derivable? No! –because the premise is always smaller than the conclusion in the inference rules:

28 But does this rule make sense? Yes! –because the only way to prove the premise is by first proving the conclusion:

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

30 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

31 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

32 Homework 1 Good News –Everyone did a great job! –Solution and statistics will be uploaded today. Bad News –Everyone did such a wonderful job that Assignment 2 will be out tonight. –Assignment 2 will be due next Monday. Good or Bad News –Assignment 2 will be as much fun. –Many problems require a bit/lot of thinking: tail recursion structures and signatures functional objects