Models of Definite Programs

Slides:



Advertisements
Similar presentations
Completeness and Expressiveness
Advertisements

Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)
CSCI 115 Chapter 6 Order Relations and Structures.
Lecture 11: Datalog Tuesday, February 6, Outline Datalog syntax Examples Semantics: –Minimal model –Least fixpoint –They are equivalent Naive evaluation.
Inductive Logic Programming: The Problem Specification Given: –Examples: first-order atoms or definite clauses, each labeled positive or negative. –Background.
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.
1 Applied Computer Science II Resolution in FOL Luc De Raedt.
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 Indirect Argument: Contradiction and Contraposition.
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.
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.
Solving fixpoint equations
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.
CSE 311 Foundations of Computing I Lecture 8 Proofs and Set Theory Spring
2.3Logical Implication: Rules of Inference From the notion of a valid argument, we begin a formal study of what we shall mean by an argument and when such.
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.
Universidad Nacional de ColombiaUniversidad Nacional de Colombia Facultad de IngenieríaFacultad de Ingeniería Departamento de Sistemas- 2002Departamento.
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.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
Web Science & Technologies University of Koblenz ▪ Landau, Germany Procedural Semantics Soundness of SLD-Resolution.
1 Introduction to Abstract Mathematics Sets Section 2.1 Basic Notions of Sets Section 2.2 Operations with sets Section 2.3 Indexed Sets Instructor: Hayk.
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.
1 Knowledge Based Systems (CM0377) Lecture 6 (last modified 20th February 2002)
Basic Definitions of Set Theory Lecture 24 Section 5.1 Fri, Mar 2, 2007.
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.
Syntax of First-Order Predicate Calculus (FOPC): 1. Alphabet Countable set of predicate symbols, each with specified arity  0. Countable set of function.
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.
Chapter 6 Order Relations and Structures
Logics for Data and Knowledge Representation
Chapter 3 The Real Numbers.
Fixpoints and Reachability
Models of Definite Programs
3. The Logic of Quantified Statements Summary
Completeness of the SLD-Resolution
The Propositional Calculus
CHARACTERIZATIONS OF INVERTIBLE MATRICES
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
Alternating tree Automata and Parity games
Logics for Data and Knowledge Representation
Concurrent Models of Computation
Soundness of SLD-Resolution
1st-order Predicate Logic (FOL)
Logics for Data and Knowledge Representation
Search techniques.
This Lecture Substitution model
Models of Definite Programs
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
CHARACTERIZATIONS OF INVERTIBLE MATRICES
1st-order Predicate Logic (FOL)
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).

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↓glb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.

Greatest Fixpoint not as easy to have: Example program p(f(x)) ← p(x) q(a) ← p(x) TP↓w= {q(a)} TP↓(w+1)= {}=gfp(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

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.