Models of Definite Programs

Slides:



Advertisements
Similar presentations
Completeness and Expressiveness
Advertisements

Some important properties Lectures of Prof. Doron Peled, Bar Ilan University.
B ϋ CHIS MONADIC SECOND ORDER LOGIC Verification Seminar V.Sowjanya Lakshmi ( Subhasree M.
Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)
CSCI 115 Chapter 6 Order Relations and Structures.
10 October 2006 Foundations of Logic and Constraint Programming 1 Unification ­An overview Need for Unification Ranked alfabeths and terms. Substitutions.
Lecture 11: Datalog Tuesday, February 6, Outline Datalog syntax Examples Semantics: –Minimal model –Least fixpoint –They are equivalent Naive evaluation.
Web Science & Technologies University of Koblenz ▪ Landau, Germany Advanced Data Modeling Minimal Models Steffen Staab TexPoint fonts used in EMF. Read.
Well-founded Semantics with Disjunction João Alcântara, Carlos Damásio and Luís Moniz Pereira Centro de Inteligência Artificial.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
1 Basic abstract interpretation theory. 2 The general idea §a semantics l any definition style, from a denotational definition to a detailed interpreter.
11 November 2005 Foundations of Logic and Constraint Programming 1 Negation: Declarative Interpretation ­An overview First Order Formulas and Logical Truth.
1 2. Constraint Databases Next level of data abstraction: Constraint level – finitely represents by constraints the logical level.
Discrete Mathematics Lecture 2 Alexander Bukharovich New York University.
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
Programming Language Semantics Denotational Semantics Chapter 5 Part III Based on a lecture by Martin Abadi.
17 October 2006 Foundations of Logic and Constraint Programming 1 Declarative Semantics ­An overview Algebras (semantics for terms) Interpretations (semantics.
Auto-Epistemic Logic Proposed by Moore (1985) Contemplates reflection on self knowledge (auto-epistemic) Allows for representing knowledge not just about.
Sets, POSets, and Lattice © Marcelo d’Amorim 2010.
1 Knowledge Based Systems (CM0377) Lecture 4 (Last modified 5th February 2001)
CS344: Introduction to Artificial Intelligence Lecture: Herbrand’s Theorem Proving satisfiability of logic formulae using semantic trees (from Symbolic.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 28– Interpretation; Herbrand Interpertation 30 th Sept, 2010.
Unification Algorithm Input: a finite set Σ of simple expressions Output: a mgu for Σ (if Σ is unifiable) 1. Set k = 0 and  0 = . 2. If Σ  k is a singleton,
LDK R Logics for Data and Knowledge Representation PL of Classes.
CS 267: Automated Verification Lecture 3: Fixpoints and Temporal Properties Instructor: Tevfik Bultan.
1 IS 2150 / TEL 2810 Introduction to Security James Joshi Associate Professor, SIS Lecture 3 September 15, 2009 Mathematical Review Security Policies.
2.1 Sets 2.2 Set Operations –Set Operations –Venn Diagrams –Set Identities –Union and Intersection of Indexed Collections 2.3 Functions 2.4 Sequences and.
CSE 311 Foundations of Computing I Lecture 9 Proofs and Set Theory Autumn 2012 CSE
Automated reasoning with propositional and predicate logics Spring 2007, Juris Vīksna.
LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1.
1 Knowledge Based Systems (CM0377) Lecture 6 (last modified 20th February 2002)
LDK R Logics for Data and Knowledge Representation Propositional Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
Web Science & Technologies University of Koblenz ▪ Landau, Germany Models of Definite Programs.
CSE 311: Foundations of Computing Fall 2013 Lecture 8: Proofs and Set theory.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
1 Introduction to Abstract Mathematics Chapter 3: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 3.1.
Data Flow Analysis II AModel Checking and Abstract Interpretation Feb. 2, 2011.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
The Relation Induced by a Partition
Chapter 6 Order Relations and Structures
Logics for Data and Knowledge Representation
Fixpoints and Reachability
3. The Logic of Quantified Statements Summary
Unit-III Algebraic Structures
Completeness of the SLD-Resolution
IS 2150 / TEL 2810 Information Security & Privacy
Semantics In propositional logic, we associate atoms with propositions about the world. We specify the semantics of our logic, giving it a “meaning”. Such.
Logics for Data and Knowledge Representation
Logics for Data and Knowledge Representation
Alternating tree Automata and Parity games
Logics for Data and Knowledge Representation
Concurrent Models of Computation
Soundness of SLD-Resolution
A Brief Summary for Exam 1
IS 2150 / TEL 2810 Introduction to Security
Models of Definite Programs
Logics for Data and Knowledge Representation
Search techniques.
Models of Definite Programs
IS 2150 / TEL 2810 Introduction to Security
Herbrand Semantics Computational Logic Lecture 15
Advanced Data Modeling Minimal Models
Soundness of SLD-Resolution
CS589 Principles of DB Systems Fall 2008 Lecture 4e: Logic (Model-theoretic view of a DB) Lois Delcambre
IS 2150 / TEL 2810 Information Security & Privacy
Logics for Data and Knowledge Representation
Presentation transcript:

Models of Definite Programs

Herbrand-Interpretations Herbrand-Base Q(a) P(f(b))… ~Q(a) ~P(f(b))… I1 The true atoms of the Herbrand base correlate with the corresponding interpretation. ! I2 Q(a) P(f(b)) ~P(f(b)) ~Q(a) I3

Model Intersection Property Proposition: Let P be a definite program and {Mi}iI a non-empty set of Herbrand models for P. Then iIMi is an Herbrand model for P. If {Mi}iI contains all Herbrand models for p, then MP :=iIMi is the least Herbrand model for P.

Idea BP (2BP, ) is a lattice of all Herbrand interpretations of P with the bottom element  and the top element BP The least upper bound (lub) of a set of interpretations is the union, the greatest lower bound is the intersection. MP 

Model Intersection Property Proposition: Let P be a definite program and {Mi}iI a non-empty set of Herbrand models for P. Then iIMi is an Herbrand model for P. If {Mi}iI contains all Herbrand models for p, then MP :=iIMi is the least Herbrand model for P. Proof: iIMi is an Herbrand interpretation. Show, that it is a model. Each definite program has BP as model, hence I is not empty and one can show that MP is a model. Idea: MP is the „most natural“ model for P.

Emden & Kowalski Theorem: Let P be a definite program. Then MP = {ABP : A is a logical consequence of P}. Proof: A is a logical consequence of P iff P{~A} is unsatisfiable iff P{~A} has no Herbrand model iff A is true wrt all Herbrand models of P iff A  MP.

Properties of Lattices Definition Let L be a lattice and T:LL a mapping. T is called monotonic, if xy implicates, that T(x)T(y).

Properties of Lattices Definition Let L be a lattice and XL, X is called directed, if each finite sub-set of X has an upper bound in X. Definition Let L be a lattice and T:LL a mapping. T is called continuous,if for each directed subset X T(lub(X))=lub(T(X)).

Van Emden & Kowalski: The Semantics of Predicate Logic as a Programming Language, J. ACM 23, 4, 1976, pp. 733-742. Definition Let P be a definite program. The mapping TP: 2BP 2BP is defined as follows: Let I be an Herbrand interpretation. Then TP(I)={ ABP: A ← A1  … An is a ground instance of a clause in P and {A1,…,An }I }

Let P be a definite program. Practice Let P be a definite program. even(f(f(x)) ← even(x). odd(f(x) ← even(x). even(0). Let I0=. Then I1=TP(I0)=? TP(I)={ABP: A ← A1  … An is a ground instance of a clause in P and {A1,…,An }I}

TP links declarative and procedural semantics Example Let P be a definite program. even(f(f(x)) ← even(x). even(0). Let I0=. Then I1=TP(I0)={even(0)}, I2=TP(I1)={even(0), even(f(f(0))}, I3=TP(I2)={even(0), even(f(f(0)), even(f(f(f(f(0))))},… TP(I)={ABP: A ← A1  … An is a ground instance of a clause in P and {A1,…,An }I} TP is monotonic.

Let P be a definite program. Practice Let P be a definite program. plus(x,f(y),f(z)) <- plus(x,y,z) plus(f(x),y,f(z)) <- plus (x,y,z) plus(0,0,0) Let I0=. Then I1=TP(I0)=? TP(I)={ABP: A ← A1  … An is a ground instance of a clause in P and {A1,…,An }I}

Let P be a definite program. Practice Let I0=. Then I1=TP(I0)={plus(0,0,0)} I2=TP(I1)={plus(0,0,0), plus(f(0),0,f(0)), plus(0,f(0),f(0))} I3=TP(I2)={plus(0,0,0), plus(f(0),0,f(0)), plus(0,f(0),f(0)), plus(f(f(0)),0,f(f(0))), plus(0,f(f(0)),f(f(0))), plus(f(0),f(0),f(f(0)), plus(f(0),f(0),f(f(0)))}... Let P be a definite program. plus(x,f(y),f(z)) <- plus(x,y,z) plus(f(x),y,f(z)) <- plus (x,y,z) plus(0,0,0) TP(I)={ABP: A ← A1  … An is a ground instance of a clause in P and {A1,…,An }I}

Fixpoint-Model Proposition Let P be a definite program and I be an Herbrand interpretation of P. Then I is a model for P iff TP(I) I.   Let I be an Herbrand interpretation, which is not a model of P and TP(I) I. Then there exist ground instances {~A, A1,…,An}I and a clause A ← A1  … An in P. Then ATP(I) I. Refutation.

Definition Example Ordinal Powers of T let L be a complete lattice and T:L→L be monotonic. Then we define T TTT if is a successor ordinal TlubTif is a limit ordinal T↓⊤ T↓TT↓ if is a successor ordinal T↓lubT↓if is a limit ordinal Example

Fixpoint Characterisation of the Least Herbrand Model Theorem Let P be a definite program. Then MP=lfp(TP)=TP, where T=T(T(-1)), if  is a successor ordinal T=lub{T: <}, if  is a limit ordinal Proof MP=glb{I: I is an Herbrand model for P} =glb{I: TP(I) I} =lfp(TP) (not shown here) =TP.

Answer Definition Let P be a definite program and G a definite goal. An answer for P{G} is a substitution for variables of G. Definition Let P be a definite program, G a definite goal ← A1  … An and  an answer for P{G}. We say that  is a correct answer for P{G}, if ((A1  … An)) is a logical consequence of P. The answer „no“ is correct if P{G} is satisfiable. Example Check for all vs existential!

Theorem Let P be a definite program and G a definite goal ← A1  … An. Suppose  is an answer for P{G}, such that (A1  … An) is ground. Then the following are equivalent:  is correct 2. (A1  … An) is true wrt every Herbrand model of P 3. (A1  … An) is true wrt the least Herbrand model of P. Theorem 6.6

Proof it suffices to show that 3 implies 1 (A1  … An) is true wrt the least Herbrand model of P implies (A1  … An) is is true wrt all Herbrand models of P implies ~(A1  … An) is false wrt all Herbrand models of P implies P{~(A1  … An)} has no Herbrand models implies P{~(A1  … An)} has no models.