What is a Logic Program. Introduction to Logic Programming. Introductory Examples. Introductory Examples. Foundations, First-Order Language
|
|
- Steven Powers
- 5 years ago
- Views:
Transcription
1 What is a Logic Program Introduction to Logic Programming Foundations, First-Order Language Temur Kutsia Research Institute for Symbolic Computation Johannes Kepler University Linz, Austria kutsia@risc.jku.at Logic program is a set of certain formulas of a first-order language. In this lecture: syntax and semantics of a first-order language. Introductory s Introductory s Representing John loves Mary : loves(john, Mary). loves: a binary predicate (relation) symbol. Intended meaning: The object in the first argument of loves loves the object in its second argument. John, Mary: constants. Intended meaning: To denote persons John and Mary, respectively. father: A unary function symbol. Intended meaning: The father of the object in its argument. John s father loves John: loves(father(john), John).
2 First-Order Language Syntax Syntax Semantics Alphabet Terms Formulas Alphabet A first-order alphabet consists of the following disjoint sets of symbols: A countable set of variables V. For each n 0, a set of n-ary function symbols F n. Elements of F 0 are called constants. For each n 0, a set of n-ary predicate symbols P n. Logical connectives,,,,. Quantifiers,. Parenthesis (, ), and comma,. Notation: x, y, z for variables. f, g for function symbols. a, b, c for constants. p, q for predicate symbols. Terms Definition A variable is a term. If t 1,..., t n are terms and f F n, then f (t 1,..., t n ) is a term. Nothing else is a term. Notation: s, t, r for terms. plus(plus(x, 1), x) is a term, where plus is a binary function symbol, 1 is a constant, x is a variable. father(father(john)) is a term, where father is a unary function symbol and John is a constant.
3 Formulas Eliminating Parentheses Definition If t 1,..., t n are terms and p P n, then p(t 1,..., t n ) is a formula. It is called an atomic formula. If A is a formula, ( A) is a formula. If A and B are formulas, then (A B), (A B), (A B), and (A B) are formulas. If A is a formula, then ( x.a) and ( x.a) are formulas. Nothing else is a formula. Excessive use of parentheses often can be avoided by introducing binding order.,, bind stronger than. binds stronger than. binds stronger than and. Furthermore, omit the outer parentheses and associate,,, to the right. Notation: A, B for formulas. Eliminating Parentheses The formula ( y.( x.((p(x)) ( r(y))) (( q(x)) (A B))))) due to binding order can be rewritten into ( y.( x.(p(x) r(y) q(x) (A B)))) which thanks to the convention of the association to the right and omitting the outer parentheses further simplifies to y. x.(p(x) r(y) q(x) A B). Translating English sentences into first-order logic formulas: 1. Every rational number is a real number. x.(rational(x) real(x)) 2. There exists a number that is prime. x. prime(x) 3. For every number x, there exists a number y such that x < y. Assume: x. y. x < y rational, real, prime: unary predicate symbols. <: binary predicate symbol.
4 Translating English sentences into first-order logic formulas: 1. There is no natural number whose immediate successor is 0. x.zero. = succ(x) 2. For each natural number there exists exactly one immediate successor natural number. x. y.(y. = succ(x) z.(z. = succ(x) y. = z)) 3. For each nonzero natural number there exists exactly one immediate predecessor natural number. x.( (x. = zero) y.(y. = pred(x) z.(z. = pred(x) y. = z))) Assume: zero: constant succ, pred: unary function symbols. =:. binary predicate symbol. Semantics Meaning of a first-order language consists of an universe and an appropriate meaning of each symbol. This pair is called structure. Structure fixes interpretation of function and predicate symbols. Meaning of variables is determined by a variable assignment. Interpretation of terms and formulas. Structure Variable Assignment Structure: a pair (D, I). D is a nonempty universe, the domain of interpretation. I is an interpretation function defined on D that fixes the meaning of each symbol associating to each f F n an n-ary function f I : D n D, (in particular, c I D for each constant c) to each p P n different from. =, an n-ary relation p I on D. A structure S = (D, I) is given. Variable assignment σ S maps each x V into an element of D: σ S (x) D. Given a variable x, an assignment ϑ S is called an x-variant of σ S iff ϑ S (y) = σ S (y) for all y x.
5 Interpretation of Terms Interpretation of Formulas A structure S = (D, I) and a variable assignment σ S are given. Value of a term t under S and σ S, Val S,σS (t): Val S,σS (x) = σ S (x). Val S,σS (f (t 1,..., t n )) = f I (Val S,σS (t 1 ),..., Val S,σS (t n )). A structure S = (D, I) and a variable assignment σ S are given. Value of an atomic formula under S and σ S is one of true, false: Val S,σS (s =. t) = true iff Val S,σS (s) = Val S,σS (t). Val S,σS (p(t 1,..., t n )) = true iff (Val S,σS (t 1 ),..., Val S,σS (t n )) p I. Interpretation of Formulas Interpretation of Formulas A structure S = (D, I) and a variable assignment σ S are given. Values of compound formulas under S and σ S are also either true or false: ValS,σS ( A) = true iff Val S,σS (A) = false. ValS,σS (A B) = true iff Val S,σS (A) = true or Val S,σS (B) = true. Val S,σS (A B) = true iff Val S,σS (A) = true and Val S,σS (B) = true. Val S,σS (A B) = true iff Val S,σS (A) = false or Val S,σS (B) = true. ValS,σS (A B) = true iff Val S,σS (A) = Val S,σS (B). ValS,σS ( x.a) = true iff Val S,ϑS (A) = true for some x-variant ϑ S of σ S. Val S,σS ( x.a) = true iff Val S,ϑS (A) = true for all x-variants ϑ S of σ S. A structure S = (D, I) is given. The value of a formula A under S is either true or false: ValS (A) = true iff Val S, σ S (A) = true for all σ S. S is called a model of A iff Val S (A) = true. Written S A.
6 Validity, Unsatisfiability Formula: x.(p(x) q(f (x), a)) Define S = (D, I) as D = {1, 2}, ai = 1, fi (1) = 2, f I (2) = 1, p I = {2}, q I = {(1, 1), (1, 2), (2, 2)}. If σ S (x) = 1, then Val S,σS ( x.(p(x) q(f (x), a))) = true. If σ S (x) = 2, then Val S,σS ( x.(p(x) q(f (x), a))) = true. Hence, S A. A formula A is valid, if S A for all S. Written A. A formula A is unsatisfiable, if S A for no S. If A is valid, then A is unsatisfiable and vice versa. The notions extend to (multi)sets of formulas. For {A 1,..., A n }, just formulate them for A 1 A n. Valid Non-valid sat Unsat Validity, Unsatisfiability Logical Consequence Valid Non-valid sat Unsat Definition A formula A is a logical consequence of the formulas B 1,..., B n, if every model of B 1 B n is a model of A. x.p(x) y.p(y) is valid. p(a) x.p(x) is satisfiable non-valid. x.p(x) y. p(y) is unsatisfiable. mortal(socrates) is a logical consequence of x.(person(x) mortal(x)) and person(socrates). cooked(apple) is a logical consequence of x.( cooked(x) tasty(x)) and tasty(apple). genius(einstein) is not a logical consequence of x.person(x) genius(x) and person(einstein).
7 Logic Programs Logic programs: finite non-empty sets of formulas of a special form, called program clauses. Program clause: where x x k. B 1 B n A, k, n 0, A and the B s are atomic formulas, x1,..., x k are all the variables which occur in A, B 1,..., B n. Usually written in the inverse implication form without quantifiers and conjunctions: A B 1,..., B n Goal Goals or queries of logic programs: formulas of the form where x x k. B 1 B n, k, n 0, the B s are atomic formulas, x1,..., x k are all the variables which occur in B 1,..., B n. Usually written without quantifiers and conjunction: B 1,..., B n The problem is to find out whether a goal is a logical consequence of the given logic program or not. The Problem and the Idea Let P be a program and G be a goal. Problem: Is G a logical consequence of P? Idea: Try to show that the set of formulas P { G} is inconsistent. How? This we will learn in this course. Let P consist of the two clauses: x.mortal(x) person(x). person(socrates). Goal: G = x.mortal(x). G is equivalent to x. mortal(x). The set { x.mortal(x) person(x), person(socrates), x. mortal(x)} is inconsistent. Hence, G is a logical consequence of P. We can even compute the witness term for the goal: x = socrates. How? This we will learn in this lecture.
Introduction to Logic Programming
Introduction to Logic Programming Foundations, First-Order Language Temur Kutsia RISC, Johannes Kepler University Linz, Austria kutsia@risc.jku.at What is a Logic Program Logic program is a set of certain
More informationOverview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.
Overview CS389L: Automated Logical Reasoning Lecture 6: First Order Logic Syntax and Semantics Işıl Dillig So far: Automated reasoning in propositional logic. Propositional logic is simple and easy to
More informationAutomated Reasoning Systems
Automated Reasoning Systems Resolution Theorem Proving: Prover9 Temur Kutsia RISC, Johannes Kepler University of Linz, Austria kutsia@risc.uni-linz.ac.at May 11, 2011 Prover9 Automated theorem prover from
More informationLecture 4: January 12, 2015
32002: AI (First Order Predicate Logic, Interpretation and Inferences) Spring 2015 Lecturer: K.R. Chowdhary Lecture 4: January 12, 2015 : Professor of CS (VF) Disclaimer: These notes have not been subjected
More informationLecture 5: Predicate Calculus. ffl Predicate Logic ffl The Language ffl Semantics: Structures
Lecture 5: Predicate Calculus ffl Predicate Logic ffl The Language ffl Semantics: Structures 1 Why Predicate Logic? Propositional logic is not powerful enough to express statements such as ffl For every
More informationChapter 1.3 Quantifiers, Predicates, and Validity. Reading: 1.3 Next Class: 1.4. Motivation
Chapter 1.3 Quantifiers, Predicates, and Validity Reading: 1.3 Next Class: 1.4 1 Motivation Propositional logic allows to translate and prove certain arguments from natural language If John s wallet was
More informationFoundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution
Foundations of AI 9. Predicate Logic Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution Wolfram Burgard, Andreas Karwath, Bernhard Nebel, and Martin Riedmiller 09/1 Contents Motivation
More informationChapter 3: Propositional Languages
Chapter 3: Propositional Languages We define here a general notion of a propositional language. We show how to obtain, as specific cases, various languages for propositional classical logic and some non-classical
More informationReview Material: First Order Logic (FOL)
Information Integration on the WEB with RDF, OWL and SPARQL Review Material: First Order Logic (FOL) Grant Weddell October 7, 2013 Syntax of FOL Signatures Vocabularies are called signatures in FOL. The
More informationNotes. Notes. Introduction. Notes. Propositional Functions. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry.
Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Spring 2006 1 / 1 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 1.3 1.4 of Rosen cse235@cse.unl.edu Introduction
More informationPart I Logic programming paradigm
Part I Logic programming paradigm 1 Logic programming and pure Prolog 1.1 Introduction 3 1.2 Syntax 4 1.3 The meaning of a program 7 1.4 Computing with equations 9 1.5 Prolog: the first steps 15 1.6 Two
More informationIntegrity Constraints (Chapter 7.3) Overview. Bottom-Up. Top-Down. Integrity Constraint. Disjunctive & Negative Knowledge. Proof by Refutation
CSE560 Class 10: 1 c P. Heeman, 2010 Integrity Constraints Overview Disjunctive & Negative Knowledge Resolution Rule Bottom-Up Proof by Refutation Top-Down CSE560 Class 10: 2 c P. Heeman, 2010 Integrity
More informationWarm-Up Problem. Let L be the language consisting of as constant symbols, as a function symbol and as a predicate symbol. Give an interpretation where
Warm-Up Problem Let L be the language consisting of as constant symbols, as a function symbol and as a predicate symbol Give an interpretation where is false Use a finite domain in your interpretation
More informationSC/MATH Boolean Formulae. Ref: G. Tourlakis, Mathematical Logic, John Wiley & Sons, York University
SC/MATH 1090 1- Boolean Formulae Ref: G. Tourlakis, Mathematical Logic, John Wiley & Sons, 2008. York University Department of Computer Science and Engineering York University- MATH 1090 01-Boolean 1 Overview
More informationResolution (14A) Young W. Lim 6/14/14
Copyright (c) 2013-2014. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free
More informationChapter 2 & 3: Representations & Reasoning Systems (2.2)
Chapter 2 & 3: A Representation & Reasoning System & Using Definite Knowledge Representations & Reasoning Systems (RRS) (2.2) Simplifying Assumptions of the Initial RRS (2.3) Datalog (2.4) Semantics (2.5)
More informationCSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27
CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter 2.1-2.7 p. 1/27 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer
More informationCSE 20 DISCRETE MATH. Fall
CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Final exam The final exam is Saturday December 16 11:30am-2:30pm. Lecture A will take the exam in Lecture B will take the exam
More informationLogic Programming and Resolution Lecture notes for INF3170/4171
Logic Programming and Resolution Lecture notes for INF3170/4171 Leif Harald Karlsen Autumn 2015 1 Introduction This note will explain the connection between logic and computer programming using Horn Clauses
More informationModule 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur
Module 6 Knowledge Representation and Logic (First Order Logic) 6.1 Instructional Objective Students should understand the advantages of first order logic as a knowledge representation language Students
More informationIntroduction to Logic Programming
Introduction to Logic Programming York University CSE 3401 Vida Movahedi York University CSE 3401 V. Movahedi 1 Overview Programming Language Paradigms Logic Programming Functional Programming Brief review
More informationComputer Science and Mathematics. Part I: Fundamental Mathematical Concepts Winfried Kurth
Computer Science and Mathematics Part I: Fundamental Mathematical Concepts Winfried Kurth http://www.uni-forst.gwdg.de/~wkurth/csm17_home.htm 1. Mathematical Logic Propositions - can be either true or
More informationLecture 7: January 15, 2014
32002: AI (First order Predicate Logic, Syntax and Semantics) Spring 2014 Lecturer: K.R. Chowdhary Lecture 7: January 15, 2014 : Professor of CS (GF) Disclaimer: These notes have not been subjected to
More informationSet 7: Predicate logic Chapter 8 R&N. ICS 271 Fall 2015
Set 7: Predicate logic Chapter 8 R&N ICS 271 Fall 2015 Outline New ontology objects, relations, properties, functions New Syntax Constants, predicates, properties, functions New semantics meaning of new
More informationCSE 20 DISCRETE MATH. Winter
CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Final exam The final exam is Saturday March 18 8am-11am. Lecture A will take the exam in GH 242 Lecture B will take the exam
More informationLecture 5. Logic I. Statement Logic
Ling 726: Mathematical Linguistics, Logic. Statement Logic V. Borschev and B. Partee, September 27, 2 p. Lecture 5. Logic I. Statement Logic. Statement Logic...... Goals..... Syntax of Statement Logic....2.
More information15-819M: Data, Code, Decisions
15-819M: Data, Code, Decisions 08: First-Order Logic André Platzer aplatzer@cs.cmu.edu Carnegie Mellon University, Pittsburgh, PA André Platzer (CMU) 15-819M/08: Data, Code, Decisions 1 / 40 Outline 1
More informationDefinition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,,
CMPSCI 601: Recall From Last Time Lecture 5 Definition: A context-free grammar (CFG) is a 4- tuple, variables = nonterminals, terminals, rules = productions,,, are all finite. 1 ( ) $ Pumping Lemma for
More informationAutomated Reasoning. Natural Deduction in First-Order Logic
Automated Reasoning Natural Deduction in First-Order Logic Jacques Fleuriot Automated Reasoning Lecture 4, page 1 Problem Consider the following problem: Every person has a heart. George Bush is a person.
More informationCSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi
is another way of showing that an argument is correct. Definitions: Literal: A variable or a negation of a variable is called a literal. Sum and Product: A disjunction of literals is called a sum and a
More informationLTCS Report. Concept Descriptions with Set Constraints and Cardinality Constraints. Franz Baader. LTCS-Report 17-02
Technische Universität Dresden Institute for Theoretical Computer Science Chair for Automata Theory LTCS Report Concept Descriptions with Set Constraints and Cardinality Constraints Franz Baader LTCS-Report
More informationSOFTWARE ENGINEERING DESIGN I
2 SOFTWARE ENGINEERING DESIGN I 3. Schemas and Theories The aim of this course is to learn how to write formal specifications of computer systems, using classical logic. The key descriptional technique
More informationRecap Datalog Datalog Syntax Datalog Semantics. Logic: Datalog. CPSC 322 Logic 6. Textbook Logic: Datalog CPSC 322 Logic 6, Slide 1
Logic: Datalog CPSC 322 Logic 6 Textbook 12.2 Logic: Datalog CPSC 322 Logic 6, Slide 1 Lecture Overview 1 Recap 2 Datalog 3 Datalog Syntax 4 Datalog Semantics Logic: Datalog CPSC 322 Logic 6, Slide 2 Top-down
More informationMathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 37 Resolution Rules
Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras Lecture - 37 Resolution Rules If some literals can be unified, the same algorithm should be able
More informationConstraint Solving. Systems and Internet Infrastructure Security
Systems and Internet Infrastructure Security Network and Security Research Center Department of Computer Science and Engineering Pennsylvania State University, University Park PA Constraint Solving Systems
More informationThis book is licensed under a Creative Commons Attribution 3.0 License
6. Syntax Learning objectives: syntax and semantics syntax diagrams and EBNF describe context-free grammars terminal and nonterminal symbols productions definition of EBNF by itself parse tree grammars
More informationThis is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS
1 THE FORMALIZATION OF MATHEMATICS by Harvey M. Friedman Ohio State University Department of Mathematics friedman@math.ohio-state.edu www.math.ohio-state.edu/~friedman/ May 21, 1997 Can mathematics be
More informationDecision Procedures in First Order Logic
in First Order Logic for Equality Logic Daniel Kroening and Ofer Strichman 1 Outline Introduction Definition, complexity Reducing Uninterpreted Functions to Equality Logic Using Uninterpreted Functions
More informationlogic importance logic importance (2) logic importance (3) specializations of logic Horn logic specializations of logic RDF and OWL
logic importance - high-level language for expressing knowledge - high expressive power - well-understood formal semantics - precise notion of logical consequence - systems that can automatically derive
More informationCS 512, Spring 2017: Take-Home End-of-Term Examination
CS 512, Spring 2017: Take-Home End-of-Term Examination Out: Tuesday, 9 May 2017, 12:00 noon Due: Wednesday, 10 May 2017, by 11:59 am Turn in your solutions electronically, as a single PDF file, by placing
More informationLogic as a framework for NL semantics. Outline. Syntax of FOL [1] Semantic Theory Type Theory
Logic as a framework for NL semantics Semantic Theory Type Theory Manfred Pinkal Stefan Thater Summer 2007 Approximate NL meaning as truth conditions. Logic supports precise, consistent and controlled
More informationLecture 1. 1 Notation
Lecture 1 (The material on mathematical logic is covered in the textbook starting with Chapter 5; however, for the first few lectures, I will be providing some required background topics and will not be
More informationCS 321 Programming Languages and Compilers. Prolog
CS 321 Programming Languages and Compilers Prolog Prolog PROgramming LOGic Algorithm = Logic + Control Logic programming deals with computing relations rather than functions. To understand Prolog one must
More informationCopyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 6 Outline. Unary Relational Operations: SELECT and
Chapter 6 The Relational Algebra and Relational Calculus Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 Outline Unary Relational Operations: SELECT and PROJECT Relational
More informationPropositional Logic Formal Syntax and Semantics. Computability and Logic
Propositional Logic Formal Syntax and Semantics Computability and Logic Syntax and Semantics Syntax: The study of how expressions are structured (think: grammar) Semantics: The study of the relationship
More informationIntroduction & Review
Introduction & Review York University Department of Computer Science and Engineering 1 Why this course? Overview Programming Language Paradigms Brief review of Logic Propositional logic Predicate logic
More informationLexicografie computationala Feb., 2012
Lexicografie computationala Feb., 2012 Anca Dinu University of Bucharest Introduction When we construct meaning representations systematically, we integrate information from two different sources: 1. The
More informationCS 6110 S14 Lecture 38 Abstract Interpretation 30 April 2014
CS 6110 S14 Lecture 38 Abstract Interpretation 30 April 2014 1 Introduction to Abstract Interpretation At this point in the course, we have looked at several aspects of programming languages: operational
More informationIntroduction to Sets and Logic (MATH 1190)
Introduction to Sets and Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics and Statistics York University Dec 4, 2014 Outline 1 2 3 4 Definition A relation R from a set A to a set
More informationF. Brief review of classical predicate logic (PC)
F. Brief review of classical predicate logic (PC) F.I. Syntax (LfP 4.1) F.I.1. Primitive symbols Primitive vocabulary of PC (LfP 90): connectives: Ñ,, @ variables: x, y,... (with or without numerical subscripts)
More informationAutomata Theory for Reasoning about Actions
Automata Theory for Reasoning about Actions Eugenia Ternovskaia Department of Computer Science, University of Toronto Toronto, ON, Canada, M5S 3G4 eugenia@cs.toronto.edu Abstract In this paper, we show
More information8. Relational Calculus (Part II)
8. Relational Calculus (Part II) Relational Calculus, as defined in the previous chapter, provides the theoretical foundations for the design of practical data sub-languages (DSL). In this chapter, we
More informationGoing beyond propositional logic
Going beyond propositional logic Consider the following statements: p: Ling took CS245 q: Ling passed CS245 r: Ling failed CS245 Taken literally, these are all atomic statements, and formally they have
More informationPCP and Hardness of Approximation
PCP and Hardness of Approximation January 30, 2009 Our goal herein is to define and prove basic concepts regarding hardness of approximation. We will state but obviously not prove a PCP theorem as a starting
More informationMathematical Logic
Mathematical Logic - 2017 Exercises: DPLL and First Order Logics (FOL) Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia, Rui Zhang, Vincenzo Maltese and Mattia Fumagalli
More informationCOMP2411 Lecture 20: Logic Programming Examples. (This material not in the book)
COMP2411 Lecture 20: Logic Programming Examples (This material not in the book) There are several distinct but often equivalent ways to think about logic programs 1. As computing logical consequences of
More informationAutomatic Reasoning (Section 8.3)
Automatic Reasoning (Section 8.3) Automatic Reasoning Can reasoning be automated? Yes, for some logics, including first-order logic. We could try to automate natural deduction, but there are many proof
More informationSemantics and Pragmatics of NLP Propositional Logic, Predicates and Functions
, Semantics and Pragmatics of NLP, and s Alex Ewan School of Informatics University of Edinburgh 10 January 2008 , 1 2 3 4 Why Bother?, Aim: 1 To associate NL expressions with semantic representations;
More informationDecision Procedures for Equality Logic. Daniel Kroening and Ofer Strichman 1
in First Order Logic for Equality Logic Daniel Kroening and Ofer Strichman 1 Outline Introduction Definition, complexity Reducing Uninterpreted Functions to Equality Logic Using Uninterpreted Functions
More informationCSC Discrete Math I, Spring Sets
CSC 125 - Discrete Math I, Spring 2017 Sets Sets A set is well-defined, unordered collection of objects The objects in a set are called the elements, or members, of the set A set is said to contain its
More informationFirst Order Logic Semantics (3A) Young W. Lim 6/1/17
First Order Logic Semantics (3A) Young W. Lim Copyright (c) 2016-2017 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License,
More informationLogic and Databases. Phokion G. Kolaitis. UC Santa Cruz & IBM Research - Almaden
Logic and Databases Phokion G. Kolaitis UC Santa Cruz & IBM Research - Almaden 1 Logic and Databases are inextricably intertwined. C.J. Date -- 2007 2 Logic and Databases Extensive interaction between
More informationPropositional Logic. Part I
Part I Propositional Logic 1 Classical Logic and the Material Conditional 1.1 Introduction 1.1.1 The first purpose of this chapter is to review classical propositional logic, including semantic tableaux.
More informationProgramming Languages Third Edition
Programming Languages Third Edition Chapter 12 Formal Semantics Objectives Become familiar with a sample small language for the purpose of semantic specification Understand operational semantics Understand
More informationRelational Databases
Relational Databases Jan Chomicki University at Buffalo Jan Chomicki () Relational databases 1 / 49 Plan of the course 1 Relational databases 2 Relational database design 3 Conceptual database design 4
More informationFor next Tuesday. Read chapter 8 No written homework Initial posts due Thursday 1pm and responses due by class time Tuesday
For next Tuesday Read chapter 8 No written homework Initial posts due Thursday 1pm and responses due by class time Tuesday Any questions? Program 1 Imperfect Knowledge What issues arise when we don t know
More informationData types for mcrl2
Data types for mcrl2 Aad Mathijssen April 5, 2018 We provide a syntax for the standard data types of the mcrl2 language. This syntax is intended to be a practical mix between standard mathematical notation
More informationCITS2211 Discrete Structures Logic
CITS2211 Discrete Structures Logic Unit coordinator: Rachel Cardell-Oliver August 6, 2017 Highlights All men are mortal, Socrates is a man, therefore Socrates is mortal. Reading Chapter 3: Logical Formulas
More informationCSE-321 Programming Languages 2010 Midterm
Name: Hemos ID: CSE-321 Programming Languages 2010 Midterm Score Prob 1 Prob 2 Prob 3 Prob 4 Total Max 15 30 35 20 100 1 1 SML Programming [15 pts] Question 1. [5 pts] Give a tail recursive implementation
More informationLecture 1: Conjunctive Queries
CS 784: Foundations of Data Management Spring 2017 Instructor: Paris Koutris Lecture 1: Conjunctive Queries A database schema R is a set of relations: we will typically use the symbols R, S, T,... to denote
More informationBasic Elements of Computer Algebra in MIZAR
Basic Elements of Computer Algebra in MIZAR Adam Naumowicz Czeslaw Bylinski Institute of Computer Science University of Bialystok, Poland adamn@math.uwb.edu.pl Section of Computer Networks University of
More information2.2 Set Operations. Introduction DEFINITION 1. EXAMPLE 1 The union of the sets {1, 3, 5} and {1, 2, 3} is the set {1, 2, 3, 5}; that is, EXAMPLE 2
2.2 Set Operations 127 2.2 Set Operations Introduction Two, or more, sets can be combined in many different ways. For instance, starting with the set of mathematics majors at your school and the set of
More informationMathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 9 Normal Forms
Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras Lecture - 9 Normal Forms In the last class we have seen some consequences and some equivalences,
More informationArtificial Intelligence. Chapters Reviews. Readings: Chapters 3-8 of Russell & Norvig.
Artificial Intelligence Chapters Reviews Readings: Chapters 3-8 of Russell & Norvig. Topics covered in the midterm Solving problems by searching (Chap. 3) How to formulate a search problem? How to measure
More informationCOMP Logic for Computer Scientists. Lecture 23
COMP 1002 Logic for Computer cientists Lecture 23 B 5 2 J Admin stuff Assignment 3 extension Because of the power outage, assignment 3 now due on Tuesday, March 14 (also 7pm) Assignment 4 to be posted
More informationCOMP 9416, session 1, 2006 p. 1. Datalog. COMP 9416, session 1, 2006
OMP 9416, session 1, 2006 p. 1 Datalog OMP 9416, session 1, 2006 OMP 9416, session 1, 2006 p. 2 Atoms, integers and variables The fact "person(socrates).", the fact "sum(2,3,y)." and the rule "mortal(x)
More informationCMPSCI 250: Introduction to Computation. Lecture #7: Quantifiers and Languages 6 February 2012
CMPSCI 250: Introduction to Computation Lecture #7: Quantifiers and Languages 6 February 2012 Quantifiers and Languages Quantifier Definitions Translating Quantifiers Types and the Universe of Discourse
More informationLecture 9: Predicate Logic. First: Finish Propositional Logic in Haskell. Semantics in Haskell. Syntax In Haskell. CS 181O Spring 2016 Kim Bruce
Lecture 9: Predicate Logic CS 181O Spring 2016 Kim Bruce First: Finish Propositional Logic in Haskell Some slide content taken from Unger and Michaelis Syntax In Haskell data Form = P String Ng Form Cnj
More informationLogic Programming. Efficiency Issues. Temur Kutsia
Logic Programming Efficiency Issues Temur Kutsia Research Institute for Symbolic Computation Johannes Kepler University of Linz, Austria kutsia@risc.uni-linz.ac.at Efficiency Issues in Prolog Narrow the
More informationCS221 / Autumn 2017 / Liang & Ermon. Lecture 17: Logic II
CS221 / Autumn 2017 / Liang & Ermon Lecture 17: Logic II Review: ingredients of a logic Syntax: defines a set of valid formulas (Formulas) Example: Rain Wet Semantics: for each formula, specify a set of
More informationITCS 6150 Intelligent Systems. Lecture 13 First-Order Logic Chapter 8
ITCS 6150 Intelligent Systems Lecture 13 First-Order Logic Chapter 8 First-order logic We saw how propositional logic can create intelligent behavior But propositional logic is a poor representation for
More informationLecture 5: Formation Tree and Parsing Algorithm
Discrete Mathematics (II) Spring 2012 Lecture 5: Formation Tree and Parsing Algorithm Lecturer: Yi Li 1 Overview In this lecture, we completely focus on syntax of proposition. And the term proposition
More informationFirst Order Logic Semantics (3A) Young W. Lim 6/2/17
First Order Logic (3A) Young W. Lim Copyright (c) 2016-2017 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version
More informationCIS 500 Software Foundations Midterm I
CIS 500 Software Foundations Midterm I October 11, 2006 Name: Student ID: Email: Status: Section: registered for the course not registered: sitting in to improve a previous grade not registered: just taking
More informationSituation Calculus and YAGI
Situation Calculus and YAGI Institute for Software Technology 1 Progression another solution to the projection problem does a sentence hold for a future situation used for automated reasoning and planning
More informationConjunctive queries. Many computational problems are much easier for conjunctive queries than for general first-order queries.
Conjunctive queries Relational calculus queries without negation and disjunction. Conjunctive queries have a normal form: ( y 1 ) ( y n )(p 1 (x 1,..., x m, y 1,..., y n ) p k (x 1,..., x m, y 1,..., y
More informationShared Variables and Interference
Illinois Institute of Technology Lecture 24 Shared Variables and Interference CS 536: Science of Programming, Spring 2018 A. Why Parallel programs can coordinate their work using shared variables, but
More informationSemantics via Syntax. f (4) = if define f (x) =2 x + 55.
1 Semantics via Syntax The specification of a programming language starts with its syntax. As every programmer knows, the syntax of a language comes in the shape of a variant of a BNF (Backus-Naur Form)
More informationCIS 771: Software Specifications. Lecture: Alloy Logic (part D)
CIS 771: Software Specifications Lecture: Alloy Logic (part D) Copyright 2007, John Hatcliff, and Robby. The syllabus and all lectures for this course are copyrighted materials and may not be used in other
More informationAbstract Syntax Trees L3 24
Abstract Syntax Trees L3 24 Formal languages An extensional view of what constitutes a formal language is that it is completely determined by the set of words in the dictionary : Given an alphabet Σ, wecallanysubsetofσ
More informationMulti Domain Logic and its Applications to SAT
Multi Domain Logic and its Applications to SAT Tudor Jebelean RISC Linz, Austria Tudor.Jebelean@risc.uni-linz.ac.at Gábor Kusper Eszterházy Károly College gkusper@aries.ektf.hu Abstract We describe a new
More informationConstraint Satisfaction Problems (CSPs)
Constraint Satisfaction Problems (CSPs) CPSC 322 CSP 1 Poole & Mackworth textbook: Sections 4.0-4.2 Lecturer: Alan Mackworth September 28, 2012 Problem Type Static Sequential Constraint Satisfaction Logic
More information8. Negation 8-1. Deductive Databases and Logic Programming. (Sommer 2017) Chapter 8: Negation
8. Negation 8-1 Deductive Databases and Logic Programming (Sommer 2017) Chapter 8: Negation Motivation, Differences to Logical Negation Syntax, Supported Models, Clark s Completion Stratification, Perfect
More information2/18/14. Uses for Discrete Math in Computer Science. What is discrete? Why Study Discrete Math? Sets and Functions (Rosen, Sections 2.1,2.2, 2.
Why Study Discrete Math? Sets and Functions (Rosen, Sections 2.1,2.2, 2.3) TOPICS Discrete math Set Definition Set Operations Tuples Digital computers are based on discrete units of data (bits). Therefore,
More informationRIF RuleML Rosetta Ring: Round-Tripping the Dlex Subset of Datalog RuleML and RIF-Core
RIF RuleML Rosetta Ring: Round-Tripping the Dlex Subset of Datalog RuleML and RIF-Core The International RuleML Symposium on Rule Interchange and Applications Las Vegas, Nevada, USA, Nov 5-7, 2009 Harold
More informationAnnouncements. The current topic: Scheme. Review: BST functions. Review: Representing trees in Scheme. Reminder: Lab 2 is due on Monday at 10:30 am.
The current topic: Scheme! Introduction! Object-oriented programming: Python Functional programming: Scheme! Introduction! Numeric operators, REPL, quotes, functions, conditionals! Function examples, helper
More informationSyntax-semantics interface and the non-trivial computation of meaning
1 Syntax-semantics interface and the non-trivial computation of meaning APA/ASL Group Meeting GVI-2: Lambda Calculi, Type Systems, and Applications to Natural Language APA Eastern Division 108th Annual
More informationLogic: TD as search, Datalog (variables)
Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from Chpt 12) June, 8, 2017 CPSC 322, Lecture 23 Slide 1 Lecture Overview Recap Top
More informationSolutions to Homework 10
CS/Math 240: Intro to Discrete Math 5/3/20 Instructor: Dieter van Melkebeek Solutions to Homework 0 Problem There were five different languages in Problem 4 of Homework 9. The Language D 0 Recall that
More information6.034 Notes: Section 10.1
6.034 Notes: Section 10.1 Slide 10.1.1 A sentence written in conjunctive normal form looks like ((A or B or not C) and (B or D) and (not A) and (B or C)). Slide 10.1.2 Its outermost structure is a conjunction.
More information