Web Science & Technologies University of Koblenz ▪ Landau, Germany Models of Definite Programs.

Slides:



Advertisements
Similar presentations
Completeness and Expressiveness
Advertisements

Biointelligence Lab School of Computer Sci. & Eng.
CSCI 115 Chapter 6 Order Relations and Structures.
Web Science & Technologies University of Koblenz ▪ Landau, Germany Advanced Data Modeling Minimal Models Steffen Staab TexPoint fonts used in EMF. Read.
(CSC 102) Discrete Structures Lecture 14.
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 2. Constraint Databases Next level of data abstraction: Constraint level – finitely represents by constraints the logical level.
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.
1 Set Theory. Notation S={a, b, c} refers to the set whose elements are a, b and c. a  S means “a is an element of set S”. d  S means “d is not an element.
1 Set Theory. Notation S={a, b, c} refers to the set whose elements are a, b and c. a  S means “a is an element of set S”. d  S means “d is not an element.
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.
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.
Math 3121 Abstract Algebra I Section 0: Sets. The axiomatic approach to Mathematics The notion of definition - from the text: "It is impossible to define.
Web Science & Technologies University of Koblenz ▪ Landau, Germany Stable Models See Bry et al 2007.
Steffen Staab Advanced Data Modeling 1 of 32 WeST Häufungspunkte Bifurkation: x n+1 = r x n (1-x n ) Startwert x 0 = 0,25.
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
Introduction to Real Analysis Dr. Weihu Hong Clayton State University 8/21/2008.
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.
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.
A Logic of Partially Satisfied Constraints Nic Wilson Cork Constraint Computation Centre Computer Science, UCC.
Web Science & Technologies University of Koblenz ▪ Landau, Germany Procedural Semantics Soundness of SLD-Resolution.
Naïve Set Theory. Basic Definitions Naïve set theory is the non-axiomatic treatment of set theory. In the axiomatic treatment, which we will only allude.
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.
LDK R Logics for Data and Knowledge Representation ClassL (Propositional Description Logic with Individuals) 1.
Web Science & Technologies University of Koblenz ▪ Landau, Germany Relational Data Model.
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.
Web Science & Technologies University of Koblenz ▪ Landau, Germany Models in First Order Logics.
LDK R Logics for Data and Knowledge Representation Propositional Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
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.
Web Science & Technologies University of Koblenz ▪ Landau, Germany Models in First Order Logics.
Formal Semantics Purpose: formalize correct reasoning.
Data Flow Analysis II AModel Checking and Abstract Interpretation Feb. 2, 2011.
Web Science & Technologies University of Koblenz ▪ Landau, Germany Many valued logics and fixpoint semantics See Melvin Fitting 2002.
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.
Information Systems & Semantic Web University of Koblenz ▪ Landau, Germany Advanced Data Modeling Steffen Staab with Simon Schenk TexPoint fonts used in.
The Relation Induced by a Partition
Chapter 6 Order Relations and Structures
Chapter 3 The Real Numbers.
Fixpoints and Reachability
Models of Definite Programs
3. The Logic of Quantified Statements Summary
Unit-III Algebraic Structures
Formal Modeling Concepts
Completeness of the SLD-Resolution
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
Concurrent Models of Computation
Soundness of SLD-Resolution
Models of Definite Programs
Logics for Data and Knowledge Representation
Models of Definite Programs
Herbrand Semantics Computational Logic Lecture 15
Advanced Data Modeling Minimal Models
Logics for Data and Knowledge Representation
Presentation transcript:

Web Science & Technologies University of Koblenz ▪ Landau, Germany Models of Definite Programs

Steffen Staab Advanced Data Modeling 2 of 19 WeST Herbrand-Interpretations I1I1 Herbrand-Base I2I2 I3I3 P(f(b)) ~Q(a) ~P(f(b))… Q(a) ~P(f(b))~Q(a) The true atoms of the Herbrand base correlate with the corresponding interpretation. Q(a) P(f(b))…

Steffen Staab Advanced Data Modeling 3 of 19 WeST Model Intersection Property Proposition: Let P be a definite program and {M i } i  I a non-empty set of Herbrand models for P. Then  i  I M i is an Herbrand model for P. If {M i } i  I contains all Herbrand models for p, then M P :=  i  I M i is the least Herbrand model for P.

Steffen Staab Advanced Data Modeling 4 of 19 WeST Idea  (2 B P,  ) is a lattice of all Herbrand interpretations of P with the bottom element  and the top element B P The least upper bound (lub) of a set of interpretations is the union, the greatest lower bound is the intersection. BPBP MPMP

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

Steffen Staab Advanced Data Modeling 6 of 19 WeST Emden & Kowalski Theorem: Let P be a definite program. Then M P = {A  B P : 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  M P.

Steffen Staab Advanced Data Modeling 7 of 19 WeST 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).

Steffen Staab Advanced Data Modeling 8 of 19 WeST 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)).

Steffen Staab Advanced Data Modeling 9 of 19 WeST Van Emden & Kowalski: The Semantics of Predicate Logic as a Programming Language, J. ACM 23, 4, 1976, pp Definition Let P be a definite program. The mapping T P : 2 B P  2 B P is defined as follows: Let I be an Herbrand interpretation. Then T P (I)={ A  B P : A ← A 1  …  A n is a ground instance of a clause in P and {A 1,…,A n }  I }

Steffen Staab Advanced Data Modeling 10 of 19 WeST Practice Let P be a definite program. even(f(f(x)) ← even(x). odd(f(x) ← even(x). even(0). Let I 0 = . Then I 1 =T P (I 0 )=? T P (I)={A  B P : A ← A 1  …  A n is a ground instance of a clause in P and {A 1,…,A n }  I}

Steffen Staab Advanced Data Modeling 11 of 19 WeST T P links declarative and procedural semantics Example Let P be a definite program. even(f(f(x)) ← even(x). even(0). Let I 0 = . Then I 1 =T P (I 0 )={even(0)}, I 2 =T P (I 1 )={even(0), even(f(f(0))}, I 3 =T P (I 2 )={even(0), even(f(f(0)), even(f(f(f(f(0))))},… T P is monotonic. T P (I)={A  B P : A ← A 1  …  A n is a ground instance of a clause in P and {A 1,…,A n }  I}

Steffen Staab Advanced Data Modeling 12 of 19 WeST 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 I 0 = . Then I 1 =T P (I 0 )=? T P (I)={A  B P : A ← A 1  …  A n is a ground instance of a clause in P and {A 1,…,A n }  I}

Steffen Staab Advanced Data Modeling 13 of 19 WeST Practice T P (I)={A  B P : A ← A 1  …  A n is a ground instance of a clause in P and {A 1,…,A n }  I} 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 I 0 = . Then I 1 =T P (I 0 )={plus(0,0,0)} I 2 =T P (I 1 )={plus(0,0,0), plus(f(0),0,f(0)), plus(0,f(0),f(0))} I 3 =T P (I 2 )={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)))}...

Steffen Staab Advanced Data Modeling 14 of 19 WeST 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 T P (I)  I.  Let I be an Herbrand interpretation, which is not a model of P and T P (I)  I. Then there exist ground instances {~A, A 1,…,A n }  I and a clause A ← A 1  …  A n in P. Then A  T P (I)  I. Refutation. 

Steffen Staab Advanced Data Modeling 15 of 19 WeST Ordinal Powers of T Definition 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

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

Steffen Staab Advanced Data Modeling 17 of 19 WeST Greatest Fixpoint Greatest Fixpoint not as easy to have:  Example program  p(f(x)) ← p(x)  q(a) ← p(x)  T P ↓  {q(a)}  T P ↓(  {}=gfp(T P )

Steffen Staab Advanced Data Modeling 18 of 19 WeST 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 ← A 1  …  A n and  an answer for P  {G}. We say that  is a correct answer for P  {G}, if  ((A 1  …  A n )  ) is a logical consequence of P. The answer „no“ is correct if P  {G} is satisfiable. Example

Steffen Staab Advanced Data Modeling 19 of 19 WeST Theorem Let P be a definite program and G a definite goal ← A 1  …  A n. Suppose  is an answer for P  {G}, such that (A 1  …  A n )  is ground. Then the following are equivalent:  is correct 2. (A 1  …  A n )  is true wrt every Herbrand model of P 3. (A 1  …  A n )  is true wrt the least Herbrand model of P.

Steffen Staab Advanced Data Modeling 20 of 19 WeST Proof it suffices to show that 3 implies 1 (A 1  …  A n )  is true wrt the least Herbrand model of P implies (A 1  …  A n )  is is true wrt all Herbrand models of P implies ~(A 1  …  A n )  is false wrt all Herbrand models of P implies P  {~(A 1  …  A n )  } has no Herbrand models implies P  {~(A 1  …  A n )  } has no models.