28.01.2015 Views

Hermes: A Tutorial and Reference Manual - Researcher - IBM

Hermes: A Tutorial and Reference Manual - Researcher - IBM

Hermes: A Tutorial and Reference Manual - Researcher - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

thecompilertoforgetthattheprogramvalueP.Bhasbeenchecked,becauseitisbeinginsertedintoatablecontainingprogramvalueswhicever,thereisan\extra"attribute|checked(P.B).Thecoerciondrop<br />

9010.7.HowtoApplytheTypestateRules areinitializedbutnotchecked.Whenthevalueisremovedfromthetable,itwillbeassumedtobeunchecked.Thetypestateisnowfinit(I),<br />

arepresentinthetypestate,thereisno\missingattribute"error.How-<br />

init(R),init(P),init(P.A),init(P.B)g. iedbytheoperation.Fromthisrule,weinferthatP<strong>and</strong>Rmustnotbe constant.Iftheyare,thecompileragsanerror. Therulesvar(table)<strong>and</strong>var(element)tellsuswhichoper<strong>and</strong>saremod-<br />

checked(P.B)isinsertedtodropthechecked(P.B)attribute.Thiscauses<br />

TheDepletionexceptionwasdeterminedfromtheexceptionlist,because ofexceptionswhichcouldberaised. everyinsertoperationcanraisethisexception.TheDuplicateKeywas tableRwasdenedaskeyed,<strong>and</strong>ifso,toincludeDuplicateKeyintheset calreasons,itisincludedwiththepreconditionrules<strong>and</strong>evaluatedwhen preconditionsareevaluated.Theeectoftheruleistocheckwhetherthe derivedbyevaluatingthepredicateduplicatekey(table),becauseonly Thepossibleoutcomesofinsertare:normal,Depletion,<strong>and</strong>DuplicateKey. The\rule"duplicatekey(table)isnotapreconditionrule.Fortechni-<br />

insertionsintokeyedtablescanraisethisexception. rules.Forinsert,theserulesare: Thepostconditionfornormalexitisdeterminedbythepostcondition<br />

Therulekillconstraints(table)dropsanyconstraintattributesofthe executed.Sothetypestateassociatedwiththetwoexceptionoutcomes isalsofinit(I),init(R),init(P),init(P.A),init(P.B)g.Forthis reason,exceptionpostconditionsarenotshowninthetable. changedvalue<strong>and</strong>anunchangedtypestate|asiftheoperationhadnot tributesofP<strong>and</strong>itscomponents|namelyfinit(P),init(P.A),init(P.B)g. Therulemakeuninit(element)makesPuninitializedbydroppingallat-<br />

(makeuninit(element),killconstraints(table))<br />

table|therewerenone.ThepostconditionfunctionsareexplainedinsectionB.5.<br />

Exceptforthecallstatement,allexceptionoutcomesproduceanun-<br />

Theinitialtypestateisoneinwhichtheinitializationportisinitialized<strong>and</strong> init(R)g. 10.8TheCheckingAlgorithm noothertypestateattributesarepresent. Sothetypestateassociatedwithnormalcompletionofinsertis:finit(I),<br />

quired<strong>and</strong>forbiddenattributespriortotheoperation,<strong>and</strong>theadded<strong>and</strong> Ateachstatement,therulesinthetableareusedtodeterminethere-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!