ASP vs. Prolog like programming ASP is adequate for: –NP-complete problems –situation where the whole program is relevant for the problem at hands èIf.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Lecture 11: Datalog Tuesday, February 6, Outline Datalog syntax Examples Semantics: –Minimal model –Least fixpoint –They are equivalent Naive evaluation.
Logic Programming Automated Reasoning in practice.
Justification-based TMSs (JTMS) JTMS utilizes 3 types of nodes, where each node is associated with an assertion: 1.Premises. Their justifications (provided.
1 Inductive Equivalence of Logic Programs Chiaki Sakama Wakayama University Katsumi Inoue National Institute of Informatics ILP
The coherence principle Generalizing WFS in the same way yields unintuitive results: pacifist(X)  not hawk(X) hawk(X)  not pacifist(X) ¬ pacifist(a)
WFSX programming Prolog programming style, but with the WFSX semantics Requires: –A new proof procedure (different from SLDNF), complying with WFS, and.
COUNTING AND PROBABILITY
Answer Set Programming Overview Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma de Guadalajara
Logic.
Auto-Epistemic Logic Proposed by Moore (1985) Contemplates reflection on self knowledge (auto-epistemic) Permits to talk not just about the external world,
A rewritting method for Well-Founded Semantics with Explicit Negation Pedro Cabalar University of Corunna, SPAIN.
Well-founded Semantics with Disjunction João Alcântara, Carlos Damásio and Luís Moniz Pereira Centro de Inteligência Artificial.
João Alcântara, Carlos Damásio and Luís Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática, Faculdade.
Cs774 (Prasad)L7Negation1 Negation by Failure
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.
The idea of completion In LP one uses “if” but mean “iff” [Clark78] This doesn’t imply that -1 is not a natural number! With this program we mean: This.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
João Alcântara, Carlos Damásio and Luís Moniz Pereira Centro de Inteligência Artificial (CENTRIA) Depto. Informática,
Default and Cooperative Reasoning in Multi-Agent Systems Chiaki Sakama Wakayama University, Japan Programming Multi-Agent Systems based on Logic Dagstuhl.
Auto-Epistemic Logic Proposed by Moore (1985) Contemplates reflection on self knowledge (auto-epistemic) Allows for representing knowledge not just about.
Extended LPs In Normal LPs all the negative information is implicit. Though that’s desired in some cases (e.g. the database with flight connections), sometimes.
Let remember from the previous lesson what is Knowledge representation
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
ASP vs. Prolog like programming ASP is adequate for: –NP-complete problems –situation where the whole program is relevant for the problem at hands èIf.
Auto-Epistemic Logic Proposed by Moore (1985) Contemplates reflection on self knowledge (auto-epistemic) Allows for representing knowledge not just about.
Belief Revision Lecture 1: AGM April 1, 2004 Gregory Wheeler
Inference is a process of building a proof of a sentence, or put it differently inference is an implementation of the entailment relation between sentences.
Learning by Answer Sets Chiaki Sakama Wakayama University, Japan Presented at AAAI Spring Symposium on Answer Set Programming, March 2001.
Understanding PML Paulo Pinheiro da Silva. PML PML is a provenance language (a language used to encode provenance knowledge) that has been proudly derived.
1 Knowledge Based Systems (CM0377) Lecture 4 (Last modified 5th February 2001)
Combining Answer Sets of Nonmonotonic Logic Programs Chiaki Sakama Wakayama University Katsumi Inoue National Institute of Informatics.
Web Science & Technologies University of Koblenz ▪ Landau, Germany Stable Models See Bry et al 2007.
LDK R Logics for Data and Knowledge Representation ClassL (part 3): Reasoning with an ABox 1.
The Bernays-Schönfinkel Fragment of First-Order Autoepistemic Logic Peter Baumgartner MPI Informatik, Saarbrücken.
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.
Pattern-directed inference systems
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
Lparse Programs Revisited: Semantics and Representation of Aggregates Guohua Liu and Jia-Huai You University of Alberta Canada.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
EVOlving L ogic P rograms J.J. Alferes, J.A. Leite, L.M. Pereira (UNL) A. Brogi (U.Pisa)
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
CS6133 Software Specification and Verification
KR A Principled Framework for Modular Web Rule Bases and its Semantics Anastasia Analyti Institute of Computer Science, FORTH-ICS, Greece Grigoris.
Solving Systems of Equations Algebraically Chapter 3.2.
NMR98 - Logic Programming1 Learning with Extended Logic Programs Evelina Lamma (1), Fabrizio Riguzzi (1), Luís Moniz Pereira (2) (1)DEIS, University of.
Inverse Entailment in Nonmonotonic Logic Programs Chiaki Sakama Wakayama University, Japan.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
1 Reasoning with Infinite stable models Piero A. Bonatti presented by Axel Polleres (IJCAI 2001,
CS104:Discrete Structures Chapter 2: Proof Techniques.
Logic Program Semantics Background Luís Moniz Pereira U.I. at Jakarta, Jan/Feb 2006 AI Centre, Universidade Nova de Lisboa.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Metalogic Soundness and Completeness. Two Notions of Logical Consequence Validity: If the premises are true, then the conclusion must be true. Provability:
Logics for Data and Knowledge Representation ClassL (part 1): syntax and semantics.
Artificial Intelligence Logical Agents Chapter 7.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
October 19th, 2007L. M. Pereira and A. M. Pinto1 Approved Models for Normal Logic Programs Luís Moniz Pereira and Alexandre Miguel Pinto Centre for Artificial.
The Propositional Calculus
Knowledge Representation
Semantics of Datalog With Negation
Logics for Data and Knowledge Representation
MA/CSSE 474 More Math Review Theory of Computation
Logics for Data and Knowledge Representation
CSNB234 ARTIFICIAL INTELLIGENCE
This Lecture Substitution model
Foundations of Discrete Mathematics
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Deniz Beser A Fundamental Tradeoff in Knowledge Representation and Reasoning Hector J. Levesque and Ronald J. Brachman.
Answer Set Programming
Presentation transcript:

ASP vs. Prolog like programming ASP is adequate for: –NP-complete problems –situation where the whole program is relevant for the problem at hands èIf the problem is polynomial, why using such a complex system? èIf only part of the program is relevant for the desired query, why computing the whole model?

ASP vs. Prolog For such problems top-down, goal-driven mechanisms seem more adequate This type of mechanisms is used by Prolog –Solutions come in variable substitutions rather than in complete models –The system is activated by queries –No global analysis is made: only the relevant part of the program is visited

Problems with Prolog Prolog declarative semantics is the completion –All the problems of completion are inherited by Prolog According to SLDNF, termination is not guaranteed, even for Datalog programs (i.e. programs with finite ground version) A proper semantics is still needed

Well Founded Semantics Defined in [GRS90], generalizes SMs to 3- valued models. Note that: –there are programs with no fixpoints of  –but all have fixpoints of  2 P = {a  not a}  ({a}) = {} and  ({}) = {a} There are no stable models But:   ({}) = {} and   ({a}) = {a}

Partial Stable Models D A 3-valued intr. (T U not F) is a PSM of P iff: T =  P 2 (T) T   (T) F = H P -  (T) The 2nd condition guarantees that no atom is both true and false: T  F = {} P = {a  not a}, has a single PSM: {} a  not bc  not a b  not ac  not c This program has 3 PSMs: {}, {a, not b} and {c, b, not a} The 3rd corresponds to the single SM

WFS definition T [WF Model] Every P has a knowledge ordering (i.e. wrt  ) least PSM, obtainable by the transfinite sequence:  T 0 = {}  T i+1 =  2 (T i )  T  = U  <  T , for limit ordinals  Let T be the least fixpoint obtained. M P = T U not (H P -  (T)) is the well founded model of P.

Well Founded Semantics Let M be the well founded model of P: –A is true in P iff A  M –A is false in P iff not A  M –Otherwise (i.e. A  M and not A  M) A is undefined in P

WFS Properties Every program is assigned a meaning Every PSM extends one SM –If WFM is total it coincides with the single SM It is sound wrt to the SMs semantics –If P has stable models and A is true (resp. false) in the WFM, it is also true (resp. false) in the intersection of SMs WFM coincides with the perfect model in locally stratified programs (and with the least model in definite programs)

More WFS Properties The WFM is supported WFS is cumulative and relevant Its computation is polynomial (on the number of instantiated rule of P) There are top-down proof-procedures, and sound implementations –these are mentioned in the sequel

LP and Default Theories D Let  P be the default theory obtained by transforming: H  B 1,…,B n, not C 1,…, not C m into: B 1,…,B n : ¬C 1,…, ¬C m H T There is a one-to-one correspondence between the SMs of P and the default extensions of  P T If L  WFM(P) then L belongs to every extension of  P

LPs as defaults LPs can be viewed as sets of default rules Default literals are the justification: –can be assumed if it is consistent to do so –are withdrawn if inconsistent In this reading of LPs,  is not viewed as implication. Instead, LP rules are viewed as inference rules.

LP and Auto-Epistemic Logic D Let  P be the AEL theory obtained by transforming: H  B 1,…,B n, not C 1,…, not C m into: B 1  …  B n  ¬ L C 1  …  ¬ L C m  H T There is a one-to-one correspondence between the SMs of P and the (Moore) expansions of  P T If L  WFM(P) then L belongs to every expansion of  P

LPs as AEL theories LPs can be viewed as theories that refer to their own knowledge Default negation not A is interpreted as “A is not known” The LP rule symbol is here viewed as material implication

LP and AEB D Let  P be the AEB theory obtained by transforming: H  B 1,…,B n, not C 1,…, not C m into: B 1  …  B n  B ¬C 1  …  B ¬C m  H T There is a one-to-one correspondence between the PSMs of P and the AEB expansions of  P T A  WFM(P) iff A is in every expansion of  P not A  WFM(P) iff B ¬A is in all expansions of  P

LPs as AEB theories LPs can be viewed as theories that refer to their own beliefs Default negation not A is interpreted as “It is believed that A is false” The LP rule symbol is also viewed as material implication

SM problems revisited The mentioned problems of SM are not necessarily problems: –Relevance is not desired when analyzing global problems –If the SMs are equated with the solutions of a problem, then some problems simple have no solution –Some problems are NP. So using an NP language is not a problem. –In case of NP problems, the efficient gains from cumulativity are not really an issue.

SM versus WFM Yield different forms of programming and of representing knowledge, for usage with different purposes Usage of WFM: –Closer to that of Prolog –Local reasoning (and relevance) are important –When efficiency is an issue even at the cost of expressivity Usage of SMs –For representing NP-complete problems –Global reasoning –Different form of programming, not close to that of Prolog Solutions are models, rather than answer/substitutions

Extended LPs In Normal LPs all the negative information is implicit. Though that’s desired in some cases (e.g. the database with flight connections), sometimes an explicit form of negation is needed for Knowledge Representation “Penguins don’t fly” could be: noFly(X)  penguin(X) This does not relate fly(X) and noFly(X) in: fly(X)  bird(X) noFly(X)  penguin(X) For establishing such relations, and representing negative information a new form of negation is needed in LP: Explicit negation - ¬

Extended LP: motivation ¬ is also needed in bodies: “Someone is guilty if is not innocent” –cannot be represented by: guilty(X)  not innocent(X) –This would imply guilty in the absence of information about innocent –Instead, guilty(X)  ¬innocent(X) only implies guilty(X) if X is proven not to be innocent The difference between not p and ¬p is essential whenever the information about p cannot be assumed to be complete

ELP motivation (cont) ¬ allows for greater expressivity: “If you’re not sure that someone is not innocent, then further investigation is needed” –Can be represented by: investigate(X)  not ¬innocent(X) ¬ extends the relation of LP to other NMR formalisms. E.g –it can represent default rules with negative conclusions and pre-requisites, and positive justifications –it can represent normal default rules

Explicit versus Classical ¬ Classical ¬ complies with the “excluded middle” principle (i.e. F v ¬F is tautological) –This makes sense in mathematics –What about in common sense knowledge? ¬A is the the opposite of A. The “excluded middle” leaves no room for undefinedness hire(X)  qualified(X) reject(X)  ¬ qualified(X) The “excluded middle” implies that every X is either hired or rejected It leaves no room for those about whom further information is need to determine if they are qualified

ELP Language An Extended Logic Program P is a set of rules: L 0   L 1, …, L m, not L m+1, … not L n (n,m  0) where the L i are objective literals An objective literal is an atoms A or its explicit negation ¬A Literals not L j are called default literals The Extended Herbrand base H P is the set of all instantiated objective literals from program P We will consider programs as possibly infinite sets of instantiated rules.

ELP Interpretations An interpretation I of P is a set I = T U not F where T and F are disjoint subsets of H P and ¬L  T  L  F (Coherence Principle) i.e. if L is explicitly false, it must be assumed false by default I is total iff H P = T U F I is consistent iff ¬  L: {L, ¬L}  T –In total consistent interpretations the Coherence Principle is trivially satisfied

Answer sets It was the 1st semantics for ELPs [Gelfond&Lifschitz90] Generalizes stable models to ELPs D Let M - be a stable models of the normal P - obtained by replacing in the ELP P every ¬ A by a new atom A -. An answer-set M of P is obtained by replacing A - by ¬ A in M - A is true in an answer set M iff A  S A is false iff ¬A  S Otherwise, A is unknown Some programs have no consistent answer sets: –e.g. P = {a  ¬ a  }

Answer sets and Defaults D Let  P be the default theory obtained by transforming: L 0  L 1,…,L m, not L m+1,…, not L n into: L 1,…,L m : ¬L m+1,…, ¬L n L 0 where ¬¬A is (always) replaced by A T There is a one-to-one correspondence between the answer-sets of P and the default extensions of  P

Answer-sets and AEL D Let  P be the AEL theory obtained by transforming: L 0  L 1,…,L m, not L m+1,…, not L n into: L 1  L L 1  …  L m  L L m   ¬ L L m+1  …  ¬ L L m  L 0  L L 0  T There is a one-to-one correspondence between the answer-sets of P and the expansions of  P

The coherence principle Generalizing WFS in the same way yields unintuitive results: pacifist(X)  not hawk(X) hawk(X)  not pacifist(X) ¬ pacifist(a) –Using the same method the WFS is: {¬pacifist(a)} –Though it is explicitly stated that a is non-pacifist, not pacifist(a) is not assumed, and so hawk(a) cannot be concluded. Coherence is not satisfied... Ü Coherence must be imposed