Logic-Based Systems AI Lecture Prof. Carolina Ruiz Worcester Polytechnic Institute
Using Theorem Provers AS ASSISTANTS AS REASONING SYSTEMS tool for mathemathicians • Proof-Checkers: – to implement independent agents that – mathematician provides a sketch of the proof and TP make decisions and act checks it and fills in the on their own. details. • Socratic Reasoners: – (e.g. ONTIC). Mathematician and TP construct proof together. AI Lecture - Prof. Carolina Ruiz 2
Practical uses of Theorem Provers (TPs) SAM Semi-automated Lattice theory math. Guard et al, 1969 Wos & Winker, Open questions in AURA 1983 several areas of mathematics Produced 1 st fully Boyer & Moore, BOYER & 1979 computerized proof MOORE of Godel’s incompleteness thm Organized Open questions in OTTER techniques for combinatorical theorem proving logic McCure 1992 AI Lecture - Prof. Carolina Ruiz 3
CS/ECE: Verification of Systems • SOFTWARE • HARDWARE procedure swap(x,y) x var t; y w {Pre: x = C1, y = C2} z t := x; x:= y; w = ( x OR y) and ~z y:= t {Post: x = C2, y = C1} AI Lecture - Prof. Carolina Ruiz 4
CS/ECE: Verification of Systems • SOFTWARE • HARDWARE – Boyer & Moore: – Aura: • Verifies design of a • verified the RSA 10-bit adder public key – MRS: encryption • performs diagnosis algorithm of computer • verified the Boyer systems & Moore string matching algorithm AI Lecture - Prof. Carolina Ruiz 5
CS/ECE: Synthesis of Systems • SOFTWARE • HARDWARE procedure swap(x,y) x {Pre: x = C1, y = C2} y w ? ? z {Post: x = C2, y = C1} Prove that there exists a program w = ( x OR y) and ~z satisfying the specification. AURA: used to design circuits If the proof is constructed, a more compact than before program can be extracted. AI Lecture - Prof. Carolina Ruiz 6
Inside a Logic-based System Knowledge Representation First order logic Problem Solving Strategy Refutation using resolution AI Lecture - Prof. Carolina Ruiz 7
Knowledge representation 1st order logic • Everybody who can read is literate – x, r(x) -> l(x) A • Dolphins are not literate – x, d(x) -> !l(x) A • Some dolphins are intelligent – Э x, [d(x) & i(x) ] • Some who are intelligent cannot read – Э x, [i(x) & !r(x)] AI Lecture - Prof. Carolina Ruiz 8
Problem Solving Problem Statement • A1: Everybody who can read is literate – x, r(x) -> l(x) A • A2: Dolphins are not literate – x, d(x) -> !l(x) A • A3: Some dolphins are intelligent – Э x, [d(x) & i(x) ] • Conclusion: Some who are intelligent cannot read – Э x, [i(x) & !r(x)] AI Lecture - Prof. Carolina Ruiz 9
Problem Solving Proof by Refutation • A1: Everybody who can read is literate – x, r(x) -> l(x) A • A2: Dolphins are not literate – x, d(x) -> !l(x) A • A3: Some dolphins are intelligent – Э x, [d(x) & i(x) ] • ! Conclusion: it is not the case that some who are intelligent cannot read A A – ! Э x, [i(x) & !r(x)] = x, [!i(x) || !!r(x)] = x, [!i(x) || r(x)] AI Lecture - Prof. Carolina Ruiz 10
Problem Solving Proof by Refutation using Resolution translating formulas into clausal form • A1: x, r(x) -> l(x) • A1: x, !r(x) || l(x) A A • A2: A x, d(x) -> !l(x) • A2: A x, !d(x) || !l(x) • A3: Э x, [d(x) & i(x)] • A3: Э x, [d(x) & i(x)] • !C: x, [!i(x) || r(x)] • !C: x, [!i(x) || r(x)] A A AI Lecture - Prof. Carolina Ruiz 11
Problem Solving Proof by Refutation using Resolution translating formulas into clausal form – done! • A1: !r(x) || l(x) • A1: x, !r(x) || l(x) A • A2: !d(x) || !l(x) • A2: A x, !d(x) || !l(x) • A3.1: d( a ) • A3: Э x, [d(x) & i(x) ] • A3.2: i( a ) • !C: !i(x) || r(x) • !C: x, [!i(x) || r(x)] A AI Lecture - Prof. Carolina Ruiz 12
• A1: !r(x) || l(x) Problem Solving • A2: !d(x) || !l(x) Resolution • A3.1: d( a ) • A1: !r(x) || l(x) • A3.2: i( a ) • A2: !d(x) || !l(x) • !C: !i(x) || r(x) • A4: !r(x) || !d(x) • A3.1: d( a ) • A5: !r( a ) • !C: !i(x) || r(x) • A6: !i( a ) Hence C is a logical consequence of A1,A2,A3 • A3.2: i( a ) • A7: � Contradiction!!! ☺ AI Lecture - Prof. Carolina Ruiz 13
Recommend
More recommend