Formal Methods in Software Engineering

Slides:



Advertisements
Similar presentations
AE1APS Algorithmic Problem Solving John Drake. The island of Knights and Knaves is a fictional island to test peoples ability to reason logically. There.
Advertisements

PHYS707: Special Topics C++ Lectures Lecture 2. Summary of Today’s lecture: 1.More data types 2.Flow control (if-else, while, do-while, for) 3.Brief introduction.
PROOF BY CONTRADICTION
22 March 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction.
Logic Use mathematical deduction to derive new knowledge.
Deduction In addition to being able to represent facts, or real- world statements, as formulas, we want to be able to manipulate facts, e.g., derive new.
Logic.
The basics of propositional logic
AE1APS Algorithmic Problem Solving John Drake.  Invariants – Chapter 2  River Crossing – Chapter 3  Logic Puzzles – Chapter 5 (13) ◦ Knights and Knaves.
Brief Introduction to Logic. Outline Historical View Propositional Logic : Syntax Propositional Logic : Semantics Satisfiability Natural Deduction : Proofs.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 9 Jim Martin.
Propositional Logic. Negation Given a proposition p, negation of p is the ‘not’ of p.
TR1413: INTRO TO DISCRETE MATHEMATICS LECTURE 2: MATHEMATICAL INDUCTION.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 8 Jim Martin.
1 Inference Rules and Proofs Z: Inference Rules and Proofs.
Introduction to Proofs ch. 1.6, pg. 87,93 Muhammad Arief download dari
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic, Logical Inference Spring
The Foundations: Logic and Proofs
Lecture 5 Knights and Knaves.. Administration Show hand in form. Show plagiarism form. Any problems with coursework? Google knight and knaves and look.
Chapter 1: The Foundations: Logic and Proofs
Applications of Propositional Logic
Dr. Naveed Riaz Design and Analysis of Algorithms 1 1 Formal Methods in Software Engineering Lecture # 24.
Lecture Propositional Equivalences. Compound Propositions Compound propositions are made by combining existing propositions using logical operators.
CSE 311 Foundations of Computing I Lecture 7 Logical Inference Autumn 2012 CSE
Natural Deduction System for First Order Logic Student: Wei Lei Instructor: W. M. Farmer Department of Computing and Software McMaster University, Hamilton,
October 17, 2012Introduction to Artificial Intelligence Lecture 11: Knowledge Representation and Reasoning I 1Semantics In propositional logic, we associate.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
CS6133 Software Specification and Verification
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Chapter 1: The Foundations: Logic and Proofs
Of 38 lecture 13: propositional logic – part II. of 38 propositional logic Gentzen system PROP_G design to be simple syntax and vocabulary the same as.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 05 : Knowledge Base & First Order Logic.
Dr. Naveed Riaz Design and Analysis of Algorithms 1 1 Formal Methods in Software Engineering Lecture # 25.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
Section 1.1. Propositions A proposition is a declarative sentence that is either true or false. Examples of propositions: a) The Moon is made of green.
Lecture Coursework 2. Rectangle Game Look at proof of matchsticks Read thru the question. A rectangular board is divided into m columns by n rows. The.
CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2011 CSE 3111.
CSE 311 Foundations of Computing I Lecture 8 Proofs Autumn 2012 CSE
1 Introduction to Abstract Mathematics Proof Methods , , ~, ,  Instructor: Hayk Melikya Purpose of Section:Most theorems in mathematics.
Foundations of Computing I CSE 311 Fall Announcements Homework #2 due today – Solutions available (paper format) in front – HW #3 will be posted.
A is a knight:A A eats his hat:H. A is a knight:A A eats his hat:H If I am a knight then I’ll eat my hat: A  H.
Simple Logic.
Chapter 1 Propositional Logic
Propositional Equivalences
CSE 311 Foundations of Computing I
DISCRETE MATHEMATICS CHAPTER I.
Discrete Mathematics Logic.
Niu Kun Discrete Mathematics Chapter 1 The Foundations: Logic and Proof, Sets, and Functions Niu Kun 离散数学.
Discrete Mathematics Lecture # 2.
Liar liar.
A computer program is a sequence of computer commands.
Applications of Propositional Logic
Introduction to Predicates and Quantified Statements II
CSE 311 Foundations of Computing I
Introduction to Predicates and Quantified Statements II
CS 220: Discrete Structures and their Applications
Propositional Logic.
Negations of quantifiers
Metatheorems Computational Logic Lecture 8
Discrete Mathematics Logic.
6.3 Truth Tables for Propositions
Associativity of Equivalence
Knights and Knaves.
1.3 Propositional Equivalences
Let Q be the question Let A be “the native is a knight”
Discrete Structures Prepositional Logic 2
Logical and Rule-Based Reasoning Part I
A THREE-BALL GAME.
Chapter 2 Sets Active Learning Lecture Slides
Presentation transcript:

Formal Methods in Software Engineering Lecture # 05 rules of inference and logical deductions Instructor: Saima Zareen Assistant Professor Department of Software Engineering saima.zareen@uettaxila.edu.pk

Introduction This rule states that we can make complex propositions, if we are given simple propositions Given p we can conclude p or q is true P _______ P or q Given q, we can conclude p or q is true Q ________ P or Q

Introduction rule of conditional(=>) If we know q is true, we can conclude p=>q is also true. [p] Q ----- P=>q is true

Elimination rule If we are given complex proposition, we can conclude a simple proposition from it. Given p and q When p and q is true, it means we can conclude p is true. P and Q --------- p When p and q is true, it means we can conclude q is true.

Elimination rule of conditional(=>) Given p is true and p=>q is true, we can conclude q is also true.

Elimination rule of negation Given P and not p= false If we started with a false statement, we can conclude anything Given False We can conclude p We can conclude q

Logic Puzzle it is rumoured that there is gold buried on the island. You ask one of the natives, A, whether there is gold on the island. He makes the following response: 'There is gold on this island equivales I am a knight.' The problem is as follows. (a) Can it be determined whether A is a knight or a knave? (b) Can it be determined whether there is gold on the island?

Let G denote the proposition 'There is gold on the island' Let G denote the proposition 'There is gold on the island'. A's statement is A ≡ G. So what we are given is A≡𝐴≡G

Summary

Questions