Difference between revisions of "Description Logic"

From BC$ MobileTV Wiki
Jump to: navigation, search
(Tools)
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
''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.
+
'''D'''escription '''L'''ogic (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.
  
 +
 +
== Specifications ==
 +
 +
* Prolog syntax: http://rigaux.org/language-study/syntax-across-languages-per-language/Prolog.html<ref>[[wikipedia: Prolog syntax and semantics]]</ref>
 +
* IRIS Syntax: http://iris-reasoner.org/syntax
 +
* POSL - Positional Slotted Language syntax: http://ruleml.org/submission/ruleml-shortation.html
 +
 +
 +
 +
== EXAMPLE ==
 +
 +
'''FACTS - Simpson Family tree'''<ref>The Simpson's Family tree: http://en.wikipedia.org/wiki/Simpson_family</ref>
 +
<pre>
 +
lastname('simpson').
 +
lastname('bouvier').
 +
man('homer').
 +
woman('marge').
 +
dog('santas little helper').
 +
kitty('snowball II').
 +
hasFather('homer','abe').
 +
hasMother('homer','mona').
 +
hasFather('marge','clancy').
 +
hasMother('marge','jacqueline').
 +
hasBrother('homer','herb').
 +
hasSister('marge','patty').
 +
hasSister('marge','selma').
 +
hasSon('homer','bart').
 +
hasSon('marge','bart').
 +
hasAdoptedDaughter('selma','ling').
 +
hasDaughter('homer','lisa').
 +
hasDaughter('marge','lisa').
 +
hasDaughter('homer','maggie').
 +
hasDaughter('marge','maggie').
 +
hasMaidenName('marge','bouvier').
 +
hasPet('simpson','santas little helper').
 +
hasPet('simpson','snowball II').
 +
areMarried('homer','marge').
 +
isUncle(?y,?z) :- hasBrother(?x,?y), hasSon(?x,?z).
 +
isAunt(?y,?z) :- hasSister(?x,?y), hasDaughter(?x,?z).
 +
isGrandfather(?y,?z) :- hasFather(?x,?y), hasSon(?x,?z).
 +
isGrandmother(?y,?z) :- hasMother(?x,?y), hasDaughter(?x,?z).
 +
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).
 +
isFemale(?y) :- hasDaughter(?x,?y).
 +
isMale(?y) :- hasAdoptedSon(?x,?y).
 +
isFemale(?y) :- hasAdoptedDaughter(?x,?y).
 +
isMale(?y) :- hasBrother(?x,?y).
 +
isFemale(?y) :- hasSister(?x,?y).
 +
isMale(?y) :- hasFather(?x,?y).
 +
isFemale(?y) :- hasMother(?x,?y).
 +
isFamily(?x) :- areMarried(?x,?y).
 +
isFamily(?y) :- areMarried(?x,?y).
 +
isFamily(?y) :- hasSon(?x,?y).
 +
isFamily(?y) :- hasDaughter(?x,?y).
 +
isExtendedFamily(?y) :- isFamily(?x,?y).
 +
isExtendedFamily(?y) :- hasAdoptedSon(?x,?y).
 +
isExtendedFamily(?y) :- hasAdoptedDaughter(?x,?y).
 +
isExtendedFamily(?x) :- isGrandfather(?x,?y).
 +
isExtendedFamily(?x) :- isGrandmother(?x,?y).
 +
isExtendedFamily(?x) :- isAunt(?x,?y).
 +
isExtendedFamily(?x) :- isUncle(?x,?y).
 +
</pre>
 +
 +
'''EXAMPLE QUERY #1 - Which Simpsons are male? (infers that Bart, Homer, Abe, Herb, Santa's Little Helper are male from "son", ,"uncle", "grandfather" relationships, as well as "man" and "dog" fact)'''
 +
<pre>
 +
?-isMale(?x).
 +
</pre>
 +
 +
 +
'''EXAMPLE QUERY #2 - Who has a son? (Explicitly stated)'''
 +
<pre>
 +
?-hasSon(?x).
 +
</pre>
 +
 +
 +
'''EXAMPLE QUERY #3 - Who are in the Simpson family? (infered from son/daughter/marriage reciprocal relationships)'''
 +
<pre>
 +
?-isFamily(?x).
 +
</pre>
 +
 +
 +
'''EXAMPLE QUERY #4 - Who are the Simpson's pets? (Explicity stated)'''
 +
<pre>
 +
?-isPet('simpson').
 +
</pre>
 +
 +
 +
'''EXAMPLE QUERY #5 - Who are in the Simpson's "extended" family? (infered from family relationship and Pets, Grandparents, etc)'''
 +
<pre>
 +
?-isExtendedFamily(?x).
 +
</pre>
 +
 +
 +
 +
 +
== Tools ==
 +
 +
* '''IRIS Reasoner: http://iris-reasoner.org'''<ref>http://iris-reasoner.org/demo</ref>
 +
* RACER: http://www.ifis.uni-luebeck.de/~moeller/racer/index.html
 +
* DL-Learner: http://sourceforge.net/projects/dl-learner/
 +
* Description Logic - Complexity of Reasoning (calculator/tool): http://www.cs.man.ac.uk/~ezolin/dl/
 +
 +
== Resources ==
 +
 +
* '''Description Logic - Knowledge Representation: http://dl.kr.org/'''
 +
 +
 +
== Tutorials ==
 +
 +
* '''Making Linked Data Reasonable using Description Logics, Part 1 -- Can a ‘Separation of Concerns’ Lead to Better Slicing of the Pie?: http://www.mkbergman.com/?p=474'''
 +
* '''Making Linked Data Reasonable using Description Logics, Part 2 -- Good Design is Based on the Work to be Done: http://www.mkbergman.com/?p=476'''
 +
* Presentations on DL: http://www.cs.man.ac.uk/~horrocks/Slides/index.html
  
  
 
== External Links ==
 
== External Links ==
  
* [[wikipedia:Description Logic]]
+
* [[wikipedia: Description Logic]]
 +
* [[wikipedia: Abox]]
 
* Back to the Future with Description Logics: http://www.mkbergman.com/?p=470
 
* Back to the Future with Description Logics: http://www.mkbergman.com/?p=470
 
* Thinking ‘Inside the Box’ with Description Logics: http://www.mkbergman.com/?p=466
 
* Thinking ‘Inside the Box’ with Description Logics: http://www.mkbergman.com/?p=466
 
* Our Approach to Modeling, Fidelity, and KR: http://clarkparsia.com/weblog/2008/12/19/our-approach-to-modeling-fidelity-and-kr/
 
* Our Approach to Modeling, Fidelity, and KR: http://clarkparsia.com/weblog/2008/12/19/our-approach-to-modeling-fidelity-and-kr/
  
* '''Making Linked Data Reasonable using Description Logics, Part 1 -- Can a ‘Separation of Concerns’ Lead to Better Slicing of the Pie?: http://www.mkbergman.com/?p=474'''
+
== References ==
* '''Making Linked Data Reasonable using Description Logics, Part 2 -- Good Design is Based on the Work to be Done: http://www.mkbergman.com/?p=476'''
+
 
 +
<references />
 +
 
 +
== See Also ==
 +
 
 +
[[Rule Engine]] | [[Semantic Web]] | [[AI]] | [[Machine Learning]]

Latest revision as of 05:14, 24 March 2019

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.


Specifications


EXAMPLE

FACTS - Simpson Family tree[2]

lastname('simpson').
lastname('bouvier').
man('homer').
woman('marge').
dog('santas little helper').
kitty('snowball II').
hasFather('homer','abe').
hasMother('homer','mona').
hasFather('marge','clancy').
hasMother('marge','jacqueline').
hasBrother('homer','herb').
hasSister('marge','patty').
hasSister('marge','selma').
hasSon('homer','bart').
hasSon('marge','bart').
hasAdoptedDaughter('selma','ling').
hasDaughter('homer','lisa').
hasDaughter('marge','lisa').
hasDaughter('homer','maggie').
hasDaughter('marge','maggie').
hasMaidenName('marge','bouvier').
hasPet('simpson','santas little helper').
hasPet('simpson','snowball II').
areMarried('homer','marge').
isUncle(?y,?z) :- hasBrother(?x,?y), hasSon(?x,?z).
isAunt(?y,?z) :- hasSister(?x,?y), hasDaughter(?x,?z).
isGrandfather(?y,?z) :- hasFather(?x,?y), hasSon(?x,?z).
isGrandmother(?y,?z) :- hasMother(?x,?y), hasDaughter(?x,?z).
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).
isFemale(?y) :- hasDaughter(?x,?y).
isMale(?y) :- hasAdoptedSon(?x,?y).
isFemale(?y) :- hasAdoptedDaughter(?x,?y).
isMale(?y) :- hasBrother(?x,?y).
isFemale(?y) :- hasSister(?x,?y).
isMale(?y) :- hasFather(?x,?y).
isFemale(?y) :- hasMother(?x,?y).
isFamily(?x) :- areMarried(?x,?y).
isFamily(?y) :- areMarried(?x,?y).
isFamily(?y) :- hasSon(?x,?y).
isFamily(?y) :- hasDaughter(?x,?y).
isExtendedFamily(?y) :- isFamily(?x,?y).
isExtendedFamily(?y) :- hasAdoptedSon(?x,?y).
isExtendedFamily(?y) :- hasAdoptedDaughter(?x,?y).
isExtendedFamily(?x) :- isGrandfather(?x,?y).
isExtendedFamily(?x) :- isGrandmother(?x,?y).
isExtendedFamily(?x) :- isAunt(?x,?y).
isExtendedFamily(?x) :- isUncle(?x,?y).

EXAMPLE QUERY #1 - Which Simpsons are male? (infers that Bart, Homer, Abe, Herb, Santa's Little Helper are male from "son", ,"uncle", "grandfather" relationships, as well as "man" and "dog" fact)

?-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. wikipedia: Prolog syntax and semantics
  2. The Simpson's Family tree: http://en.wikipedia.org/wiki/Simpson_family
  3. http://iris-reasoner.org/demo

See Also

Rule Engine | Semantic Web | AI | Machine Learning