Lecture Outline Introduction 2. Monotonic Rules: EXample 3. Monotonic Rules: Syntax Semantics 4. Nonmonotonic Rules: Syntax 5. Nonmonotonic Rules: Example 6. A dTd For Monotonic rules 7. Adtd For nonmonotonic rules 16 Chapter 5 A Semantic Web primer
16 Chapter 5 A Semantic Web Primer Lecture Outline 1. Introduction 2. Monotonic Rules: Example 3. Monotonic Rules: Syntax & Semantics 4. Nonmonotonic Rules: Syntax 5. Nonmonotonic Rules: Example 6. A DTD For Monotonic Rules 7. A DTD For Nonmonotonic Rules
Monotonic Rules- Syntax loyalCustomer(X), age(X)>60->discount(x) e We distinguish some ingredients of rules: variables which are placeholders for values: X constants denote fixed values: 60 Predicates relate objects: loyalCustomer Function symbols which return a value for certain arguments: age 17 Chapter 5 A Semantic Web primer
17 Chapter 5 A Semantic Web Primer Monotonic Rules – Syntax loyalCustomer(X), age(X) > 60 → discount(X) ⚫ We distinguish some ingredients of rules: – variables which are placeholders for values: X – constants denote fixed values: 60 – Predicates relate objects: loyalCustomer, > – Function symbols which return a value for certain arguments: age
Rules B1 Bn→>A AB1 Bn are atomic formulas a is the head of the rule B1,. Bn are the premises(body of the rule) o The commas in the rule body are read conjunctively ● Variables may occur in A,B1,…,Bn loyalCustomer(X), age(X)>60>discount(X) Implicitly universally quantified 18 Chapter 5 A Semantic Web primer
18 Chapter 5 A Semantic Web Primer Rules B1, . . . , Bn → A ⚫ A, B1, ... , Bn are atomic formulas ⚫ A is the head of the rule ⚫ B1, ... , Bn are the premises (body of the rule) ⚫ The commas in the rule body are read conjunctively ⚫ Variables may occur in A, B1, ... , Bn – loyalCustomer(X), age(X) > 60 → discount(X) – Implicitly universally quantified
Facts and Logic Programs A fact is an atomic formula E.g. loyal Customer(a345678) The variables of a fact are implicitly universally quantified A logic program P is a finite set of facts and rules Its predicate logic translation pl(P)is the set of all predicate logic interpretations of rules and facts in P 19 Chapter 5 A Semantic Web primer
19 Chapter 5 A Semantic Web Primer Facts and Logic Programs ⚫ A fact is an atomic formula ⚫ E.g. loyalCustomer(a345678) ⚫ The variables of a fact are implicitly universally quantified. ⚫ A logic program P is a finite set of facts and rules. ⚫ Its predicate logic translation pl(P) is the set of all predicate logic interpretations of rules and facts in P
Goals A goal denotes a query G asked to a logic program ● The for:B1,,,,Bn If n=0 we have the empty goal O 20 Chapter 5 A Semantic Web primer
20 Chapter 5 A Semantic Web Primer Goals ⚫ A goal denotes a query G asked to a logic program ⚫ The form: B1, . . . , Bn → ⚫ If n = 0 we have the empty goal