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.

Followingarethedetaileddescriptionsofallthe<strong>Hermes</strong>operations: 160B.5.PostconditionFunctions B.6OperationDescriptions add(result,source1,source2) TypeRules: Preconditions: source12numeric init(source2) init(source1) result2numeric resultsource1source2 source22numeric Exceptions:Depletion<br />

Description:Storethesumofsource1<strong>and</strong>source2inresult. Qualier:absent var(result) Postconditions:<br />

<strong>and</strong>(result,source1,source2) makeinit(result)<br />

TypeRules: Preconditions: source12boolean result2boolean resultsource1source2 source22boolean Exceptions:Depletion Seex11.4,p.104<br />

Description:Ifbothsource1<strong>and</strong>source2aretrue,thensetresultto Qualier:absent var(result) true.Otherwisesetresulttofalse. init(source2) init(source1) Postconditions: makeinit(result)<br />

assert(...)Exceptions:Depletion,ConstraintError,ConstraintFailure TypeRules:SeeSpecialRules Preconditions: assertable() Postconditions: asserted() Seex11.4,p.105<br />

SpecialRules:Thenumberofoper<strong>and</strong>smustequalthenumberofparametersdeclaredinthedenitionoftheattributenamedinthestatement<br />

attributeparameter. qualier.Eachoper<strong>and</strong>mustalsomatchthetypeofthecorresponding

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

Saved successfully!

Ooh no, something went wrong!