CS6133 Software Specification and Verification

Slides:



Advertisements
Similar presentations
Brief Introduction to Logic. Outline Historical View Propositional Logic : Syntax Propositional Logic : Semantics Satisfiability Natural Deduction : Proofs.
Advertisements

Artificial Intelligence Chapter 13 The Propositional Calculus Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
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.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 9,10,11- Logic; Deduction Theorem 23/1/09 to 30/1/09.
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
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.
Logic Concepts Lecture Module 11.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
Brief Introduction to Logic. Outline Historical View Propositional Logic : Syntax Propositional Logic : Semantics Satisfiability Natural Deduction : Proofs.
TR1413: Discrete Mathematics For Computer Science Lecture 3: Formal approach to propositional logic.
1 Chapter 7 Propositional and Predicate Logic. 2 Chapter 7 Contents (1) l What is Logic? l Logical Operators l Translating between English and Logic l.
Knowledge Representation I (Propositional Logic) CSE 473.
Knoweldge Representation & Reasoning
Chapter 3 Propositional Logic
TR1413: Discrete Mathematics For Computer Science Lecture 4: System L.
Discrete Mathematics and its Applications
I NTRO TO L OGIC Dr Shlomo Hershkop March
Inference is a process of building a proof of a sentence, or put it differently inference is an implementation of the entailment relation between sentences.
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
Propositional Resolution Computational LogicLecture 4 Michael Genesereth Spring 2005.
Logic in Computer Science - Overview Sep 1, 2011 POSTECH 박성우.
Pattern-directed inference systems
Logical Agents Logic Propositional Logic Summary
Of 33 lecture 12: propositional logic – part I. of 33 propositions and connectives … two-valued logic – every sentence is either true or false some sentences.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
Logic in Computer Science - Overview Sep 1, 2009 박성우.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
LECTURE LECTURE Propositional Logic Syntax 1 Source: MIT OpenCourseWare.
9/30/98 Prof. Richard Fikes Inference In First Order Logic Computer Science Department Stanford University CS222 Fall 1998.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–7: (a) Formal System;(b) How to read research papers 3 rd August, 2010.
Artificial Intelligence “Introduction to Formal Logic” Jennifer J. Burg Department of Mathematics and Computer Science.
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.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Chapter 7. Propositional and Predicate Logic Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 05 : Knowledge Base & First Order Logic.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part B Propositional Logic.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
Outline Logic Propositional Logic Well formed formula Truth table
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
Artificial Intelligence Chapter 13 The Propositional Calculus Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Metalogic Soundness and Completeness. Two Notions of Logical Consequence Validity: If the premises are true, then the conclusion must be true. Provability:
CT214 – Logical Foundations of Computing Darren Doherty Rm. 311 Dept. of Information Technology NUI Galway
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
Artificial Intelligence Logical Agents Chapter 7.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 4- Logic.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–6: Propositional calculus, Semantic Tableau, formal System 2 nd August,
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
CENG 424-Logic for CS Introduction Based on the Lecture Notes of Konstantin Korovin, Valentin Goranko, Russel and Norvig, and Michael Genesereth.
Knowledge Representation and Reasoning
The Propositional Calculus
Lecture 2 Propositional Logic
Elementary Metamathematics
CS 270 Math Foundations of CS
CS 416 Artificial Intelligence
Back to “Serious” Topics…
MA/CSSE 474 More Math Review Theory of Computation
Computer Security: Art and Science, 2nd Edition
CSNB234 ARTIFICIAL INTELLIGENCE
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
ece 720 intelligent web: ontology and beyond
Presentation transcript:

CS6133 Software Specification and Verification Lecture 2 Propositional Logic and Proof Procedure

Propositional Logic as Formal Language A logic consists of Syntax: define well-formed formula Semantics: define meaning of formula interpretation of logical connectives satisfaction relation semantic entailment Proof procedure (also called proof theory) Soundness Completeness CS6133

Propositional Logic Syntax The syntax elements Two constant symbols: true and false Propositions: A, B Logic connectives     Brackets CS6133

Propositional Logic Syntax A well-formed formula (WFF) of propositional logic is constructed as below Every proposition p is a WFF If P is a WFF, then so is (P) If P is a WFF, then so is P If P and Q are WFFs, then so is P  Q If P and Q are WFFs, then so is P  Q If P and Q are WFFs, then so is P  Q CS6133

Propositional Logic Semantics Semantics mean “meaning” and relate two worlds: provide an interpretation (mapping) of expressions in one world in terms of values in another world Semantics are often a function from expressions in one world to expressions in another world The range of the semantic function for propositional logic is the set of truth values Tr = {TRUE, FALSE} CS6133

Truth Table Truth assignment A truth assignment is a mapping of the variables within a formula into the value TRUE or FALSE Truth tables are used to describe the functions of logic connectives on the truth values Truth tables determine the truth value of logic formulas CS6133

Propositional Logic Semantics Satisfiable A formula is satisfiable if there exists some truth assignment under which the formula has truth value TRUE Valid A formula is valid or a tautology, if it has truth value TRUE under all possible truth assignments CS6133

Satisfaction and Entailment Satisfaction relation A model M satisfies the formula P is called a satisfaction relation M P Entailment relation From the premises P1 , P2 , P3 , … , we may conclude Q, where P1 , P2 , P3 , … and Q are all well-formed propositional logic formulas P1 , P2 , P3 Q CS6133

Decidability A logic is decidable if there is an algorithm to determine if any formula of the logic is a tautology (is a theorem, is valid) Propositional logic is decidable because we can always construct the truth table for the propositional formula CS6133

Propositional Logic Proof Procedure A proof procedure is a set of rules we use to transform premises and conclusions into new premises and conclusions A goal is a formula that we want to prove is a tautology A proof is a sequence of proof rules that when chained together relate the premise of the goal to the conclusion of the goal CS6133

Truth Table vs. Proof Procedure Determine if a formula is a tautology by using truth tables: determine the value of the formula for every possible combination of values for its proposition letters Constructing truth table would be very tedious since the size of the truth table grows exponentially: it is NP-complete Proof procedures for propositional logic are alternate means to determine tautologies CS6133

Example Proof Procedures Hilbert Systems: axiom systems Natural Deduction Binary Decision Diagrams Sequent Calculus CS6133

Hilbert System A Hilbert system consists of Inference Rules Axioms: a set of valid formulas Inference rules Inference Rules Determine tautology or unsatisfiability Manipulate formulas as formal strings of symbols But do not make use of the meanings of formulas CS6133

Proof in Hilbert System Proof is a finite sequence X1, X2, … ,Xn of formulas such that each term is either an axiom or follows from earlier terms by one of the rules of inference Write proofs as a list of formulas, each on its own line, and refer to the line of a proof in the justification for steps CS6133

Hilbert System Hilbert system is sound Hilbert system is complete If start with axioms (which are valid) Then each subsequent formula derived with inference rules is also valid Hilbert system is complete Then it can derive all formulas with are valid Hilbert system is consistent Then it is impossible to prove both P and P CS6133

An Axiomatic System for Propositional Logic Three axioms A  (B  A) (A  (B  C))  ((A  B)  (A  C)) ( A  B)  (B  A) One rule of inference From A and A  B, B can be derived, where A and B are any well-formed formulas CS6133

Exercise Show (X  Y)  (X  X) CS6133

Natural Deduction A collection of proof rules, each of which allows us to infer formulas from other formulas, eventually to get from a set of premised to a conclusion A form of forward proof Starting from the premises Use the inference rules to deduce new formulas that logically follow from the premises Continue this process until we have deduced the conclusion CS6133

Natural Deduction Rules Rules for conjunction Rules for double negation Rules for eliminating implication: modus ponens Rule implies introduction Rules for disjunction CS6133

Natural Deduction Rules Rules for conjunction p q _______ i p  q p  q p  q _______ e1 _______ e2 p q CS6133

Natural Deduction Rules Rules for double negation   p p _____   e _____   i p   p CS6133

Natural Deduction Rules Rules for eliminating implication p p  q p  q  q _______  e ________  e q  p CS6133

Natural Deduction Rules Rule implies introduction p . q _______  i p  q CS6133

Natural Deduction Rules Rules for disjunction p q _______  i1 _______  i2 p  q p  q CS6133