Description Logic

From BC$ MobileTV Wiki
Revision as of 02:10, 11 May 2011 by Joe (Talk | contribs)

Jump to: navigation, search

Description Logic (commonly abbreviated DL) is a set of mathematical rules and expressions for describing an action or set of outcomes, based on a particular set of inputs, as defined by principles of mathematical.


EXAMPLE

FACTS - Simpson Family tree

man('homer').
woman('marge').
dog('santas little helper').
kitty('snowball II').
lastname('simpson').
lastname('bouvier').
hasFather('homer','abe').
hasMother('marge','jacqueline').
hasBrother('homer','herb').
hasSister('marge','patty').
hasSister('marge','selma').
hasSon('homer','bart').
hasSon('marge','bart').
hasDaughter('homer','lisa').
hasDaughter('marge','lisa').
hasDaughter('homer','maggie').
hasDaughter('marge','maggie').
hasMaidenName('marge','bouvier').
hasPet('simpson','santas little helper').
hasPet('simpson','snowball II').
married('homer','marge').
isMale(?x) :- man(?x).
isFemale(?x) :- woman(?x).
isMale(?x) :- dog(?x).
isFemale(?x) :- bitch(?x).
isMale(?x) :- cat(?x).
isFemale(?x) :- kitty(?x).
isMale(?y) :- hasSon(?x,?y).
isFamily(?x) :- married(?x,?y).
isFamily(?y) :- married(?x,?y).
isFamily(?y) :- hasSon(?x,?y).
isFamily(?y) :- hasDaughter(?x,?y).
isFamily(?x) :- lastname(?x).
isExtendedFamily(?x) :- isFamily(?x,?y).
isExtendedFamily(?x) :- isGrandfather(?x,?y).
isExtendedFamily(?x) :- isGrandmother(?x,?y).
isExtendedFamily(?x) :- isAunt(?x,?y).
isExtendedFamily(?x) :- isUncle(?x,?y).
isExtendedFamily(?x) :- hasPet(?x,?y).

EXAMPLE QUERY #1 - Which Simpsons are male? (infers that Bart and Santa's Little Helper are male from "son" and "dog" relationship)

?-isMale(?x).


EXAMPLE QUERY #2 - Who has a son? (Explicitly stated)

?-hasSon(?x).


EXAMPLE QUERY #3 - Who are in the Simpson family? (infered from son/daughter/marriage reciprocal relationships)

?-isFamily(?x).


EXAMPLE QUERY #4 - Who are the Simpson's pets? (Explicity stated)

?-isPet('simpson').


EXAMPLE QUERY #5 - Who are in the Simpson's "extended" family? (infered from family relationship and Pets, Grandparents, etc)

?-isExtendedFamily(?x).



Tools


Resources


Tutorials


External Links

References

  1. http://iris-reasoner.org/demo

See Also

Rule Engine | Semantic Web | AI | Machine Learning