Catalysis framework in first-order logic

  • 格式:pdf
  • 大小:186.29 KB
  • 文档页数:20

CatalysisFrameworksinFirst-OrderLogic

Shui-MingHoandKung-KiuLau

DepartmentofComputerScience,UniversityofManchester,

ManchesterM139PL,UnitedKingdom

{sho,kung-kiu}@cs.man.ac.uk

Abstract

Piecesofcodearenottheonlyreusableartifactsfromsoftwaredevelopment.Recurringpatternsoccurinmodels,specifications,andcollaborations.Classesarenotthemostinter-estingunitfordescribingdesigns;itisthecollaborationsandrelationshipsbetweenthemthatconstitutetheessenceofanydesign.Inthecomponent-baseddevelopmentmethodCatalysis,collaborationframeworksareabstractmodelsofrecurringpatterns.Inthispaperwedescribeanapproachforcharacterisingsuchframeworksinfirst-orderlogicwithagoaltoprovidetoolstosupporttheircompositionandprototyping.

1Introduction

AlthoughtheUnifiedModellingLanguage[18](UML)hasbecomethedefactostandardin

nearlyallapplicationdevelopmentmodelling,itsapplicationtocomponent-basedsoftwarede-

velopmenthasnotbeenobvious.InthepastthefocusonusingOOtoleveragecomponent-based

developmenthasresultedinaconfusionbetweencomponentsandobjects;therehasevenbeen

aclaimthatcomponentsarespecialkindsofcomponents.WorkbyCheesmanandDanielson

UMLComponents[6]hasattemptedtobridgethegapbetweenOOandcomponent-basedde-

velopment.IntheirworktheydescribehowUMLmaybeadaptedforcomponentspecification.

Byrepresentingcomponentsasstereotypedclasses,itispossibletoapplytheideasofDesign

byContract[15]totheircomponentsusingtheObjectConstraintLanguage(OCL)[19].

Inthepasttherehasbeenanincreasedinterestinthepotentialreusabilityvalueofobject-

orienteddesigns,e.g.,object-orienteddesign(OOD)frameworks.Typicaldesignartifactsin

OOareusuallyaboutgroupsofinteractingobjectsratherthansingleobjectsorclasses.Tradi-

tionally,OODframeworksdescribegroupsofinteractingobjectswithinsomespecificproblem

domain.Designpatternsabstractawayfromsuchframeworksbydescribinggeneralisedrecur-

ringpatternsofinteraction.Inthecomponent-baseddevelopmentmethodCatalysis[9]thecon-

ceptsofOODframeworksanddesignpatternsarebroughttogether.Catalysisframeworks,alsoCatalysisFrameworksinFirst-OrderLogic102

Personowner

1drives

1CarPersonAsDriver

Figure1:Apersonplayingtheroleofadriver.

knownastemplatepackages,areabstractmodelsofcollaborationswhichmaybepiecedtogether

toformnewframeworkstailoredtospecificproblemdomains.InCatalysis,suchframeworksare

representedusingacombinedclassdiagramandcollaborationdiagramnotation.Assuch,UML

lacksastandardnotationforrepresentingvariouspropertiesofCatalysisframeworks.Although

notdirectedspecificallytowardsCatalysisframeworksinmind,thereexistsabodyofworkon

howsuchpropertiesmaybeexpressed.Amongtheseis[7],whichlooksathowthepackage

extensionandtemplatemechanisms,firstintroducedbyCatalysis,andwhichareattheheart

offrameworkcompositioninCatalysis,maybeincorporatedintoUML.Numerousworks,e.g.,

[13],addresstheissueofhowOCLmaybeextendedtoincludetemporalconstraints.

InthispaperwelookathowCatalysisframeworksmaybecharacterisedinfirst-orderlogic

withequality.Manyapproachestoobjectmodellinguseeithertemporallogicordynamiclogic

torepresentthedynamicpropertiesofobjects.In[11],forexample,modulardistributedlogic

isusedtodescribethesynchronousandasynchronousactionsbetweenframeworks.Inour

approach,insteadofusinganyspecificspecialisedlogicalformalism,weuseasimplenon-reified

temporallogicbasedaroundtheuseofstatehistoriestorecordhowthestatesofobjectsevolve

overtimeandtime-stampactions.Ouraimistoworktowardsbuildinglibrariesofreusable

frameworksandtoenableconsistencycheckingofthecompositionofsuchframeworks.

Theremainingpartofthispaperisasfollows.InthenextsectionwebrieflyintroduceCatalysis

frameworksandoutlinetheideasbehindtheirapplicationinobject-orientedmodelling.Nextwe

introducetheconceptsbehindourcharacterisationoftheseframeworksinfirst-orderlogicand

brieflydiscusstheirapplicationinasmallexampleofaplanningproductionsystem.Finally,

weconcludewithadiscussionofrelatedworkanddirectionsforfuturework.

2CatalysisFrameworks

Figures1and2showhowtwotypicalframeworks,eachdescribingadifferentview(orrole)

ofaperson,arerepresentedinCatalysis.Thefirstframeworkdescribesapersonactingas

driversandshowsthestaticrelationshipsbetweenpeopleandtheircars.Theseconddescribes

apersonasanemployeeandalsoincludesanactionemployinwhichacompanyandaperson

bothcollaborate.Suchanactioniscalledajointactionbecauseitoccursbetweenanumberof

participants,noneofwhichareassignedresponsibilityforinvokingtheaction.Objectmethods,

ontheotherhand,arecalledlocalactionsbecausetheresponsibilityforinvokingthemresides

withasingleclass.

ReportNo.284,September2003UNU/IIST,P.O.Box3058,Macau