Professional Documents
Culture Documents
Grigoris Antoniou
Frank van Harmelen
1. Introduction
2. Monotonic Rules: Example
3. Monotonic Rules: Syntax & Semantics
4. Description Logic Programs (DLP)
5. Semantic Web Rules Language (SWRL)
6. Nonmonotonic Rules: Syntax
7. Nonmonotonic Rules: Example
8. Rule Markup Language (RuleML)
Solution 2
R1: If birthday, then special discount
R2’: If birthday is not known, then not
special discount
Solves the problem but:
– The premise of rule R2' is not within the
expressive power of predicate logic
– We need a new kind of rule system
1. Introduction
2. Monotonic Rules: Example
3. Monotonic Rules: Syntax & Semantics
4. Description Logic Programs (DLP)
5. Semantic Web Rules Language (SWRL)
6. Nonmonotonic Rules: Syntax
7. Nonmonotonic Rules: Example
8. Rule Markup Language (RuleML)
1. Introduction
2. Monotonic Rules: Example
3. Monotonic Rules: Syntax & Semantics
4. Description Logic Programs (DLP)
5. Semantic Web Rules Language (SWRL)
6. Nonmonotonic Rules: Syntax
7. Nonmonotonic Rules: Example
8. Rule Markup Language (RuleML)
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
p(a)
¬X p(X)
The 2nd formula says that no element has
the property p
The 1st formula says that the value of a does
have the property p
Thus X p(X) follows from p(a)
p(a)
p(X) q(X)
q(X)
p(a)
p(X) q(X)
q(b)
add(X,0,X)
add(X,Y,Z) add(X,s(Y ),s(Z))
add(X, s8(0),Z)
Possible ground witnesses:
– {X/0,Z/s8(0)}, {X/s(0),Z/s9(0)} . . .
The parameterized witness Z = s8(X) is the most
general answer to the query:
– X Z add(X,s8(0),Z)
The computation of most general witnesses is the
primary aim of SLD resolution
1. Introduction
2. Monotonic Rules: Example
3. Monotonic Rules: Syntax & Semantics
4. Description Logic Programs (DLP)
5. Semantic Web Rules Language (SWRL)
6. Nonmonotonic Rules: Syntax
7. Nonmonotonic Rules: Example
8. Rule Markup Language (RuleML)
1. Introduction
2. Monotonic Rules: Example
3. Monotonic Rules: Syntax & Semantics
4. Description Logic Programs (DLP)
5. Semantic Web Rules Language (SWRL)
6. Nonmonotonic Rules: Syntax
7. Nonmonotonic Rules: Example
8. Rule Markup Language (RuleML)
1. Introduction
2. Monotonic Rules: Example
3. Monotonic Rules: Syntax & Semantics
4. Description Logic Programs (DLP)
5. Semantic Web Rules Language (SWRL)
6. Nonmonotonic Rules: Syntax
7. Nonmonotonic Rules: Example
8. Rule Markup Language (RuleML)
p(X) q(X)
r(X) ¬q(X)
Given also the facts p(a) and r(a) we conclude
neither q(a) nor ¬q(a)
– This is a typical example of 2 rules blocking each other
Conflict may be resolved using priorities among rules
Suppose we knew somehow that the 1st rule is
stronger than the 2nd
– Then we could derive q(a)
Higher authority
– E.g. in law, federal law preempts state law
– E.g., in business administration, higher management has
more authority than middle management
Recency
Specificity
– A typical example is a general rule with some exceptions
We abstract from the specific prioritization principle
– We assume the existence of an external priority relation
on the set of rules
r : L1, ..., Ln L
r is the label
{L1, ..., Ln} the body (or premises)
L the head of the rule
L, L1, ..., Ln are positive or negative literals
A literal is an atomic formula p(t1,...,tm) or its
negation ¬p(t1,...,tm)
No function symbols may occur in the rule
51 Chapter 5 A Semantic Web Primer
Defeasible Logic Programs
1. Introduction
2. Monotonic Rules: Example
3. Monotonic Rules: Syntax & Semantics
4. Description Logic Programs (DLP)
5. Semantic Web Rules Language (SWRL)
6. Nonmonotonic Rules: Syntax
7. Nonmonotonic Rules: Example
8. Rule Markup Language (RuleML)
r1: acceptable(X)
r2: bedrooms(X,Y), Y < 2 ¬acceptable(X)
r3: size(X,Y), Y < 45 ¬acceptable(X)
r4: ¬pets(X) ¬acceptable(X)
r5: floor(X,Y), Y > 2,¬lift(X) ¬acceptable(X)
r6: price(X,Y), Y > 400 ¬acceptable(X)
r2 > r1, r3 > r1, r4 > r1, r5 > r1, r6 > r1
bedrooms(a1,1)
size(a1,50)
central(a1)
floor(a1,1)
¬lift(a1)
pets(a1)
garden(a1,0)
price(a1,300)
a3 2 65 no 2 no yes 0 350
a4 2 55 no 1 yes no 15 330
a6 2 60 yes 3 no no 0 370
1. Introduction
2. Monotonic Rules: Example
3. Monotonic Rules: Syntax & Semantics
4. Description Logic Programs (DLP)
5. Semantic Web Rules Language (SWRL)
6. Nonmonotonic Rules: Syntax
7. Nonmonotonic Rules: Example
8. Rule Markup Language (RuleML)
<Implies>
<head>
<Atom>
<Rel>discount</Rel>
<Var>customer</Var>
<Var>product</Var>
<Ind>7.5 percent</Ind>
</Atom>
</head>
<body>
<And>
<Atom>
<Rel>premioum</Rel>
<Var>customer</Var>
</Atom>
<Atom>
<Rel>luxury</Rel>
<Var>product</Var>
</Atom>
</And>
</body>
</Implies>
<ruleml : Implies>
<ruleml : head>
<swrlx : individualPropertyAtom
swrlx : property=“uncle”>
<ruleml : Var>X</ruleml : Var>
<ruleml : Var>Z</ruleml : Var>
</swrlx : individualPropertyAtom>
</ruleml : head>
<ruleml : body>
<ruleml : And>
<swrlx : individualPropertyAtom
swrlx :
property=“brother”>
<ruleml : Var>X</ruleml : Var>
<ruleml : Var>Y</ruleml : Var>
</swrlx : individualPropertyAtom>
<swrlx : individualPropertyAtom
swrlx :
property=“childOf”>