Table Of ContentImplementing OWL Defaults
VladimirKolovski1andBijanParsia2andYardenKatz1
1 DepartmentofComputerScience,
UniversityofMaryland,CollegePark,MD20742,USA,
[email protected],[email protected]
2 SchoolofComputerScience
TheUniversityofManchester,
[email protected]
Abstract. WhileithasbeenarguedthatknowledgerepresentationfortheWorld
WideWebmustrespecttheopenworldassumptionduetothe“open”natureof
theWeb,usersoftheWebOntologyLanguage(OWL)haveoftenrequestedsome
formofnon-monotonicreasoning.Inthispaper,wepresentpreliminaryoptimiza-
tionsandanimplementationofarestrictedversionofReiter’sdefaultlogicasan
extensiontothedescriptionlogicfragmentofOWL,OWLDL.Weimplementthe
decisionprocedureforthislogicintheOWLDLreasonerPellet,andexploitits
supportforincrementalreasoningthroughupdatetoimproveperformance.We
also extend an open source ontology editor SWOOP with default rules editing
support.
1 Introduction
TheWebOntWorkingGroupidentifiedtwoobjectives3concerning,atleastpotentially,
non-monotonicity,andyettheresultingWebOntologyLanguage(OWL)isthoroughly
monotonic.Bothobjectives(someformofdefaults,i.e.,“defaultpropertyvalues”,and
an unspecified version of the closed world assumption) could be plausibly met with
Reiter’sdefaultlogic,whichisoneofthemoststudiednon-monotoniclogics.
Reiter’s default logic (or simply default logic henceforth), while very expressive,
is, like many non-monotonic formalisms, known to be computationally difficult even
in the propositional case. In [1], Baader and Hollunder showed that even a restricted
form of defaults coupled with a description logic that contains a smaller set of class
constructorsthanOWL-DL4isundecidable.Theyalsoshowedthatifonerestrictedthe
defaults to apply to only to named individuals (or, equivalently, restricted the logic to
closeddefaults),thenarobustdecidabilityensued.Thedecisionprocedureproposedin
thatpaperproveddifficulttoimplementwithreasonableefficiencyandtheproposalhas
languishedeversince.
However,thestateoftheartindescriptionlogicreasonershasadvanced,andthere
have been recent developments in the OWL-DL reasoner Pellet that suggest that a
3SeeO2andO3intheusecasesandrequirementsdocumentathttp://www.w3.org/TR/webont-
req/
4ThelogicthatBaaderandHollunderuse(ALCF)incorporatesfeatureagreements,whichare
notpartofOWL-DL,sowecannotclaimitisasubset.
Report Documentation Page Form Approved
OMB No. 0704-0188
Public reporting burden for the collection of information is estimated to average 1 hour per response, including the time for reviewing instructions, searching existing data sources, gathering and
maintaining the data needed, and completing and reviewing the collection of information. Send comments regarding this burden estimate or any other aspect of this collection of information,
including suggestions for reducing this burden, to Washington Headquarters Services, Directorate for Information Operations and Reports, 1215 Jefferson Davis Highway, Suite 1204, Arlington
VA 22202-4302. Respondents should be aware that notwithstanding any other provision of law, no person shall be subject to a penalty for failing to comply with a collection of information if it
does not display a currently valid OMB control number.
1. REPORT DATE 3. DATES COVERED
2006 2. REPORT TYPE 00-00-2006 to 00-00-2006
4. TITLE AND SUBTITLE 5a. CONTRACT NUMBER
Implementing OWL Defaults
5b. GRANT NUMBER
5c. PROGRAM ELEMENT NUMBER
6. AUTHOR(S) 5d. PROJECT NUMBER
5e. TASK NUMBER
5f. WORK UNIT NUMBER
7. PERFORMING ORGANIZATION NAME(S) AND ADDRESS(ES) 8. PERFORMING ORGANIZATION
University of Maryland,Department of Computer Science,College REPORT NUMBER
Park,MD,20742
9. SPONSORING/MONITORING AGENCY NAME(S) AND ADDRESS(ES) 10. SPONSOR/MONITOR’S ACRONYM(S)
11. SPONSOR/MONITOR’S REPORT
NUMBER(S)
12. DISTRIBUTION/AVAILABILITY STATEMENT
Approved for public release; distribution unlimited
13. SUPPLEMENTARY NOTES
The original document contains color images.
14. ABSTRACT
15. SUBJECT TERMS
16. SECURITY CLASSIFICATION OF: 17. LIMITATION OF 18. NUMBER 19a. NAME OF
ABSTRACT OF PAGES RESPONSIBLE PERSON
a. REPORT b. ABSTRACT c. THIS PAGE 10
unclassified unclassified unclassified
Standard Form 298 (Rev. 8-98)
Prescribed by ANSI Std Z39-18
2
reasonable implementation of a default logic reasoner can be achieved. These devel-
opments include tableau tracing for the description logic SHOIN and incremental
reasoningsupport.Inthispaper,wepresentaprototypeimplementationofthe“termi-
nologicaldefaults”ofBaaderandHollunderbasedontheabovedevelopments.Tableau
tracingallowsustouseSHOIN astheunderlyingdescriptionlogicoftheterminolog-
icaldefaults,hencethetermOWLdefaults.WeprovideUIforthisdefaultsreasonerby
extendingopensourceontologyeditorSwoop[10].Weshowthroughempiricalevalu-
ationthatthisprototypeperformsreasonablyoverall,butalsodoesfairlywellinsome
caseswhencomparedtothepropositionaldefaultlogicreasoner,XRay.
2 Background
2.1 DefaultLogic
Reiter’sdefaultlogicisanonmonotonicformalismforexpressingcommonsenserules
ofreasoning.Theserules,calleddefaultrules(orsimplydefaults),areoftheform:
α : β
γ
where α,β,γ are first-order formulae. We say α is the prerequisite of the rule, β is
thejustificationandγ theconsequent.Intuitively,adefaultrulecanbereadas:ifIcan
provetheprerequisitefromwhatIbelieve,andthejustificationisconsistentwithwhat
Ibelieve,thenaddtheconsequenttomysetofbeliefs.ForasetofdefaultrulesD,we
denote the sets of formulae occurring as prerequisites, justifications, and consequents
inDbyPre(D),Jus(D),andCon(D),respectively.
Definition1 AdefaulttheoryisapairhW,DiwhereW isasetofclosedfirst-order
formulae (containing the initial world description) and D is a set of default rules. A
defaulttheoryisclosediftherearenofreevariablesinitsdefaultrules.
Possiblesetsofconclusionsfromadefaulttheoryaredefinedintermsofextensions
ofthetheory.Extensionsaredeductivelyclosedsetsofformulaethatalsoincludethe
original set of facts from the world description. Extensions are also closed under the
application of defaults in D - we keep applying default rules as long as possible to
generateanextension.
Default rules can conflict. A simple example is when two defaults d and d are
1 2
applicableyettheconsequentofd isinconsistentwiththeconsequentofd .Wethen
1 2
typically end up with two extensions: one where the consequent of d holds, and one
1
wheretheconsequentofd holds.
2
2.2 TerminologicalDefaultTheories
Inthissection,wepresentsomedefinitionsfrom[1]andtheiralgorithmforcomputing
allextensionsofadefaulttheory(whichwasthebasisforourimplementation).
3
Definition2(TerminologicalDefaultTheory) A terminological default theory is a
pair hW,Di where W is a SHOIN knowledge base and D is a finite set of default
ruleswhoseprerequisites,justifications,andconsequentsareconceptexpressions.
Aterminologicaldefaulttheoryisnotnecessarilydecidable-infact,[1]showsthata
defaulttheoryhW,DiwhereW isanALCF logicisundecidableduetoskolemization
in Reiter’s treatment of open defaults. In order to retain decidability, [1] proposes a
restrictedsemantics:defaultrulesareonlyapplicabletonamedindividuals.Thus,aset
ofdefaultsDisinterpretedasrepresentingthecloseddefaultsobtainedbyinstantiating
the free variable by all individual names occurring in W. Baader and Hollunder also
show that as long as the underlying logic language is decidable, with this restricted
semanticstheproblemofcomputingalloftheextensionsisalsodecidable.
Reasoning with Terminological Defaults For sake of completeness, we describe in
thissectionthealgorithmfrom[1]forcomputingalloftheextensionsofaterminolog-
icaldefaulttheory.Ourimplementationandoptimizationsarebasedonthisalgorithm.
Definition3(GroundedSetofDefaults) LetWbeasetofclosedformulae,andDbe
asetofcloseddefaults.WedefineD =∅and,fori≥0,
0
α : β
D =D ∪{d= d∈DandW ∪Con(D )|=α}
i+1 i γ i
S
ThenDiscalledgroundedinW iffD = D
i≥0 i
Themainreasoningserviceprovidedistheprocedurethatcomputesalloftheexten-
sionsofaterminologicaldefaulttheoryD.Theprocedureworksinatop-downfashion:
itstartswiththesetofallgrounddefaultsD ,andtheninspectsifthereisaconflicting
0
defaultdinthatset(i.e.,thejustificationofdconflictswithW ∪Con(D )).Thereare
0
twowaystoeliminatetheconflictandtheproceduredoesboth.First,itsimplyremoves
thedefaultdfromD andappliesitselfagaintothesmallersetD \d.Theotherway
0 0
istokeepdinD ,andpruneotherdefaultsthatcausetheconflict.Inotherwords,fora
0
conflictingdefaultd,theprocedureisalsoinvokedwiththemaximalsubsetsD0 ofD
0
s.t.d∈D0andthejustificationofddoesnotconflictwithW∪Con(D0).Itisshownin
[1]howfindingthemaximalsubsetsofD abovereducestotheproblemofcomputing
0
maximally consistent subsets: given two sets W and D , find the maximal subsets of
0
D0 ∈D s.t.W ∪D0isconsistent.
0
3 Optimizations
TothebestofourknowledgetherehasbeennoadaptationofBaaderandHollunder’s
algorithmtoOWL-DL.Recently,however,therehasbeenworkinDescriptionLogics
thathasallowedustoadaptthealgorithmandoptimizeittoproduceaworkingimple-
mentation. First, there is a practical tableau tracing algorithm [11] with low overhead
which can be used solve the problem of computing maximally consistent subsets for
4
more expressive logics (up to SHOIN). Second, there has been recent work on op-
timizingreasoningfordynamicAboxes[8].Thisworkallowsustooptimizethecon-
sistency check every time there is an update to the working set of defaults D . Third,
0
weproposeatechniqueforgeneratingpossible(candidate)extensionsinabottom-up
fashion.Wediscussallofthesetechniquesinthissection.
3.1 FindingMaximallyConsistentSubsets
Inthissection,weexplainhowweapplyrecentworkintableautracinganddebugging
OWL ontologies to solve the problem of finding the maximal subsets D0 ∈ D such
thatCon(D0)∪W isconsistent.Theapproachin[1]introducesclashformulaeforthis
problem-insteadweusejustifications.AjustificationforanABoxinconsistencyisa
minimalfragmentoftheKBinwhichtheABoxisinconsistent.Justificationsarecom-
putedbyatracingfunctionthatrecordsthechangesinthetableauandtheaxiomsand
non-deterministicchoicesthatareresponsibleforthosechanges.Wereferthereaderto
[11]formoredetails.
Every justification contains DL axioms which are responsible for the particular
clash.Inourcase,theseaxiomscomeeitherfromW orCon(D).Ajustificationwhere
alloftheaxiomscomefromW indicatesthatW byitselfisinconsistent.Inthispaper,
withoutlossofgenerality,wewillassumethatW isconsistent5.Thus,everyjustifica-
tionwillcontainatleastoneaxiomfromCon(D).
In order to find the maximally consistent subsets of Con(D), the first step is to
findallofthejustificationsfortheinconsistencyofW∪Con(D).Usingtheinformation
fromthosejustifications,thenwecandeterminetheminimumnumberofaxiomscom-
ingfromCon(D)thatshouldberemovedtorenderW∪Con(D)consistent.Weusethe
algorithmfrom[9]tofindalljustifications:itdoestableautracingtofindonejustifica-
tionandReiter’sHittingSetTree(HST)algorithm[14]tofindallotherjustifications.
TheintuitionbehindtheusageoftheHittingSetreliesonthefactthatinordertomake
the KB consistent, one needs to remove from the KB at least one axiom from each
justification.
Aftercomputingalljustifications,thenextstepistodeterminewhatisthesmallest
setofaxiomsthatweneedtoremovetomakeitconsistent.Becauseofthenatureofthe
justifications, we only need to remove one axiom from each justification to make the
KBconsistent.Itisimportanttonoteherethateventhoughtheaxiomsinajustification
cancomefromeitherW orCon(D),weareonlyinterestedinremovingaxiomsfrom
Con(D). Thus, we pre-process each justification, discarding the axioms coming from
W andonlyleavingtheaxiomsfromCon(D).
Atthispoint,weapplyReiter’sHSTalgorithmagainontheprunedjustificationsto
obtaintheminimumsetcover.Forexample,forthesetofjustificationsS ={{a},{a,b},{c},{c,d}}
theminimalhittingsetis{a,c}.Thisminimalhittingsetgivesusthesmallestsetofax-
iomsfromCon(D)thatweneedtoremovetomakeCon(D)∪W consistent.Notethat
atthispoint,therearenoconsistencychecksperformedwhilecomputingtheminimal
hittingsets(unlikethepreviousapplicationofReiter’salgorithm)andthejustifications
5InthecaseWisinconsistent,thenthereisonlyoneextensionconsistingofalloftheformulae
5
containless.Nonetheless,wehaveobservedthatthistaskisthebottleneckofthesystem
duetotheexponentialnatureofthehittingsettreealgorithm.
3.2 ABoxUpdates
In the procedure described in Section 2.2 often there are incremental changes to the
workingsetofdefaultsD :eithertheconflictingdefaultsisremoved,oraminimalset
0
ofotherdefaultsthatcausetheconflict.Thesemodificationsareequivalentofremov-
ing (and adding) type assertions to W∪ Con(D ), thus reasoning time overall would
0
improveifweusedaDLreasoneroptimizedforABoxupdated.
IncrementalConsistencyChecking Therecentworkthatweusedwas[8],whichisan
approach for incrementally updating tableau completion graphs under ABox updates.
Theirideaisnottothrowawaytheoldcompletiongraphafteranupdate.Instead,the
update algorithm adds new (resp. removes existing for deletions) components (edge
and/or nodes) induced by the update to the old completion graph; after this, standard
tableau completion rules are re-fired to ensure that the model is complete. Therefore
thepreviouscompletionisupdatedsuchthatifamodelexists(i.e,theKBisconsistent
after the update) a new completion graph will be found. In [8], it was observed that
updatesdidnothavealargeeffectontheexistingcompletiongraph,thereforeordersof
magnitudeperformanceimprovementsareachieved.
Applying Incremental Reasoning The incremental reasoning techniques can be ap-
pliedinanumberofplacesinthealgorithmfrom[1]toimproveoverallperformance.
First,weusethemtocomputethelargestgroundsubsetofrules-thepseudo-codefor
thisprocedureisgiveninFigure3.2.
functionFind-Largest-Grounded-Subset(W,D)
begin
(1) D =∅,changed=true
l
(2) whilechangeddo
(3) changed=false
(4) foreachd =α:β/γ ∈D\D
i l
(5) ifW∪Con(D)|=αthen
l
(6) incupdate(W,γ,add)
(7) D =D ∪{d }
l l i
(7) changed=true
(8) returnD
l
end
Fig.1.Pseudo-codetogetthelargestgroundedsubset.Itisimportanttonoteline(6)whichin-
crementally updates the world description W with a new type assertion. In line (5), to check
whetherW ∪Con(D )|=αwesimplyincupdate(W,¬α,add)andinspecttheupdatedcom-
i
pletiongraph.
6
Another application of the ABox updates is in the procedure of finding all justifi-
cations(Section3.1).Whilebuildingthehittingsettree,insteadofrebuildingthecom-
pletion graph from scratch (when removing or adding axioms) we update only those
portionsaffectedbythechange.
3.3 GeneratingCandidateExtensions
Considering that the bottleneck of the algorithm that computes the extensions is in
the subtask that computes the maximally consistent subsets (empirical results are in
Section 5), we introduce here another optimization aimed at reducing the number of
calls to the afore-mentioned subtask. The purpose of this optimization is to find the
obvious conflicts and generate approximate extensions before the algorithm in [1] is
used. The optimization is based on the idea of generating extensions bottom-up, as
exploredin[12,3].Defaultsthatconflictareplacedintoseparateextensions.However,
whendeterminingwhetherdefaultsd andd conflict,wesimplifytheconflictdetection
1 2
bytakingonlytheworlddescriptionWintoaccount,andignoringthecurrentextension.
Followingweprovideadefinitionofobviouslyconflictingdefaults.
Definition4(ObvioislyConflictingRules) ForadefaulttheoryhW,Diwedefinetwo
closeddefaultsd ,d ∈ D tobeobviouslyconflictingiffatleastoneofthefollowing
1 2
holds:
W ∪Con(d )|=¬Jus(d ), W ∪Con(d )|=¬Con(d ),
1 2 1 2
W ∪Con(d )|=¬Jus(d )orW ∪Con(d )|=¬Con(d )
2 1 2 1
To find all of the obvious conflicts, we use a naive O(N2) algorithm where N is
thenumberofcloseddefaults.Notethatinthiscasewecanagainexploitincremental
reasoningtechniques.Usingtheinformationabouttheconflicts,weproceedtogenerate
possible extensions. Since the extensions are built only on the basis of the simplified
idea of obvious conflicts, and are different from extensions in terminological default
theories,wecallthemcandidateextensions.
Definition5(CandidateExtension) LetT = hW,Dibeacloseddefaulttheory.Let
D ={α:β/γ | α:β/γ ∈DandW |=α}.
g
LetS =∅and∀i≥0define:
0
S =S ∪{d|d∈D andthereisnohs.t.h∈S andconflict(d,h)}
i+1 i g i
Then S ∪ {D \ D } is a set of generating defaults of a candidate extension iff
g
S
S = S .
i≥0 i
Tocomputethecandidateextensions,wefollowtheabovedefinition:workingonly
withthesetofdefaultsthatisgroundw.r.t.theworlddescriptionW,webuildcandidate
extensionsusingbacktrackingsearchmakingsurethatnotwo”obviously”conflicting
defaults are in the same extension. Then to each generated extension we append the
setofnon-grounddefaults(defaultsnotusedinthesearch).Thesecandidateextensions
are passed to the main (top-down) procedure where the rest of the conflicts are found
andpruned.Wehaveevaluatedtheimpactofcandidateextensions(resultsavailablein
Section5)andtheinitialresultsareencouraging.
7
4 Implementation
Wehaveapreliminaryimplementationofouroptimizations.Itisprovidedasanexten-
siontoanopensourceDLreasoner[13]anditprovidesrealizationofindividualswith
terminologicaldefaultrules,witheithercredulousorskepticalreasoning.Wehavealso
providedaUIfordefaultsbyextendingtheopensourceOWLOntologyeditorSwoop
[10].Morespecifically,weaddedsupportfordefaultrulesediting(showninFigure2)
andinformingtheuseroftheinferencesmadebytherules.Also,weupdatethecurrent
ontologywiththesetofinferredfactsfromthedefaults.
Fig.2.Screenshotofdefaultseditor
5 Evaluation
Toevaluateourimplementation,weusedanIBMThinkPadT42withPentiumCentrino
1.6GHzprocessorand1.5GBofmemory.Firstweshowtheperformancebenefitsofin-
crementalreasoningsupportandgeneratingcandidateextensions.Theontologiesused
forthesetestsweremodifiedversionsoftheLehighUniversityBenchmark(LUBM)[7],
withtwoopendefaultrulesoftheNixondiamondshape.Thenumberofextensionsis2i
(Columnext.),whereiisthenumberof’Nixon’individuals.Performanceresults(times
inseconds)areshowninTable1.Cand ext isthetimespentgeneratingthecandidate
8
extensions,groundedisthetimespentcomputinglargestgroundedsubsets,andHST is
thetimespentcomputingmaximallyconsistentsubsets.Thebenefitofcandidateexten-
sionsbecomesobviousincaseswithmoreextensionsforadefaulttheory.
Size fully-optimized updates-only not-optimized
indsext.cand ext HST totalgrounded HST totalgrounded HST total
50 8 .291 .300 .631 .803 .770 1.513 .952 1.671 2.553
100 8 .731 .3111.122 1.192 .861 2.003 2.585 1.902 4.447
200 8 2.504 .4303.084 1.9831.101 3.165 11.446 2.93414.190
50 64 .2911.2411.933 3.5474.364 8.462 3.46610.36514.141
100 64 .7611.4522.763 4.4085.08610.515 5.98714.05221.601
200 64 2.6131.9935.597 6.6117.61016.614 20.29220.47643.072
Table1.Comparisonofthreeversionsofpellet-defaults.Not-optimizeddoesnotgenerateany
candidateextensionsorperformreasoningwithupdates.Updates-only,includestheincremental
reasoning support but not the candidate extensions. Fully-optimized includes all of the tech-
niquespresentedinthispaper.
Next,wepresentacomparisonofourtoolwithXRay[5],whichisapopularProlog-
basedimplementationforquery-answeringinpropositionaldefaultlogics,andsmodels
[12],animplementationofthestablemodelsemanticsforlogicprogramswithnegation
as failure. The first set of defaults rules that we used was a set of sample defaults on
XRay’shomepage[6]:
Student:Student Student:Student Student:Adult
d = d = d =
1 Adult 2 ¬Employed 3 ¬Married
Adult:¬Student Adult:¬Student
d = d =
4 Employed 5 Married
This theory has only one extension (where only {d ,d ,d } are fired for each
1 2 3
namedindividual).Unfortunately,since(tothebestofourknowledge)smodelsdoesnot
supportclassicalnegation,wecouldnotevaluateitsperformanceforthesetestcases.
Thesecondtestcaseisadefaulttheorywithonlytwoopendefaults,oftheNixon
diamondshape.ResultsareshowninTable2.Inthecasewhentherearefewextensions,
ourapproachoutperformsXRay,eventhoughouralgorithmisnotspecificallytunedfor
propositional default logics. In the second example, in cases with a lot of extensions,
wedonotfareaswell.
6 RelatedWork
The majority of reasoners for default logic focus on propositional default theories,
where quantifiers are not allowed. Two capable systems in this group that are com-
9
TypeandSizeofKB Pellet-defaults XRaysmodels
Type Size Ext. grounded HST total total total
50 1 .181 .370 .615 1.472 N/A
xrayex. 100 1 .5 .541 1.090 4.637 N/A
500 1 15.1421.71215.252timeout N/A
3 8 .03 .15 .2 .03 .02
Nixon 6 64 .130 .280 .63 .11 .04
11 2048 2.1833.3751.0745 .180 1.444
Table2.EvaluationResultsforcomputingalloftheextensions.
parable in functionality include XRay [5] and DeReS [3]. However, the restricted ex-
pressivity of the languages these reasoners handle make them of limited interest for
OWLreasoning.ItwouldbeunrealistictoignoremanyofOWL’skeyconstructs−e.g.
existential,universal,andcardinalityrestrictions−forthebenefitofaddingdefaultrules.
Smodels [12] and dlv [4] are both efficient implementations of the answer set se-
mantics. Since the answer set (or stable models) semantics for logic programs can be
embedded into Reiter’s default logic (an answer set is analogous to a default theory
extension),thesesystemscanalsobeseenasdefaultlogicreasoners.Themaindiffer-
ence with our approach is that we are description logic-based, whereas they use logic
programmingtechniques.
7 DiscussionandFutureWork
Itisobviousfromtheevaluationthatourapproachdoesnotworkwellwithdefaultthe-
orieswithlotsofextensions.Thereasonisthatthenumberofextensionsisdetermined
bythenumberofconflictingrules.Everytimeaconflictingdefaultisdetected,thesub-
task to compute the maximally consistent subsets procedure is executed (which is the
bottleneckofoursystem).Agoalforfutureoptimizationscouldbetoavoidcallingthis
subtaskasmuchaspossible.Wehavetakenthefirststepwiththebottom-upgeneration
ofcandidateextensions.However,furtherworkisneeded.Webelieveitispossibleto
achievemuchmoreaccurateandefficientgenerationofcandidateextensions,basedon
thetechniquesin[12,3,2].
Intermsofexpressivity,animportantnextstepwouldbetohandleoneofthemany
prioritized default logics, where default rules are partially ordered to determine pre-
ferredextensions.
8 Acknowledgements
ThankstoChristianHalaschek-Wiener,AdityaKalyanpurandEvrenSirinforhelpful
comments and discussions. This work was supported in part by grants from Fujitsu,