The Model Evolution Calculus with Built-in Theories Peter Baumgartner MPI Informatik, Saarbrücken www.mpi-sb.mpg.de/~baumgart/

Slides:



Advertisements
Similar presentations
SMELS: Sat Modulo Equality with Lazy Superposition Christopher Lynch – Clarkson Duc-Khanh Tran - MPI.
Advertisements

Exploiting SAT solvers in unbounded model checking
Automated Theorem Proving
CS4026 Formal Models of Computation Part II The Logic Model Lecture 1 – Programming in Logic.
Resolution Proof System for First Order Logic
Biointelligence Lab School of Computer Sci. & Eng.
Inference Rules Universal Instantiation Existential Generalization
SLD-resolution Introduction Most general unifiers SLD-resolution
10 October 2006 Foundations of Logic and Constraint Programming 1 Unification ­An overview Need for Unification Ranked alfabeths and terms. Substitutions.
1 A formula in predicate logic An atom is a formula. If F is a formula then (~F) is a formula. If F and G are Formulae then (F /\ G), (F \/ G), (F → G),
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Propositional and First Order Reasoning. Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p 
Automated Reasoning Systems For first order Predicate Logic.
Knowledge Representation and Reasoning University "Politehnica" of Bucharest Department of Computer Science Fall 2010 Adina Magda Florea
First Order Logic Resolution
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 20
For Friday No reading Homework: –Chapter 9, exercise 4 (This is VERY short – do it while you’re running your tests) Make sure you keep variables and constants.
Logic Concepts Lecture Module 11.
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
1 Applied Computer Science II Resolution in FOL Luc De Raedt.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Formal Logic Proof Methods Direct Proof / Natural Deduction Conditional Proof (Implication Introduction) Reductio ad Absurdum Resolution Refutation.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
The Model Evolution Calculus Peter Baumgartner, MPI Saarbruecken and U Koblenz Cesare Tinelli, U Iowa.
Inference and Resolution for Problem Solving
Catriel Beeri Pls/Winter 2004/5 type reconstruction 1 Type Reconstruction & Parametric Polymorphism  Introduction  Unification and type reconstruction.
Existential Graphs and Davis-Putnam April 3, 2002 Bram van Heuveln Department of Cognitive Science.
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Knoweldge Representation & Reasoning
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
Chapter 3 Propositional Logic
Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus.
Deciding a Combination of Theories - Decision Procedure - Changki pswlab Combination of Theories Daniel Kroening, Ofer Strichman Presented by Changki.
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.
Logics for Data and Knowledge Representation Propositional Logic: Reasoning Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto.
CMU, Oct 4 DPLL-based Checkers for Satisfiability Modulo Theories Cesare Tinelli Department of Computer Science The University of Iowa Joint work with.
SAT and SMT solvers Ayrat Khalimov (based on Georg Hofferek‘s slides) AKDV 2014.
The Bernays-Schönfinkel Fragment of First-Order Autoepistemic Logic Peter Baumgartner MPI Informatik, Saarbrücken.
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
First Order Predicate Logic
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
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,
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
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.
Automated Reasoning Systems For first order Predicate Logic.
Automated reasoning with propositional and predicate logics Spring 2007, Juris Vīksna.
第 1 6 章 谓词演算中的归结. 2 Outline Unification Predicate-Calculus Resolution Completeness and Soundness Converting Arbitrary wffs to Clause Form Using Resolution.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
1 Knowledge Based Systems (CM0377) Lecture 6 (last modified 20th February 2002)
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding Combined Theories.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Inference in Propositional Logic (and Intro to SAT) CSE 473.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
Introduction to Logic for Artificial Intelligence Lecture 2
Knowledge Representation and Reasoning
EA C461 – Artificial Intelligence Logical Agent
Resolution in the Propositional Calculus
Lecture 2 Propositional Logic
Propositional Resolution
Artificial Intelligence: Agents and Propositional Logic.
The Relative Power of Semantics and Unification
Biointelligence Lab School of Computer Sci. & Eng.
Presentation transcript:

The Model Evolution Calculus with Built-in Theories Peter Baumgartner MPI Informatik, Saarbrücken

The Model Evolution Calculus with Built-in Theories2 Problem The Model Evolution Calculus is a sound and refutationally complete calculus for first-order clause logic Can we extend it with built-in theory handling? That is, „plug in“ an (efficient) reasoner for a special domain Examples for interesting theories –Equality –Real arithmetic –Theories axiomatized by logic programs Can existing theory reasoners be plugged in (to Darwin)? –Equality: Waldmeister –Real arithmetic: quantifier elimination –Logic programs: logic program interpreter

The Model Evolution Calculus with Built-in Theories3 Model Evolution – Idea (1) A:A:A B:B:B C :C:C DPLL: Davis-Putnam-Logemann-Loveland Procedure ( ) Basis of some of the SAT solvers (Chaff, …) Input: Propositional clause set Output: Model or „unsatisfiable” No, split on C Algorithm components: - Simplification - Split - Backtracking

The Model Evolution Calculus with Built-in Theories4 Model Evolution – Idea (2) flight(sb,y ) :flight(sb,y ) train(sb,d):train(sb,d) ¼ First Order DPLL [Joint Work with Cesare Tinelli] No, split on train(sb,d) :flight(sb,d)flight(sb,d) Procedure components: - Simplification - Split - Backtracking Input: First-order clause set Output: Model or „unsatisfiable” if termination

The Model Evolution Calculus with Built-in Theories5 Sequent Style Calculus Simplified Calculus (for the purpose of talk) –No simplification inference rules to modify  –No simplification inference rules to modify  –No „universal“ variables, only „parametric“ ones Calculus Context: A set of literals (same as branch on previous slide) Initially: { :v } Current Clause Set: Initally: input clauses

The Model Evolution Calculus with Built-in Theories6 Derivation Rules (1) Split if (1)  is a context unifier of C Ç L against  (2) neither L  nor : L  is contraditory with  -  is a context unifier:  is a most general simultaneous unifier of the clause literals and context literals with opposite sign (pairwise) - L  is contradictory with  :  contains a variant of :L  Clause: :P(x,y) Ç :Q(a,z) Context: P(u,u) Q(v,b) Clause  : :P(x,x) Ç :Q(a,b)  = { x!u, y!u, v!a, z!b } contradictorynot contradictory :Q(a,b) is admissible for Split

The Model Evolution Calculus with Built-in Theories7 Derivation Rules (2) Close if (1)   ; or C  ? (2) there is a context unifier  of C against  such that each literal of C  is contraditory with  Clause: :P(x,y) Ç :Q(a,z) Context: P(u,u) Q(a,b) Clause  : :P(x,x) Ç :Q(a,b)  = { x!u, y!u, z!b } contradictory Close is applicable -  is a context unifier:  is a most general simultaneous unifier of the clause literals and context literals with opposite sign (pairwise) - L  is contradictory with  :  contains a variant of :L 

The Model Evolution Calculus with Built-in Theories8 Model Evolution – Further Ingredients Derivation –Start with sequent :v ` „Input Clause Set“ –Apply Split and Close derivation rules (gives tree over sequents) Refutation: Every branch ends in sequent of the form  ` ? Fairness –Consider a derivation with limit context  1 =  i>0  i –Close is not applicable to any  i –Roughly: if some ground instance C  of an input clause is falsified by  i then there is a j>i such that  j satisfies C  (this can always be achieved by applying the split rule) Completeness –Assume a fair derivation with limit context –Show that  1 constitutes a model for the input clause set

The Model Evolution Calculus with Built-in Theories9 Theories – Basic Definitions A Theory T is a consistent set of sentences Consider here universal theories (no existential quantifier in prenex normal form) Def: Clause set  is T-unsatisfiable iff  [ T is unsatisfiable Def: Let K be a set of literals and L be a literal K ² T L iff K [ T ² L iff for every structure A and every valuation v: A,v ² K [ T implies A,v ² L Examples { P(u,a), u=f(u), a=f(a) } ² E P(f(u),f(a)) holds { P(u,a), u=f(u), v=f(v) } ² E P(f(u),f(a)) does not hold

The Model Evolution Calculus with Built-in Theories10 ME(T) – Derivation Rules (1) T -Split if (1)  is a T -context unifier of C Ç L against  with key set K [ { L } (2) K 2 :K (3) neither K  nor :K  is T -contraditory with   is a T -context unifier of clause L  Ç … Ç L iff there are sets K 1,…,K n of variants of literals from  s.th. K i  ² T :L i  Each set K i [ { L i } is called a key set Clause: :P(f(a),f(x)) Context: P(a,b) u=f(u)  = { u!a, v!b, x!b } Key set: { P(a,b), u=f(u), v=f(v), :P(f(a),f(x)) } T -Split on :(a=f(a))

The Model Evolution Calculus with Built-in Theories11 ME(T) – Derivation Rules (1) T -Split if (1)  is a T -context unifier of C Ç L against  with key set K [ { L } (2) K 2 :K (3) neither K  nor :K  is T -contraditory with  K  is T –contradictory with  iff there is a set K of variants of literals from  s.th. K ² T :K i  K  : :P(f(u),f (v)) Context: P(u,v) u=f(u) K = { P(u,v), u=f(u), v=f(v) } Example for T –contradictory:

The Model Evolution Calculus with Built-in Theories12 ME(T) – Derivation Rules (2) T -Repair if (1)  is a T -context unifier of C Ç L against  with key set K [ { L } (2) K 2 :K (3) K  is not T –contradictory with , but :K  is T -contraditory with  (4)  does not contain a variant of K  Clause: :P(f(a)) Context: :(f(a)=b) a=b P(a) f(u)=u T -Repair with :(a=f(a)) - T –Repair is the one-armed, disjoint variant of T –Split - T –Repair is not applicable if T is the „empty“ theory

The Model Evolution Calculus with Built-in Theories13 ME(T) – Derivation Rules (3) T -Close if (1)   ; or C  ? (2) there is a T -context unifier  of C against  such that each literal of C  is T -contraditory with  Note: Condition (2) must be decidable!

The Model Evolution Calculus with Built-in Theories14 Interpretation Associated to a Context Crucial to understand the working of the calculus Basis of the completeness proof Basis of feasible instantiation with theory reasoners E.g. Waldmeister for the theory of equality

The Model Evolution Calculus with Built-in Theories15 Interpretation Associated to a Context Literal set K T –produces a literal L in  Literal set K: { K 1 … K n } No literals L i 2  such that K i ¶ :L i & K i  Theory Reasoning: { K 1  … K n  } ² T L Interpretation Associated to  A ground atom A is assigned true in  via K iff some set K of variants of literals from  T –produces A Instances: { K 1  … K n  } „K i produces K i  in  “

The Model Evolution Calculus with Built-in Theories16 Interpretation Associated to a Context Context  T –produces a literal L Literal set K (as above): K 1 … K n Instances: K 1  … K n  No literals L i 2  such that K i ¶ :L i & K i  Theory Reasoning: K 1  … K n  ² T L Examples { P(a), f(x)=x, :(f(a)=a) } does not E- produce P(f(a)) => P(f(a)) is assigned false in associated E-interpretation { P(a), f(x)=x, :P(f(a)) } E-produces P(f(a)) and :P(f(a)) => P(f(a)) is assigned true in associated E-interpretation

The Model Evolution Calculus with Built-in Theories17 ME(T) Calculus – Theory Reasoner R T A lifting lemma cannot be proven „once and for all“, replace it by admissibility condition of theory reasoner R T Theory reasoner R T –Input: a context  and a clause C = L 1 Ç … Ç L n –Output: a n+1 -tuple (K 1,…,K n,  ) or undefined where K i is a set of variants of literals from  and  is a substitution R T is sound iff K i  ² T :L i  (i.e.  is a T –context unifier) R T is complete iff the following holds: For every ground instance C  and all sets K 1,...,K n (as above): If C  is assigned false in  via K 1,...,K n then R T ( ,C) = (K 1,…,K n,  ) for some substitution  &  R T is admissible iff it is sound and complete

The Model Evolution Calculus with Built-in Theories18 Consequences and Properties Associated interpretation should be total: easy, context contains :v Associated interpretation should be a T –interpretation Need further restrictions on allowed theories to guarantee this: –Non-negative theories: ² T 9 (A 1 Æ … Æ A n ) T = { :A } is not allowed –Theory must be ground convex: ² T B ! A 1 Ç … Ç A n implies ² T B ! A i for some i (B conjunction of ground atoms, A ground atom) T = { A Ç B } is not allowed Property If limit context  1 assigns false to a (ground) clause C  via K 1,…,K n then there is an i such that for all j > i  j assigns false to C  via K 1,…,K n Completeness Fairness + admissible theory reasoner will detect this situation eventually and invalidate it

The Model Evolution Calculus with Built-in Theories19 Equality and Waldmeister Problem Waldmeister is a theorem prover for unit clauses { s 1 =t 1,...,s n =t n, :(s=t) } How to match it to contexts and arbitrary clauses? :(s 1 =t 1 ) Ç … Ç :(s m =t m ) Ç s m+1 =t m+1 Ç … Ç s n =t n Context Problem  = { a=f(a), P(u), :P(a), :P(f(a)), :P(f(f(a))) } Clause :P(a) Waldmeister has to discover instances P(f(f(f(a)))),... Solution (?) Convert context to equivalent set of atoms E.g. for signature {a/0, b/0, f/1} obtain  = { a=f(a), P(b), P(f(b)), P(f(f(b))), P(f(f(f(x)))) } Resulting set can be infinite in case of non-linear literals!

The Model Evolution Calculus with Built-in Theories20 Equality and Waldmeister Problem Waldmeister is a theorem prover for unit clauses { s 1 =t 1,...,s n =t n, :(s=t) } How to match it to contexts and arbitrary clauses :(s 1 =t 1 ) Ç … Ç :(s m =t m ) Ç s m+1 =t m+1 Ç … Ç s n =t n Arbitrary Clauses Problem From definition of associated interpretation it follows: Context  falsifies a positive literal A iff some negative literal :B 2  produces :A in  Consequently: Can resolve away positive clause literals against context literals Leaves only rest clause (:(s 1 =t 1 ) Ç … Ç :(s m =t m )) 

The Model Evolution Calculus with Built-in Theories21 Equality and Waldmeister Problem Waldmeister is a theorem prover for unit clauses { s 1 =t 1,...,s n =t n, :(s=t) } How to match it to contexts and arbitrary clauses :(s 1 =t 1 ) Ç … Ç :(s m =t m ) Ç s m+1 =t m+1 Ç … Ç s n =t n Arbitrary Clauses Problem How to treat rest clause (:(s 1 =t 1 ) Ç … Ç :(s m =t m ))  ? Solution Code it as a negative unit clause (due to Thomas Hillenbrand): :(clause(s 1,t 1,...,s m,t m ) = true) clause(x 1,x 1,...,x m,x m ) = true Can easily query Waldmeister with many clauses simultaneously Thus have transformation for Waldmeister now But Waldmeister still has to be modifed to compute „all“ solutions!

The Model Evolution Calculus with Built-in Theories22 Conclusion Presented simplified calculus, without universal variables e.g. \forall x P(x,u) –Universal variables crucial for performance calculus instantiates to postive hyper-resolution for Horn case One call to Waldmeister for unit theories –Should work out without greater difficulties Is this all feasible? Difference to Ganzinger/Korovin Calculus wrt.\ theory reasoning –Works for arbitrary universal non-negative convex theories –Does not need a term ordering But using term orderings might be advantageous…