OTTER- (ATP) Automated Theorem Prover

Slides:



Advertisements
Similar presentations
Artificial Intelligence 8. The Resolution Method
Advertisements

Artificial Intelligence 9. Resolution Theorem Proving
Some Prolog Prolog is a logic programming language
Resolution Proof System for First Order Logic
Inference Rules Universal Instantiation Existential Generalization
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 10– Club and Circuit Examples.
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 
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.
Models and Propositional Logic In propositional logic, a model in general simply fixes the truth value – true or false – for every proposition symbol.
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.
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
1 Logical reasoning systems Theorem provers and logic programming languages Production systems Frame systems and semantic networks Description logic systems.
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.
Resolution Refutation Formal Aspects of Computer Science - Week 10 An Automated Theorem Prover Lee McCluskey, room 2/07
Inference and Resolution for Problem Solving
SPASS: Combining Superposition, Sorts and Splitting Christoph Weidenbach Max-Planck-Institute for Computer Science Presented.
Chapter 3 Propositional Logic
Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus.
0 1 Todays Topics Resolution – top down and bottom up j-DREW BU procedure Subsumption – change to procedure Infinite Loops RuleML input – Prolog output.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
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.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 17 Wednesday, 01 October.
Resolution Strategies One common strategy for applying resolution is called level saturation. Here you try to resolve every pair of clauses from the original.
Artificial Intelligence 7. Making Deductive Inferences Course V231 Department of Computing Imperial College, London Jeremy Gow.
1 Knowledge Based Systems (CM0377) Introductory lecture (Last revised 28th January 2002)
Backward chaining Assume the same representation of rules as in forward chaining, i.e. If is true, is true, … is true Then is true. Rule interpretation.
Lecture 9a: Resolution Strategies Heshaam Faili University of Tehran Restriction strategies for resolution Horn clauses.
Knowledge Representation and Reasoning
Resolution in the Propositional Calculus
Encapsulation for Practical Simplification Procedures
Provisioning Windowsa 10 na IoT, mobilnim i desktop uređajima
Programi zasnovani na prozorima
Petlje WHILE – WEND.
Java Hello world !.
Podatkovni višemedijski prijenos i računalne mreže Speech Recognition
Petlje FOR - NEXT.
Elektrotehnički fakultet – Podgorica Operativni sistemi
Binarne datoteke u Pascalu
14 UNUTRAŠNJE I ANONIMNE KLASE
Arrays and strings -1 (nizovi i znakovni nizovi)
LAPLACEOVA TRANSFORMACIJA
SIVI BALANS SIVI OMJER.
Page Layout Podešavanje stranica.
MessageBox.
DISKRETNI DINAMIČKI SUSTAVI –LOGISTIČKI MODEL -KAOS-
Pojmovi digitalnog zapisa
PROGRAMSKI JEZIK PASCAL
Osnovni simboli jezika Pascal
Razvojne okoline Kolegij: Programski jezik C++ Ak. god. 2017/2018
Do While ... Loop struktura
Virtualizacija poslovnih procesa metodom „Swimlane“ dijagrama
ProDESKTOP8.0 CRTANJE NA RAČUNARU.
Biointelligence Lab School of Computer Sci. & Eng.
Programiranje – Small Basic
Seminar iz predmeta Sustavi za praćenje i vođenje procesa
Naredbe u php-u.
Programski jezik C++ - Vježbe - 5. dio
Programski jezik Python
Izranjajuća Inteligencija
LimeSurvey Uvjetni prikaz pitanja Internetska istraživanja
Podatkovni višemedijski prijenos i računalne mreže Speech Recognition
Biointelligence Lab School of Computer Sci. & Eng.
7. Baze podataka Postavke MS Accessa.
Darko Anđelković University of Niš
Ponavljanje Pisana provjera
Resolution Proof System for First Order Logic
Kako zaštititi privatnost na facebooku
Presentation transcript:

OTTER- (ATP) Automated Theorem Prover Otter je razvijen u Argonne National Laboratory, USA. http://www.mcs.anl.gov/research/projects/AR/otter/ Više se ne radi na daljnjem razvoju, ali je stabilan i prikladan za projekte iz Ekspertnih sustava. Nasljednik je Prover9 (University of New Nexico, USA): http://www.cs.unm.edu/~mccune/prover9/ Tko želi može raditi i projekt uporabom Prover9 sustava za dokazivanje teorema ili bilo kojega drugog modernog sustava.

Otter Otter je sustav za dokazivanje teorema temeljen na predstavljanju znanja shemom predikatne logike prvoga reda. U rasuđivanju (izvođenju dokaza) koriste se razne izvedbe razrješavanja (Robinson 1965). Ugrađeno je preslikavanje formula predikatne logike u normalizirane klauzule jer interni rad isključivo s klauzulama. Opis problema može se dati kao skup formula predikatne logike ili kao skup klauzula. Ugrađeni su postupci podrazumijevanja, faktoriziranja, demodulacije. Može se koristiti za probleme s jednakosti. Implementiran je u ANSI C jeziku. Otter traži interakciju korisnika (postavljanje i mijenjanje početnih uvjeta rada). Otter nije pogodan za probleme iz matematičke teorije brojeva (indukcija). Za probleme verifikacije digitalnih sustava postoje specijalizirani sustavi koji su efikasniji od Otter-a.

Otter Temeljni postupak strategije je SOS (engl. Set of Support). Postoje četiri liste klauzula: usable, sos, passive, demodulators Glavna petlja: While (sos is not empty and no refutation found) 1. Let given_clause be the ‘‘best’’ clause in sos; 2. Move given_clause from sos to usable; 3. Infer and process new clauses using the inference rules in effect; each new clause must have the given_clause as one of its parents and members of usable as its other parents; new clauses that pass the retention tests are appended to sos; End of while loop.

Otter Osim temeljne SoS strategije postoje: - Weighting (introducing background knowledge) - Unit preference - Queue strategy (instead of weight use ordering in KB) - Prolog Notacija u klauzulama: PREDICATE(<constants>, <variables>, <functions>) Constants: Kim, apple, a, … Variables: u, v, x, y, z Functions: foo(<constants>, <variables>, <functions>) Negation: - Disjunction: | First-order: all x, exists x, -, &, |, ->, <->

Otter Pravila razrješavanja: 1. Binary resolution (klasični Robinson). 2. UR-resolution Jedna klauzula nejedinična + skup jediničnih. Simultano binarno razrješavanje sa skupom jediničnih. Rezultat: jedna jedinična. 3. Hyperresolution Skup klauzula od kojih je jedna negativna ili miješana (nukleus). (nucleus). Sve druge su pozitivne (sateliti). Broj of neg. literalla u nukleusu = broju satelita, u kojima je točno jedan odgovarajući pozitivan literal. 4. Negative hyperresolution, obrnuto od 3. 5. Unit resolution Binarno kao 1, jedna klauzula je jedinična. Pravila pojednostavljivanja: 1. Factoring (faktoriziranje) Izjednačavanje (unifikacija) i izbacivanje literala u klauzuli. 2. Subsumption (podrazumijevanje) Forward = nova klauzula se izbacuje (podrazumijevana) Backward = stara klauzula se izbacuje (podrazumijevana)

Otter Korisničko sučelje: Otvori se terminal mod (Windows “command prompt”). otter < input-file > output-file input-file: foo.in output-file: foo.out Nema parametara u naredbenoj liniji (sve je u ulaznoj datoteci). Ulazna ASCII tekst datoteka: skup wff formula predikatne logike ili skup klauzula, znak % za komentar Rezultat će biti zapisan u izlaznu datoteku. <, > znakovi: uobičajeno usmjeravanje kao u Unix-u.

Otter - primjer % Roberta and Steve hold, between them, two jobs. % Each has one job. % The jobs are teacher and nurse. % The job of nurse is held by a male. % Who holds each job? %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % define inference, usually set(auto). set(ur_res).

Otter - primjer % Describe the world by “usable” list. list(usable). % Everyone is a male or a female. FEMALE(x) | MALE(x). % No person is both male and female. % not exist x (male(x) and female(x) = % for all (-male(x) | -female(x) -FEMALE(x) | -MALE(x). % Every person holds exactly one of job, and % every job is held by one person. % The jobs are nurse and teacher. HASAJOB(x, nurse) | HASAJOB(x, teacher). % Noone can have both jobs. -HASAJOB(x, nurse) | -HASAJOB(x, teacher). % Every job is assigned to Roberta or Steve. HASAJOB(Roberta, x) | HASAJOB(Steve, x). % Roberta and Steve cannot have the same job. -HASAJOB(Roberta, x) | -HASAJOB(Steve, x).

Otter - primjer % The job of a nurse is held by a male. % for all x, if x has a job of a nurse, % then x is a male % for all x HASAJOB(x, nurse) -> MALE(x) -HASAJOB(x, nurse) | MALE(x). % Roberta is a female. FEMALE(Roberta). % Steve is a male. MALE(Steve). end_of_list. % Prove or not that Steve is a nurse (sos list). list(sos). -HASAJOB(Steve, nurse).

Otter - primjer ----- Otter 3.0.4, August 1995 ----- The job was started by ??? on ???, Tue Oct 19 12:36:35 1999 The command was "winot304". set(ur_res). list(usable). 1 [] FEMALE(x)|MALE(x). 2 [] -FEMALE(x)| -MALE(x). 3 [] HASAJOB(x,nurse)|HASAJOB(x,teacher). 4 [] -HASAJOB(x,nurse)| -HASAJOB(x,teacher). 5 [] HASAJOB(Roberta,x)|HASAJOB(Steve,x). 6 [] -HASAJOB(Roberta,x)| -HASAJOB(Steve,x). 7 [] -HASAJOB(x,nurse)|MALE(x). 8 [] FEMALE(Roberta). 9 [] MALE(Steve). end_of_list. list(sos). 10 [] -HASAJOB(Steve,nurse). ======= end of input processing =======

Otter - primjer =========== start of search =========== given clause #1: (wt=3) 10 [] -HASAJOB(Steve,nurse). ** KEPT (pick-wt=3): 11 [ur,10,5] HASAJOB(Roberta,nurse). ** KEPT (pick-wt=3): 12 [ur,10,3] HASAJOB(Steve,teacher). given clause #2: (wt=3) 11 [ur,10,5] HASAJOB(Roberta,nurse). ** KEPT (pick-wt=2): 13 [ur,11,7] MALE(Roberta). ** KEPT (pick-wt=3): 14 [ur,11,4] -HASAJOB(Roberta,teacher). given clause #3: (wt=2) 13 [ur,11,7] MALE(Roberta). ** KEPT (pick-wt=2): 15 [ur,13,2]). -FEMALE(Roberta ----> UNIT CONFLICT at 0.01 sec ----> 16 [binary,15.1,8.1] $F. Length of proof is 3. Level of proof is 3.

Otter - primjer ---------------- PROOF ---------------- 2 [] -FEMALE(x)| -MALE(x). 5 [] HASAJOB(Roberta,x)|HASAJOB(Steve,x). 7 [] -HASAJOB(x,nurse)|MALE(x). 8 [] FEMALE(Roberta). 10 [] -HASAJOB(Steve,nurse). 11 [ur,10,5] HASAJOB(Roberta,nurse). 13 [ur,11,7] MALE(Roberta). 15 [ur,13,2] -FEMALE(Roberta). 16 [binary,15.1,8.1] $F. ------------ end of proof ------------- Search stopped by max_proofs option. ============ end of search ============

Otter - primjer -------------- statistics ------------- clauses given 3 clauses generated 6 ur_res generated 6 demod & eval rewrites 0 clauses wt,lit,sk delete 0 tautologies deleted 0 clauses forward subsumed 1 unit deletions 0 factor simplifications 0 clauses kept 5 new demodulators 0 empty clauses 1 clauses back demodulated 0 clauses back subsumed 0 usable size 12 sos size 3 demodulators size 0 passive size 0 hot size 0 Kbytes malloced 63

Otter - primjer Varijacija primjera: želimo oba rješenja (Who holds each job?) Default: assign(max_proofs, 1) – sustav stane kod prvog dokaza Dodajemo: (database inquiry). assign(maxproofs, 2). list(usable). % sve klauzule kao prije . . . % dodaj: “ako poslovi stavi u bazu”, implikacija -HASAJOB(x, y) | INFO(x, y). end_of_list. list(passive). % dodaj za ispis, implikacija -INFO(x, y) | $ANSWER(HASAJOB(x, y)).

Otter - primjer Varijacija primjera: želimo oba rješenja (Who holds each job?) Rezultat: $ANSWER(HASAJOB(steve, nurse)). $ANSWER(HASAJOB(roberta, teacher)).