Vampire: A Theorem Prover for First- Order Classical Logic Jason Gruber COSC 481-1 Tuesday May 3, 2005.

Slides:



Advertisements
Similar presentations
Resolution Proof System for First Order Logic
Advertisements

Moving on to First-Order Logic Language, Meaning, Logic USEM 40a James Pustejovsky.
First-Order Logic.
Inference Rules Universal Instantiation Existential Generalization
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
Standard Logical Equivalences
First-Order Logic (FOL) aka. predicate calculus. First-Order Logic (FOL) Syntax User defines these primitives: – Constant symbols (i.e., the "individuals"
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.
We have seen that we can use Generalized Modus Ponens (GMP) combined with search to see if a fact is entailed from a Knowledge Base. Unfortunately, there.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
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 Use mathematical deduction to derive new knowledge.
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
F22H1 Logic and Proof Week 7 Clausal Form and Resolution.
First-Order Logic Chapter 8.
SE Last time: Logic and Reasoning Knowledge Base (KB): contains a set of sentences expressed using a knowledge representation language TELL: operator.
First-Order Logic (FOL) aka. predicate calculus. First-Order Logic (FOL) Syntax User defines these primitives: –Constant symbols (i.e., the "individuals"
Basic Knowledge Representation in First Order Logic Some material adopted from notes by Tim Finin And Andreas Geyer-Schulz.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2004.
CS 561, Session Last time: Logic and Reasoning Knowledge Base (KB): contains a set of sentences expressed using a knowledge representation language.
Inference and Resolution for Problem Solving
Methods of Proof Chapter 7, second half.
Knoweldge Representation & Reasoning
Propositional Calculus Math Foundations of Computer Science.
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
Conjunctive normal form: any formula of the predicate calculus can be transformed into a conjunctive normal form. Def. A formula is said to be in conjunctive.
Declarative vs Procedural Programming  Procedural programming requires that – the programmer tell the computer what to do. That is, how to get the output.
Pattern-directed inference systems
Logical Agents Logic Propositional Logic Summary
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 17 Wednesday, 01 October.
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.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 12 Friday, 17 September.
Computing & Information Sciences Kansas State University Lecture 14 of 42 CIS 530 / 730 Artificial Intelligence Lecture 14 of 42 William H. Hsu Department.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 18 of 41 Friday, 01 October.
Artificial Intelligence 7. Making Deductive Inferences Course V231 Department of Computing Imperial College, London Jeremy Gow.
C. Varela1 Logic Programming (PLP 11) Predicate Calculus, Horn Clauses, Clocksin-Mellish Procedure Carlos Varela Rennselaer Polytechnic Institute November.
CS-554 Part-3: First-Order Logic
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 11 Jim Martin.
Knowledge Repn. & Reasoning Lec. #5: First-Order Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2004.
Computing & Information Sciences Kansas State University Lecture 12 of 42 CIS 530 / 730 Artificial Intelligence Lecture 12 of 42 William H. Hsu Department.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
Basic Knowledge Representation in First Order Logic Chapter 7 Some material adopted from notes by Tim Finin And Andreas Geyer-Schulz.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
CENG 424-Logic for CS Introduction Based on the Lecture Notes of Konstantin Korovin, Valentin Goranko, Russel and Norvig, and Michael Genesereth.
Introduction to Logic for Artificial Intelligence Lecture 2
Knowledge Representation and Reasoning
Logical Inference: Through Proof to Truth
Logic Use mathematical deduction to derive new knowledge.
Carlos Varela Rensselaer Polytechnic Institute November 10, 2017
Methods of Proof Chapter 7, second half.
CSNB234 ARTIFICIAL INTELLIGENCE
Chapter 1: Propositional and First-Order Logic
First-Order Logic Chapter 8.
Carlos Varela Rennselaer Polytechnic Institute August 30, 2007
Presentation transcript:

Vampire: A Theorem Prover for First- Order Classical Logic Jason Gruber COSC Tuesday May 3, 2005

2 What is Vampire? developed by Andrei Voronkov and Alexandre Riazanov –Computer Science Department, University of Manchester The main goals of the project are: –creating an experimental environment for developing and evaluating novel efficient implementation techniques for automated theorem proving in first- order logic –developing software whose efficiency can meet practical needs in automatic theorem proving arising in a number of areas such as formal verification and development of software and hardware

3 Vampire At the moment our system Vampire is –a relatively fast resolution- and superposition- based experimental system –a developing system; many ideas are waiting to be implemented Vampire is not –an example of good design and coding style, though the situation is improving

4 Vampire It solves problems in the Thousands of Problems for Theorem Prover syntax in both CNF (conjunctive normal form) and full first-order logic syntax.Thousands of Problems for Theorem Prover Vampire supports the following inference rules: –ordered binary resolution with negative selection –superposition –special form of splitting Vampire exploits a number of redundancy control and simplification techniques, such as –forward and backward subsumption –forward and backward demodulation –forward subsumption resolution –cheap variant of basicness restrictions

5 Vampire Its kernel implements the calculi of ordered binary resolution and Quick Facts about: superposition (geometry) the placement of one object ideally in the position of another one in order to show that the two coincidesuperposition for handling equality. The splitting rule and negative equality splitting are simulated by the introduction of new predicate definitions and dynamic folding of such definitions. A number of standard redundancy criteria and simplification techniques are used for pruning the search space: subsumption, tautology deletion (optionally modulo commutativity), subsumption resolution, rewriting by ordered unit equalities, basicness restrictions and irreducibility of substitution terms. The reduction orderings used are the standard Knuth-Bendix ordering and a special non-recursive version of the Knuth-Bendix ordering.superposition

6 Vampire A number of efficient indexing techniques are used to implement all major operations on sets of terms and clauses. Run-time algorithm specialization is used to accelerate some costly operations, e.g., checks of ordering constraints. Although the kernel of the system works only with clausal normal forms, the preprocessor component accepts a problem in the full first-order logic syntax, clausifies it and performs a number of useful transformations before passing the result to the kernel. When a theorem is proven, the system produces a verifiable proof, which validates both the classification phase and the refutation of the CNF.

7 Vampire The efficiency of Vampire is due to a combination of compilation and indexing techniques used to implement all costly operations code trees are used for forward subsumption and search for generalizations, combination of path indexing and database style joins for backward subsumption and demodulation, and a number of specialized versions of discrimination trees for resolution and superposition.

8 Vampire Another interesting feature, which makes the system competitive, is the so-called limited resource strategy (LRS)*. Its purpose is to provide the best performance when time is limited by minimizing the amount of work that has been wasted when the time limit is reached.

9 Trophies CASC-16 (1999) : 1st place in MIX CASC-17 (2000) : 1st place in FOF (combined with Flotter) CASC JC (2001) : 1st place in MIX Proof Class and joint 1st place with E-SETHEO in MIX Assurance Class CASC-18 (2002) : 1st place in MIX (both Proof Class and Assurance Class), 1st place in FOF CASC-19 (2003) : 1st place in MIX (v6.0, both Proof Class and Assurance Class), 1st place in FOF (v5.0) CASC-J2 (2004) : 1st place in MIX (both Proof Class and Assurance Class), 1st place in FOFCASC-16 (1999) CASC-17 (2000) CASC JC (2001) CASC-18 (2002) CASC-19 (2003) CASC-J2 (2004)

10 Related work (incomplete list) The kernel of Vampire is used in a new temporal prover TeMP Vampire is integrated into the Sigma knowledge engineering environment. Vampire is used in the Hoolet reasoner for OWL-DL Vampire is being integrated into Isabelle

First Order Logic An overview

12 Syntax of First Order Logic

13 Semantics for First Order Logic

14 First Order Logic First order logic is used to model the world in terms of: –Objects, which are things with individual identities –Properties of objects that distinguish them from other objects –Relations that hold among objects –Functions which are a subset of the relations in which there is only one ‘value’ for any given ‘input’ Examples: –Objects: Students, lectures, companies, cars… –Relations: Brother of, bigger than, outside, part of, has color, occurs after, owns, visits, precedes… –Properties: blue, oval, even, large –Functions: father of, best friend, second half, one more than…

15 User Provides Constant symbols which represent individuals in the world –Mary –3 –green Function symbols which map individuals to individuals –Father-of(Mary)=John –Color-of(Sky)=Blue Predicate symbols mapping from individuals to truth values –Greater(5,3) –Green(Grass) –Color(Grass, Green)

16 FOL Provides Variable symbols –E.g., x, y, foo Connectives –Same as in PL; not (¬), and (  ), or (  ), implies (  ), if and only if (  ) Quantifiers –Universal  x –Existential  x

17 Quantifiers Universal quantification –(  x)P(x) means that P holds for all values of x in the domain associated with that variable E.g., (  x) dolphin(x)  mammal(x) Existential quantification –(  x)P(x) means that P holds for some value of x in the domain associated with that variable –E.g., (  x)mammal(x)  lays-eggs(x) –Make a statement about some object without naming it

18 Sentences are built from terms and atoms A term (denoting a real-world individual) is a constant symbol, a variable symbol, or an n-place function of n terms. –X and f(x1,…,xn) are terms, where each xi is a term. A term with no variables is a Ground Term An atom (which has value true or false) is either –An n-place predicate of n terms, or, –¬P, P  Q, P  Q, P  Q, P  Q where P and Q are atoms A sentence is an atom, or, if P is a sentence and x is a variable, then (  x)P and (  x)P are sentences. A well-formed formula (wff) is a sentence containing no “free” variables, IE, all variables are ‘bound’ by universal or existential quantifiers. –(  x)P(x,y) has x bound as a universally quantified variable, but y is free

19 Translating English to FOL Every gardener likes the sun –(  x) gardener(x)  likes(x,sun) You can fool some of the people all of the time. –(  x)(  t)(person(x)  time(t))  can-fool(x,t) You can fool all of the people some of the time. –(  x)(  t)(person(x)  time(t))  can-fool(x,t) All purple mushrooms are poisonous. –(  x)(mushroom(x)  purple(x))  poisonous(x) No purple mushroom is poisonous. –¬(  x)purple(x)  mushroom(x)  poisonous(x) –(  x)(mushroom(x)  purple(x))  ¬poisonous(x) There are exactly two purple mushrooms. –(  x)(  y)mushroom(x)  purple(x)  mushroom(y)  purple(y)  ¬(x=y)  (Az)(m ushroom(z)  purple(z))  ((x=z)v)y=z)) Clinton is not tall. –¬tall(Clinton) X is above Y if X is directly on top of Y or there is a pile of one or more other objects directly on top of another starting with X and ending with Y. –(  x)(  y)above(x,y)  (on(x,y)v(  z)(on(x.z)  above(z,y)))

20 Quantifiers Universal quantifiers often used with “implies” to form “rules.” –(  x) student(x)  smart(x) means “all students are smart.” You rarely use universal quantification to make blanket statements about every individual in the world. –(  x)student(x)  smart(x) means everyone in the world is a student and is smart. Existential quantifiers usually used with “and” to specify a list of properties about an individual. –(  x)student(x)  smart(x) means “there is a student who is smart.” A common mistake is to represent this English sentence as the FOL sentence: –(  x)student(x)  smart(x) But what happens when there is a person who is NOT a student?

21 Connections between All & Exist We can relate sentences involving for all and exists with DeMorgan’s Laws: –(  x) ¬P  ¬(  x) P –¬(  x) P  (  x) ¬ P –(  x) P  ¬(  x) ¬ P –(  x) P  ¬(  x) ¬ P

22 Axioms, definitions and theorems Axioms are facts and rules which attempt to capture all of the (important) facts and concepts about a domain that can be used to prove theorems. –Mathematicians don’t want any unnecessary (dependent) axioms—ones that can be derived from other axioms. –Dependent axioms can make reasoning faster, however. –Choosing a good set of axioms for a domain is a kind of design problem. A definition of a predicate is of the form “p(X)  …” and can be decomposed into two parts –Necessary description: “p(x)  …” –Sufficient description: “p(x)  …” –Some concepts do not have complete definitions (e.g. person(x))

23 Conversion to Normal Form STEP 1 - Eliminate implications: –The first step is to convert all implications with corresponding disjunctions. –ie. p  q becomes ¬ p  q STEP 2 - Move  inwards: –Use de Morgan’s laws, quantifier equivalences, and double negations –¬(p  q) becomes ¬ p  ¬ q ¬(p  q) becomes ¬ p  ¬ q ¬  x, p becomes  x ¬ p ¬  x, p becomes  x ¬ p ¬ ¬ p becomes p

24 Steps 3 & 4 STEP 3 - Standardize variables: –Change all duplicate variable names to separate names to Avoid confusion later when we drop quantifiers (  x P(x))  (  x Q(x)) becomes (  x P(x))  (  y Q(y)) STEP 4 - Move quantifiers left: –This can be done because we removed all duplicate variables p   x q becomes  x p  q

25 Steps 5-8 STEP 5 - Skolemize: –Remove all existential quantifiers Replace variables with names not existing elsewhere in KB Simple case:  x Q(x) becomes Q(A) where A is unique STEP 6 - Distribute  over  : –(a  b)  c becomes (a  c)  (b  c) STEP 7 - Flatten nested conjunctions and disjunctions: –(a  b)  c becomes (a  b  c) (a  b)  c becomes (a  b  c) STEP 8 - Convert disjunctions to implications: – Optional step for converting to INF –Gather all negative literals to left, and positive literals to right (  a   b  c  d) becomes (a  b  c  d)

26 English & FOL example Russell and Norvig Example

27 Now we apply the conversion procedure

28

29 References ampire_theorem_prover.htmhttp:// ampire_theorem_prover.htm htmlhttp:// html tions/L2_9B_Kolackowsky_Sit/ tions/L2_9B_Kolackowsky_Sit/ A.Riazanov,A.Voronkov, Limited Resource Strategy in Resolution Theorem Proving, Preprint CSPP-7, University of Manchester, 2000CSPP-7