1 Logic Programming School of Informatics, University of Edinburgh Describing State Change Predicate logic is stateless: if p(a) can once be deduced from.

Slides:



Advertisements
Similar presentations
1 Datalog: Logic Instead of Algebra. 2 Datalog: Logic instead of Algebra Each relational-algebra operator can be mimicked by one or several Database Logic.
Advertisements

1 Logic Programming School of Informatics, University of Edinburgh Mode Inference Given the definition of a predicate p/N infer a calling pattern p(M 1,
OWL - DL. DL System A knowledge base (KB) comprises two components, the TBox and the ABox The TBox introduces the terminology, i.e., the vocabulary of.
//HDL Example 8-2 // //RTL description of design example (Fig.8-9) module Example_RTL (S,CLK,Clr,E,F,A);
An Overview of Ontologies and their Practical Applications Gianluca Correndo
Models of Concurrency Manna, Pnueli.
Basic Structures: Sets, Functions, Sequences, Sums, and Matrices
Review of Mathematical Notation / Terminology
1 2. Constraint Databases Next level of data abstraction: Constraint level – finitely represents by constraints the logical level.
Logic Programs and Classical Planning with LTL Constraints Ravi Palla Advisor:J Benton.
Knowledge Representation using First-Order Logic (Part III) This lecture: R&N Chapters 8, 9 Next lecture: Chapter 13; Chapter (Please read lecture.
First-Order Logic Knowledge Representation Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read:
Algebra 1 Seminar Domain and Range Notes Vocabulary ● Domain – The domain is the set of all x-coordinates in a set of ordered pairs. ● Range – The range.
2.1 Domain and Range. Vocabulary ● Relation – A relation is a general term for any set of ordered pairs. ● Function – A function is a special type of.
DEDUCTIVE DATABASE.
Preview Warm Up California Standards Lesson Presentation.
OWL and SDD Dave Thau University of Kansas
Artificial Intelligence Building Knowledge Base Chapter 8.
The Relational Model: Relational Calculus
CSE PredLogic 1 Knowledge Representation with Logic: First Order Predicate Calculus Outline –Introduction to First Order Predicate Calculus (FOPC)
OWL 2 in use. OWL 2 OWL 2 is a knowledge representation language, designed to formulate, exchange and reason with knowledge about a domain of interest.
Declarative vs Procedural Programming  Procedural programming requires that – the programmer tell the computer what to do. That is, how to get the output.
BioHealth Informatics Group A Practical Introduction to Ontologies & OWL Session 2: Defined Classes and Additional Modelling Constructs in OWL Nick Drummond.
Solving Compound Inequalities. Domain: A-REI Reasoning with Equations & Inequalities Cluster: 1. Understand solving equations as a process of reasoning.
Part I: Set Constructs. RDF Schema (RDFS) RDF does not provide mechanisms to define domain classes and properties RDFS is a vocabulary that provides many.
1 Knowledge Representation CS 171/CS How to represent reality? Use an ontology (a formal representation of reality) General/abstract domain Specific.
KM’s Inference Algorithm Peter Clark Knowledge Systems Boeing Math & Computing Technology.
Chapter 3 RDF and RDFS Semantics. Introduction RDF has a very simple data model But it is quite liberal in what you can say Semantics can be given using.
1 Artificial Intelligence Applications Institute Centre for Intelligent Systems and their Applications Stuart Aitken Artificial Intelligence Applications.
Based on “A Practical Introduction to Ontologies & OWL” © 2005, The University of Manchester A Practical Introduction to Ontologies & OWL Session 2: Defined.
A Logic of Partially Satisfied Constraints Nic Wilson Cork Constraint Computation Centre Computer Science, UCC.
Organization of the Lab Three meetings:  today: general introduction, first steps in Protégé OWL  November 19: second part of tutorial  December 3:
1 © The ATHENA Consortium. Resource Description Framework (RDF) A language for making simple statements about things (resources) Statements:
Math – Graphs of Functions 1. Graph of a function: the graph of all the function’s ordered pairs 2.
Solving Compound Inequalities Continued…. Example 1 Translate the verbal phrase into an inequality. Then graph the inequality. All real numbers that are.
ece 627 intelligent web: ontology and beyond
CS 2800 Midterm Review. Announcements Midterm Tuesday, 11/3, 7:30PM, UP B17 Covers up to and including HW #4 (induction) Practice Prelim / Homework Solutions.
Warm Up Identify the domain and range of each function.
Knowledge Repn. & Reasoning Lec #11+13: Frame Systems and Description Logics UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2004.
Ccs.  Ontologies are used to capture knowledge about some domain of interest. ◦ An ontology describes the concepts in the domain and also the relationships.
1 Letting the classifier check your intuitions Existentials, Universals, & other logical variants Some, Only, Not, And, Or, etc. Lab exercise - 3b Alan.
English for Economic Informatics I Tomáš Foltýnek Theoretical Foundations of Informatics.
Warm Up. Reference Angles If you know the reference angle, use these formulas to find the other quadrant angles that have the same reference angle Degrees.
First-Order Logic Knowledge Representation
a valid argument with true premises.
Knowledge Representation Part II Description Logic & Introduction to Protégé Jan Pettersen Nytun.
Warm Up Identify the following and then sketch the graph:
Lab exercise - 3a Alan Rector & colleagues
Warm Up Identify the domain and range of each function.
Solve the radical equation
First-Order Logic Knowledge Representation
Where does one end and the other start?
First-Order Logic Knowledge Representation
Ontology.
First-Order Logic Knowledge Representation
Objective 1A f(x) = 2x + 3 What is the Range of the function
Introduction to Artificial Intelligence
Unit 3 Day 10 – Transformations of Logarithmic Functions
Relations and Function
Inheritance: Introduction
Knowledge Representation using First-Order Logic (Part III)
First-Order Logic Knowledge Representation
Solving and graphing Compound Inequalities
Relations, Domain and Range
Description Logics.
This Lecture Substitution model
Warm Up: Solve and graph: -8p > 24 9z + 2 > 4z + 15.
2.1 Domain and Range.
Objectives The student will be able to:
A Tutorial Summary of Description Logic and Hybrid Rules
Presentation transcript:

1 Logic Programming School of Informatics, University of Edinburgh Describing State Change Predicate logic is stateless: if p(a) can once be deduced from a set of axioms then it can always be deduced from those axioms. Modelling the real world, however, requires us to talk about state change. We look at one simple (but common) way to model state in a stateless logic.

2 Logic Programming School of Informatics, University of Edinburgh Blocks World Example c b a t1t2t3 c b a t1t2t3 trans(Block, From, To) …….. Op 1 Op n

3 Logic Programming School of Informatics, University of Edinburgh State Change as Recursion poss(s0). poss(do(Op, S)) :- poss(S), pact(do(Op, S)). c b a t1t2t3 do( Op1, s0 ) s0 do(Op2, do(Op1, s0 ) )

4 Logic Programming School of Informatics, University of Edinburgh Possible Actions pact(do(trans(X, Y, Z), S)) :- holds(clr(Z), S), holds(clr(X), S), holds(on(X, Y), S), \+(X = Z), \+(Z = Y), \+(X = Y). c b a t1t2t3 c b a t1t2t3 trans(c, a, t3) clr(c) clr(t3) on(c,a)

5 Logic Programming School of Informatics, University of Edinburgh Initial Conditions holds(on(c,a), s0). holds(on(a,t1), s0). holds(on(b,t2), s0). holds(clr(c), s0). holds(clr(b), s0). holds(clr(t3), s0). c b a t1t2t3

6 Logic Programming School of Informatics, University of Edinburgh Transition Effects on State holds(clr(Y), do(trans(_, Y, _), _)). holds(on(X, Z), do(trans(X, _, Z), _)). c b a t1t2t3 c b a t1t2t3 trans(c, a, t3) clr(a) on(c,t3)

7 Logic Programming School of Informatics, University of Edinburgh Frame Axiom holds(C, do(trans(X, Y, Z), S)) :- holds(C, S), \+(C = clr(Z)), \+(C = on(X, Y)). c b a t1t2t3 c b a t1t2t3 trans(c, a, t3) on(a,t1) on(b,t2) clr(c) clr(b) on(a,t1) on(b,t2) clr(c) clr(b) on(c,a) clr(t3)

8 Logic Programming School of Informatics, University of Edinburgh Goal State goal :- poss(S), holds(on(a,b), S), holds(clr(a), S), holds(on(b,c), S), holds(on(c,t3), S), holds(clr(t1), S), holds(clr(t2), S). c b a t1t2t3

9 Logic Programming School of Informatics, University of Edinburgh Plan c b a t1t2t3 c b a t1t2t3 c b a t1t2t3 c b a t1t2t3 trans(c, a, t3)trans(b, t2, c)trans(a, t1, b) poss(do(trans(a,t1,b), do(trans(b,t2,c), do(trans(c,a,t3), s0))))

10 Logic Programming School of Informatics, University of Edinburgh Subsumption Based Systems Subsumption based inference is used in programming systems that employ types, classes, description logics and the like. We look at how to infer subsumption in two ways: Through term structure; Through translation to FOPC There are other ways (e.g. by writing a type unification system) but we don’t cover those.

11 Logic Programming School of Informatics, University of Edinburgh Term Encoding For Subsumption animal mammalreptile dog vehicle carbus Type described as a structured term e.g. animal(mammal(dog(X))) | ?- animal(X) = animal(mammal(Y)). X = mammal(Y) | ?- animal(X) = vehicle(Y). no | ?- animal(mammal(dog(rover))) = vehicle(car(rover)). no

12 Logic Programming School of Informatics, University of Edinburgh Vocabulary Describing Classes subclass(mammal, animal) subclass(intersection(warm_blooded, lactating), mammal) domain(biomass,animal) range(biomass,number) etc… “Mammals are animals” “Mammals are warm blooded and lactating” “Biomass is a function over animals” “Biomass is a function returning a number”

13 Logic Programming School of Informatics, University of Edinburgh Translator to FOPC t(subclass(C,D), (T1 :- T2)) :- th(D, Y, T1), tb(C, Y, T2). t(equivalent(C,D), (T1,T2)) :- t(subclass(C,D), T1), t(subclass(D,C), T2). t(range(R,D), (T1 :- T2)) :- th(D, Y, T1), T2 =.. [R,_,Y]. t(domain(R,D), (T1 :- T2)) :- th(D, X, T1), T2 =.. [R,X,_]. t(X : A, T) :- th(A, X, T). t((X1,X2):R, T) :- atom(R), T =.. [R,X1,X2]. th(A, X, T) :- atom(A), T =.. [A,X]. th(intersection(C,D), X, (T1,T2)) :- th(C, X, T1), th(D, X, T2). th(all(R,C), X, (T1 :- T2)) :- th(C, Y, T1), T2 =.. [R,X,Y]. tb(A, X, T) :- atom(A), T =.. [A,X]. tb(intersection(C,D), X, (T1,T2)) :- tb(C, X, T1), tb(D, X, T2). tb(union(C,D), X, (T1 ; T2)) :- tb(C, X, T1), tb(D, X, T2). tb(some(R,C), X, (T1,T2)) :- tb(C, Y, T2), T1 =.. [R,X,Y].

14 Logic Programming School of Informatics, University of Edinburgh Applying FOPC Translator | ?- t(subclass(mammal, animal), S). S = (animal(X) :- mammal(X)) | ?- t(subclass(intersection(warm_blooded, lactating), mammal), R). R = (mammal(X) :- warm_blooded(X), lactating(X)) | ?- t(domain(biomass,animal), D). D = (animal(X) :- biomass(X,_)) | ?- t(range(biomass,number), R). R = (number(X) :- biomass(_,X))