Overview, cont. Overview, cont. Logistics. Optional Reference #1. Optional Reference #2. Workload and Grading

Similar documents
CSE507. Course Introduction. Computer-Aided Reasoning for Software. Emina Torlak

CSE507. Introduction. Computer-Aided Reasoning for Software. Emina Torlak courses.cs.washington.edu/courses/cse507/17wi/

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

CS156: The Calculus of Computation Zohar Manna Autumn 2008

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna

Announcements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 2: Propositional Logic

CS156: The Calculus of Computation

Announcements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication

Chapter 4: Classical Propositional Semantics

Course Staff. Textbook

Motivation. CS389L: Automated Logical Reasoning. Lecture 10: Overview of First-Order Theories. Signature and Axioms of First-Order Theory

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

Warm-Up Problem. Is the following true or false? 1/35

Learning Goals of CS245 Logic and Computation

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit:

Logic: Propositional Logic (Part I)

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Applied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

Logical Structures in Natural Language: Propositional Logic II (Truth Tables and Reasoning

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Formal Logic and Deduction Systems

Knowledge based Agents

Deductive Systems. Lecture - 3

Overview. CS389L: Automated Logical Reasoning. Lecture 7: Validity Proofs and Properties of FOL. Motivation for semantic argument method

COMP3702/7702 Artificial Intelligence Week 5: Search in Continuous Space with an Application in Motion Planning " Hanna Kurniawati"

Propositional Reasoning

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Introduction to Artificial Intelligence Propositional Logic & SAT Solving. UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010

Topics in Model-Based Reasoning

WHAT IS AN SMT SOLVER? Jaeheon Yi - April 17, 2008

Satisfiability Modulo Theories (SMT)

Overview of Today s Lecture

Propositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38

Advanced Topics in LP and FP

Chapter 11: Automated Proof Systems

PROPOSITIONAL LOGIC. VL Logik: WS 2018/19

NP-Completeness Part II

Chapter 11: Automated Proof Systems (1)

Propositional Logic: Review

Classical Propositional Logic

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 3: Practical SAT Solving

CSE 311: Foundations of Computing I. Lecture 1: Propositional Logic

02 Propositional Logic

Lecture 2 Propositional Logic & SAT

PL: Truth Trees. Handout Truth Trees: The Setup

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Math.3336: Discrete Mathematics. Propositional Equivalences

CSE507. Satisfiability Modulo Theories. Computer-Aided Reasoning for Software. Emina Torlak

Foundations of Artificial Intelligence

NP-Completeness Part II

Propositional Resolution Part 1. Short Review Professor Anita Wasilewska CSE 352 Artificial Intelligence

Propositional Resolution Introduction

Logic for Computer Science - Week 4 Natural Deduction

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)

Description Logics. Deduction in Propositional Logic. franconi. Enrico Franconi

Artificial Intelligence. Propositional Logic. Copyright 2011 Dieter Fensel and Florian Fischer

Artificial Intelligence. Propositional logic

CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.

Comp487/587 - Boolean Formulas

Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011

CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS

Logic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001

Logic and Inferences

Logic & Logic Agents Chapter 7 (& Some background)

CS 730/730W/830: Intro AI

MAI0203 Lecture 7: Inference and Predicate Calculus

cis32-ai lecture # 18 mon-3-apr-2006

Language of Propositional Logic

Introduction Propositional Logic

A brief introduction to Logic. (slides from

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

Inference in Propositional Logic

Agenda. Artificial Intelligence. Reasoning in the Wumpus World. The Wumpus World

Logic: Propositional Logic Truth Tables

Inf2D 06: Logical Agents: Knowledge Bases and the Wumpus World

Logical Agent & Propositional Logic

LOGIC PROPOSITIONAL REASONING

CS 4700: Artificial Intelligence

Semantics and Pragmatics of NLP

15414/614 Optional Lecture 1: Propositional Logic

Artificial Intelligence Chapter 7: Logical Agents

Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs

Propositional Logic: Logical Agents (Part I)

Propositional Logic: Part II - Syntax & Proofs 0-0

Intelligent Agents. Pınar Yolum Utrecht University

Propositional Logic Language

Propositional Languages

CS Lecture 19: Logic To Truth through Proof. Prof. Clarkson Fall Today s music: Theme from Sherlock

We last time we began introducing equivalency laws.

Lecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)

The Calculus of Computation

Intelligent Systems. Propositional Logic. Dieter Fensel and Dumitru Roman. Copyright 2008 STI INNSBRUCK

Propositional logic. Programming and Modal Logic

CS 340: Discrete Structures for Engineers

Propositional Logic: Logical Agents (Part I)

Transcription:

Course staff CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics şıl Dillig nstructor: şil Dillig E-mail: isil@cs.utexas.edu Office hours: Thursday after class until 6:30 pm in GDC 5.726 TA: Yuepeng Wang (ypwang@cs.utexas.edu) Office hours: Mon, Wed 4-5pm in GDC 5.816 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 1/37 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 2/37 What is this Course About? Why Should You Care? Logic is a fundamental part of computer science: This course is about computational logic and its applications. Explore logical theories widely used in computer science. Learn about decision procedures that allow us to automatically decide satisfiability and validity of logical formulas. Artificial intelligence: planning, automated game playing,... Programming languages: Static analysis, software verification, program synthesis,... Software engineering: automated test generation, automated program repair,... şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 3/37 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 4/37 Overview of the Course Overview, cont Part : Propositional logic Part : First-order theorem proving SAT solvers Semantics of FOL and theoretical properties Applications and variations (e.g., MaxSAT) Basics of first-order theorem proving Binary Decision Diagrams Decidable fragments of FOL şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 5/37 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 6/37 1

Overview, cont. Overview, cont. Part : SMT Solving Part V: Applications in formal methods Decision procedures for commonly used theories (e.g., equality, linear arithmetic) Combining theories, Nelson-Oppen method DPLL(T) and practical SMT solvers Hoare Logic Automated verification using SMT nvariant inference şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 7/37 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 8/37 Logistics Optional Reference #1 All class material (slides, relevant reading etc.) posted on the course website: The Calculus of Computation by Aaron Bradley and Zohar Manna http://www.cs.utexas.edu/ idillig/cs389l Also have a Piazza page: piazza.com/utexas/spring2018/cs389l Please post all non-personal questions on Piazza instead of emailing us! şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 9/37 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 10/37 Optional Reference #2 Workload and Grading Decision Procedures: An Algorithmic Point of View by Daniel Kroening and Ofer Strichman My philosophy: Maximize your knowledge without taking too much time No programming assignments or big projects Expect problem set once every 2 weeks (35% grade) 2 in-class, closed-book exams (30% of grade each) Class attendance and participation (5% of grade) şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 11/37 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 12/37 2

Exams Exam dates: March 6, May 1 put these dates on your calendar! (free during finals week) All exams closed-book, closed-notes, closed-laptop, closed-phone etc, but can bring 2 cheat sheets Let s get started! Today: Review of basic propositional logic Should already know this stuff quick refresher! Please introduce yourself! şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 13/37 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 14/37 Review of Propositional Logic: PL Syntax Atom truth symbols ( true ) and ( false ) propositional variables p, q, r, p 1, q 1, r 1, Literal atom α or its negation α Formula literal or application of a logical connective to formulae F, F 1, F 2 F not (negation) F 1 F 2 and (conjunction) F 1 F 2 or (disjunction) F 1 F 2 implies (implication) F 1 F 2 if and only if (iff) PL Semantics nterpretation : mapping from each propositional variables in F to exactly one truth value : {p, q, } Formula F + nterpretation = Truth value We write = F if F evaluates to under (satisfying interpretation or model) Similarly, = F if F evaluates to under (falsifying interpretation or counter-model). şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 15/37 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 16/37 nductive Definition of PL Semantics Simple Example Base Cases: = = = p iff [p] = = p iff [p] = nductive Cases: = F iff = F = F 1 F 2 iff = F 1 and = F 2 = F 1 F 2 iff = F 1 or = F 2 = F 1 F 2 iff, = F 1 or = F 2 = F 1 F 2 iff, = F 1 and = F 2 or = F 1 and = F 2 Consider formula F 1 : (p q) (p q) What is its truth value under interpretation 1 : {p, q }? What about formula F 2 : (p q) (q r) and interpretation 2 = {p, q, r }? şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 17/37 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 18/37 3

Satisfiability and Validity Examples F is satisfiable iff there exists an interpretation such that = F. F valid iff for all interpretations, = F. F is contingent if it is satisfiable but not valid. Sat, unsat, or valid? (p q) p Duality between satisfiability and validity: (p q) ( (p q)) F is valid iff F is unsatisfiable (p (q r)) ((p q) r) Thus, if we have a procedure for checking satisfiability, this also allows us to decide validity şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 19/37 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 20/37 Deciding Satisfiability and Validity Method 1: Truth Tables Before we talk about practical algorithms for deciding satisfiability, let s review some simple techniques Example F : (p q) (p q) Two very simple techniques: Truth table method: essentially a search-based technique Semantic argument method: deductive way of deciding satisfiability Modern SAT solvers combine search and deduction! p q p q q p q F 0 0 0 1 1 1 0 1 0 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 Thus F is valid. şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 21/37 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 22/37 Another Example Bad dea! F : (p q) (p q) p q p q p q F 0 0 0 0 1 satisfying 0 1 1 0 0 falsifying 1 0 1 0 0 1 1 1 1 1 Truth tables are completely brute-force, impractical must list all 2 n interpretations! Does not work for any other logic where domain is not finite (e.g., first-order logic) Thus F is satisfiable, but invalid. şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 23/37 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 24/37 4

Method 2: Semantic Argument The Proof Rules () Semantic argument method is essentially a proof by contradiction, and is also applicable for theories with non-finite domain. Main idea: Assume F is not valid there exists some falsifying interpretation such that = F According to semantics of negation, from deduce = F : = F = F = F, we can Apply proof rules. f we derive a contradiction in every branch of the proof, then F is valid. Similarly, from = F, we can deduce: = F = F şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 25/37 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 26/37 The Proof Rules () The Proof Rules () According to semantics of conjunction, from can deduce: = F G = F = G and = F G, we According to semantics of disjunction, from can deduce: = F G = F = G = F G, we Similarly, from = F G, we can deduce: = F G = F = G Similarly, from = F G, we can deduce: = F G = F = G The second deduction results in a branch in the proof, so each case has to be examined separately! şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 27/37 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 28/37 The Proof Rules (V) The Proof Rules (V) According to semantics of implication: = F G = F = G According to semantics of iff: = F G = F G = F G And: = F G = F = G And: = F G = F G = F G şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 29/37 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 30/37 5

The Proof Rules (Contradiction) An Example Finally, we derive a contradiction, when both entails F and does not entail F : Prove F : (p q) (p q) is valid. = F = F = şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 31/37 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 32/37 Another Example Equivalence Prove that the following formula is valid using semantic argument method: F : ((p q) (q r)) (p r) Formulas F 1 and F 2 are equivalent (written F 1 F 2 ) iff for all interpretations, = F 1 F 2 F 1 F 2 iff F 1 F 2 is valid Thus, if we have a procedure for checking satisfiability, we can also check equivalence. şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 33/37 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 34/37 mplication Example Formula F 1 implies F 2 (written F 1 F 2 ) iff for all interpretations, = F 1 F 2 Prove that F 1 ( F 1 F 2 ) implies F 2 using semantic argument method. F 1 F 2 iff F 1 F 2 is valid Thus, if we have a procedure for checking satisfiability, we can also check implication Caveat: F 1 F 2 and F 1 F 2 are not formulas (they are not part of PL syntax); they are semantic judgments! şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 35/37 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 36/37 6

Summary Next lecture: Normal forms and algorithms for deciding satisfiability Optional reading: Bradley & Manna texbook until Section 1.6 şıl Dillig, CS389L: Automated Logical Reasoning Lecture 1: ntroduction and Review of Basics 37/37 7