| 1 |
@prefix owl: <http://www.w3.org/2002/07/owl#>. |
| 2 |
@prefix log: <http://www.w3.org/2000/10/swap/log#>. |
| 3 |
@prefix : <urn:example:>. |
| 4 |
|
| 5 |
# slide 33 example from https://www.slideshare.net/PatHayes/blogic-iswc-2009-invited-talk |
| 6 |
|
| 7 |
# owl restriction |
| 8 |
:aaa owl:onProperty :bbb. |
| 9 |
:aaa owl:allValuesFrom :ccc. |
| 10 |
|
| 11 |
# the following 2 triples should entail :yyy a :ccc. |
| 12 |
#:xxx a :aaa. |
| 13 |
#:xxx :bbb :yyy. |
| 14 |
|
| 15 |
# the following codex should entail :xxx a :aaa. |
| 16 |
(_:y) log:onNegativeSurface { |
| 17 |
:xxx :bbb _:y. |
| 18 |
() log:onNegativeSurface { |
| 19 |
_:y a :ccc. |
| 20 |
}. |
| 21 |
}. |
| 22 |
|
| 23 |
# owl:allValuseFrom description logic |
| 24 |
(_:a _:b _:c) log:onNegativeSurface { |
| 25 |
_:a owl:onProperty _:b. |
| 26 |
_:a owl:allValuesFrom _:c. |
| 27 |
() log:onNegativeSurface { |
| 28 |
(_:x _:y) log:onNegativeSurface { |
| 29 |
_:x a _:a. |
| 30 |
_:x _:b _:y. |
| 31 |
() log:onNegativeSurface { |
| 32 |
_:y a _:c. |
| 33 |
}. |
| 34 |
}. |
| 35 |
(_:x) log:onNegativeSurface { |
| 36 |
(_:y) log:onNegativeSurface { |
| 37 |
_:x _:b _:y. |
| 38 |
() log:onNegativeSurface { |
| 39 |
_:y a _:c. |
| 40 |
}. |
| 41 |
}. |
| 42 |
() log:onNegativeSurface { |
| 43 |
_:x a _:a. |
| 44 |
}. |
| 45 |
}. |
| 46 |
}. |
| 47 |
}. |
| 48 |
|
| 49 |
# query |
| 50 |
() log:onNegativeSurface { |
| 51 |
:xxx a :aaa. |
| 52 |
() log:onNegativeAnswerSurface { |
| 53 |
:xxx a :aaa. |
| 54 |
}. |
| 55 |
}. |