Marco Gavanelli – Università di Ferrara, Italy Marco Alberti – Universidade nova de Lisboa, Portugal Evelina Lamma – Università di Ferrara, Italy.

Slides:



Advertisements
Similar presentations
A-Priori Verification of Web Services with Abduction Marco Alberti 1 Federico Chesani 2 Marco Gavanelli 1 Evelina Lamma 1 Paola Mello 2 Marco Montali 2.
Advertisements

Flexible access control policy specification with constraint logic programming Steve Barker, Peter J. Stuckey Presenter: Vijayant Dhankhar.
CS4026 Formal Models of Computation Part II The Logic Model Lecture 1 – Programming in Logic.
Simply Logical – Chapter 2© Peter Flach, 2000 Clausal logic Propositional clausal logic Propositional clausal logic expressions that can be true or false.
Process Algebra Book: Chapter 8. The Main Issue Q: When are two models equivalent? A: When they satisfy different properties. Q: Does this mean that the.
First Order Logic Logic is a mathematical attempt to formalize the way we think. First-order predicate calculus was created in an attempt to mechanize.
The Model Evolution Calculus with Built-in Theories Peter Baumgartner MPI Informatik, Saarbrücken
1 1 Strategic Programming in Java Pierre-Etienne Moreau Antoine Reilles Stratego User Day, December, 1 st, 2006.
Prolog Nonmonotonic logic.
Inference Rules Universal Instantiation Existential Generalization
ARSPA04Sadri, Toni1 A Logic-Based Approach to Reasoning with Beliefs about Trust ARSPA 2004 Fariba Sadri 1 and Francesca Toni 1,2 1: Department of Computing,
SLD-resolution Introduction Most general unifiers SLD-resolution
Cs7120 (Prasad)L22-MetaPgm1 Meta-Programming
Chapter 11 :: Logic Languages
Logic Programming Automated Reasoning in practice.
Introduction. IC-Parc2 ECLiPSe Components Constraint Logic Programming system, consisting of  A runtime core Data-driven computation, backtracking, garbage.
Introduction to PROLOG ME 409 Lab - 1. Introduction to PROLOG.
Ontologies Reasoning Components Agents Simulations Reasoning about actions, change, events and time Jacques Robin.
Friday, April 17, PTR: A Probabilistic Transaction Logic Julian Fogel A logic for reasoning about action under uncertainty. A mathematically sound.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Towards a DecSerFlow mapping to SCIFF Federico Chesani, Paola Mello, Marco Montali, Sergio Storari.
Answer Set Programming Overview Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma de Guadalajara
Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
1 Pierangelo Dell’Acqua Dept. of Science and Technology Linköping University Constraint programming 2001 November 13th 2001
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages Chapter 3 : Describing Syntax and Semantics Axiomatic Semantics.
CHORD Semantics January, F-Atoms User Defined Constraint – A::B – A[B->C], A[B=>C] – A[B(V)->C], A[B(P:T0)=>T1] Built-in Constraint – 1 : Integer,
CPSC 322 Introduction to Artificial Intelligence September 15, 2004.
CPSC 322, Lecture 19Slide 1 Propositional Logic Intro, Syntax Computer Science cpsc322, Lecture 19 (Textbook Chpt ) February, 23, 2009.
A Probabilistic Framework for Information Integration and Retrieval on the Semantic Web by Livia Predoiu, Heiner Stuckenschmidt Institute of Computer Science,
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
CPSC 322 Introduction to Artificial Intelligence September 20, 2004.
ALMA MATER STUDIORUM UNIVERSITY OF BOLOGNA UNIVERSITY OF FERRARA Policy-based reasoning for smart web service interaction Federico Chesani, Paola Mello,
Luís Moniz Pereira CENTRIA, Departamento de Informática Universidade Nova de Lisboa Pierangelo Dell’Acqua Dept. of Science and Technology.
CHORD Semantics January, F-Atoms User Defined Constraint – A::B – A[B->C], A[B=>C] – A[B(V)->C], A[B(P:T0)=>T1] Built-in Constraint – 1 : Integer,
1 Constraint Programming Maurizio Gabbrielli Universita’ di Bologna Slides by: K. Marriott.
Orcas Constraint Handling Rules May, 2005 Jairson Vitorino and Marcos Aurélio ORCAS Orcas.
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa, Portugal Pierangelo Dell’Acqua Dept. of Science and Technology.
Integrity constraints & constraint logic programming Henning Christiansen Roskilde University, Denmark INAP’99, Invited DDLP’99 talk.
Ontologies Reasoning Components Agents Simulations Belief Update, Planning and the Fluent Calculus Jacques Robin.
Logics for Data and Knowledge Representation Propositional Logic: Reasoning Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
Propia and CHRs Transforming Constraint Specification into Constraint Behaviour.
CSE PredLogic 1 Knowledge Representation with Logic: First Order Predicate Calculus Outline –Introduction to First Order Predicate Calculus (FOPC)
Declarative vs Procedural Programming  Procedural programming requires that – the programmer tell the computer what to do. That is, how to get the output.
Logical Agents Logic Propositional Logic Summary
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
First-Order Logic Introduction Syntax and Semantics Using First-Order Logic Summary.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
CHR as grammar formalism A first report Henning Christiansen Roskilde University, D ENMARK Idea: Propagation rules of CHR:
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
Logic Programming and Prolog Goal: use formalism of first-order logic Output described by logical formula (theorem) Input described by set of formulae.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Proving Non-Termination Gupta, Henzinger, Majumdar, Rybalchenko, Ru-Gang Xu presentation by erkan.
Declarative Programming in Java using JSetL E. PanegaiG. Rossi Dipartimento di Matematica Università di Parma Roma, Giugno 2005 Convegno Italiano.
Introduction to Prolog. Outline What is Prolog? Prolog basics Prolog Demo Syntax: –Atoms and Variables –Complex Terms –Facts & Queries –Rules Examples.
NMR98 - Logic Programming1 Learning with Extended Logic Programs Evelina Lamma (1), Fabrizio Riguzzi (1), Luís Moniz Pereira (2) (1)DEIS, University of.
1 Knowledge Based Systems (CM0377) Lecture 6 (last modified 20th February 2002)
MB: 26 Feb 2001CS Lecture 11 Introduction Reading: Read Chapter 1 of Bratko Programming in Logic: Prolog.
CHR + D + A + O Operational Semantics in Fluent Calculus December, 2007.
Knowledge Based Information System
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
On Abductive Equivalence Katsumi Inoue National Institute of Informatics Chiaki Sakama Wakayama University MBR
Introduction to Logic for Artificial Intelligence Lecture 2
Chapter 7: Beyond Definite Knowledge
Probabilistic Horn abduction and Bayesian Networks
Constraint Handling Rules with Disjunction (CHRv)
Representations & Reasoning Systems (RRS) (2.2)
If there is any case in which true premises lead to a false conclusion, the argument is invalid. Therefore this argument is INVALID.
If there is any case in which true premises lead to a false conclusion, the argument is invalid. Therefore this argument is INVALID.
Presentation transcript:

Marco Gavanelli – Università di Ferrara, Italy Marco Alberti – Universidade nova de Lisboa, Portugal Evelina Lamma – Università di Ferrara, Italy

Abductive Logic Programming ALP = KB = logic program (set of clauses) A = atoms without definitions, can be assumed IC = Integrity constraints (usually, implications) KB GKB IC Reasoning from effects to causes

Diagnosis headache:- flu. headache:- period. headache:- hangover. flu, vaccine -> false. hangover -> drank. period, sex(male) -> false. ?- headache. Yes, fluMore? ; Yes, period

Event Calculus holdsat(Fluent,Time):- initially(Fluent), not(clipped(0,Fluent,Time)). holdsat(Fluent,Time):- initiates(Action,Fluent), happens(Action,T1), not(clipped(T1,Fluent,Time)). clipped(T1,Fluent,T2):- terminates(Action), happens(Action,T), T1<T<T2. initially(f1). initially(f2). happens(a,2)happens(b,4) happens(c,7)

Abductive Event Calculus holdsat(Fluent,Time):- initially(Fluent), not(clipped(0,Fluent,Time)). holdsat(Fluent,Time):- initiates(Action,Fluent), happens(Action,T1), not(clipped(T1,Fluent,Time)). clipped(T1,Fluent,T2):- terminates(Action), happens(Action,T), T1<T<T2. initially(f1). initially(f2). happens(a,2)happens(b,4) happens(c,7) ={ }

Sound negation p(1). p(f(X)):- q(X). q(2). ?- not(p(Y)). yes,Y\=1, Y\=f(2)

Abduction = constraint solving [Kowalski, Toni, Wetzel 98] headache :- flu. headache :- hangover. flu, vaccine -> false Constraint Store ?-, headache.vaccine flu Constraint Solver fail

Abduction = constraint solving [Kowalski, Toni, Wetzel 98] headache :- flu. headache :- hangover. headache :- period. flu, vaccine -> false. hangover -> drank. period, sex(male) -> false. Constraint Store ?-, headache.vaccine flu Constraint Solver fail

Constraint Handling Rules (CHR) Declarative language for defining constraint solvers Simplification rules: c1, c2,..., cn guard | body activated if some constraints in the store match with c1, c2,..., cn and guard is true removes c1, c2,..., cn from the store and executes body Propagation rules: c1, c2,..., cn ==> guard | body activated if some constraints in the store match with c1, c2,..., cn and guard is true executes body

Example: leq (less or equal) leq(X,X) true. leq(X,Y), leq(Y,X) X=Y. leq(X,Y), leq(Y,Z) ==> leq(X,Z). leq(A,B), leq(B,C), leq(C,A) leq(A,B), leq(B,C), leq(C,A), leq(A,C) leq(A,B), leq(B,A), A=C A=B, A=C

Abduction in CHR [Abdennadher, Christiansen, Dahl] Abducibles mapped to CHR constraints headache :- flu. headache :- hangover. flu, vaccine -> false

Abduction in CHR headache :- flu. headache :-... flu, vaccine ==> false Constraint Store ?-, headache.vaccine flu fail

Abduction in CHR headache :- hangover. headache :-... drank. hangover ==> drank Constraint Store ?- headache. hangover success drank

Abduction in CHR headache :- period. headache :-... sex(male). Constraint Store period, sex(male) ==> false ! CHR: invalid syntax "sex(male)" ! Undeclared constraint sex/1 in head of rule

Problem: Implementation (CHR) Syntax Declarative Semantics Operational Semantics Implementation

Operational semantics Propagation a(X)a(Y), b -> c(X=Y, b) -> c Case analysis (X=Y, b) -> cX=Y, (b -> c) \/ X\=Y Equality rewriting p(A,B,C)=p(D,E,F) A=D, B=E, C=F Unfolding p(X) -> Goalp(X):- a.p(X):-b. a -> Goal.b -> Goal... Constraint solving

Abduction in CHR (SCIFF) headache :- flu. headache :-... Constraint Store ?-, headache.vaccine flu fail ic( )vaccine, flu -> false

Abduction in CHR (SCIFF) headache :- flu. headache :-... Constraint Store ?-, headache.vaccine flu fail ic( )vaccine, flu -> false ic( flu -> false)

Transitions Propagation transition (+ case analysis): abd(X), ic([abd(Y)|Rest]-> Head) ==> copy(ic([abd(Y) |Rest ]-> Head), ic([abd(Y)|Rest]-> Head)), reif_unify(X,Y,Boolean), ( Boolean=1, ic(Rest->Head) ; Boolean=0).

Transitions Propagation transition (+ case analysis): abd(X), ic([abd(Y)|Rest]-> Head) ==> copy(ic([abd(Y) |Rest ]-> Head), ic([abd(Y)|Rest]-> Head)), reif_unify(X,Y,Boolean), ( Boolean=1, ic(Rest->Head) ; Boolean=0). ic([abd(vaccine),abd(flu)]-> false) ic([abd(period),sex(male)]-> false) ic([abd(hangover)]-> drank) abd(hangover)

No hashing Does not use CHRs hashing Solution: abducibles are represented with redundant information: abd(Functor, Arity, Atom) So to abduce atom X : abd(X):- functor(F, A, X), abd(F, A, X). E.g., if I abduce atom mother(X,john), the constraint store contains abd(mother, 2, mother(X,john))

Hashing Propagation transition (+ case analysis): abd(F,A,X), ic([abd(F,A,Y)|Rest]-> Head) ==> copy(ic([abd(Y) |Rest ]-> Head), ic([abd(Y)|Rest]-> Head)), reif_unify(X,Y,Boolean), ( Boolean=1, ic(Rest->Head) ; Boolean=0). Requires the first two arguments identical

Hashing Propagation transition (+ case analysis): abd(F,A,X), ic([abd(F,A,Y)|Rest]-> Head) ==> copy(ic([abd(Y) |Rest ]-> Head), ic([abd(Y)|Rest]-> Head)), reif_unify(X,Y,Boolean), ( Boolean=1, ic(Rest->Head) ; Boolean=0). ic([abd(vaccine,1,vaccine),abd(flu,1,flu)]-> false) ic([abd(period,1,period),sex(male)]-> false) ic([abd(hangover,1,hangover)]-> drank) abd(hangover,1,hangover)

Postpone choices new CHR constraint nondeterministic(Goal) says that Goal can open a choice point, so should be called as late as possible. Two phases, declared by a CHR constraint phase/1 : phase(deterministic) : only deterministic goals are executed phase(nondeterministic) : exactly ONE nondeterministic goal can be executed phase(nondeterministic), nondeterministic(G) call(G), phase(deterministic). phase(deterministic) phase(nondeterministic)

Postponing nondet. Propagation transition (+ case analysis): abd(F,A,X), ic([abd(F,A,Y)|Rest]-> Head) ==> copy(ic([abd(Y) |Rest ]-> Head), ic([abd(Y)|Rest]-> Head)), reif_unify(X,Y,B), ( B=1, ic(Rest->Head) ; B=0).

Postponing nondet. Propagation transition (+ case analysis): abd(F,A,X), ic([abd(F,A,Y)|Rest]-> Head) ==> copy(ic([abd(Y) |Rest ]-> Head), ic([abd(Y)|Rest]-> Head)), reif_unify(X,Y,B), (B == 1 -> ic(Rest, Head) ; B == 0 -> true ; nondeterministic((B#=1,ic(Rest,Head)) ; B#=0)) ).

Results ExperimentSCIFF 2005 SCIFF 2011 Auction protocol2.27 s0.37 s Block world45.0 s15.7 s A l LoWS Feeble Conformance 84.4 s36.8 s A l LoWS non- conformant 3.7 s3.3 s

Conclusions CHR implementation of an abductive proof-procedure Sound, complete, sound treatment of negation Well integrated with constraint solving, CLP(FD), CLP(R), universally quantified variables, quantifier restrictions, etc. Easy to extend for other features (see other talk after coffee break)

Thank you for your attention! Questions?