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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

172B.6.OperationDescriptions for{inspect(continued) SpecialRules:Thestatementqualiercontainsaselector.Theresult <strong>and</strong>musthavetheinitattributeonnormalexitfromtheselector.The oftheforinspectstatement.Theentrytypestateofthebodyclause typeoftheelementvariableidentiedintheselector,<strong>and</strong>thatofthe typeoftable.Theentrytypestatefortheselectoristheentrytypestate elementvariableidentieddirecltyinthequalier,mustbetheelement variableidentiedinthatselectormustbeoftypepredefined!boolean identiedinthequalierincludesinitoftheelementvariableidentied inthequalier,plusallattributesinthemeetof(1)theexittypestate oftheselector,minusanyattributesinvolvingtheselector'sresultor<br />

Description:Executethestatementscontainedinthescopeidentiedby typestateonnormalterminationoftheforinspectstatementcontains elementvariable;<strong>and</strong>(2)theexittypestateofthebodyclause(an iterativesolutionisrequiredforthis,asdescribedinSection).The<br />

ier.Duringexecutionofthebody,theinspectvariable(alsoidentied foreachelementoftablethatsatisestheselectoridentiedinthequal-<br />

theinstructionqualierrepeatedly.Thestatementsareexecutedonce oranyvariabledeclaredinthebody.SeeSectionforadiscussionof howtypestatesarecomputedforselectors. alltheattributesinthenormalexittypestateofthebodyclause,minus<br />

inthequalier)issettoaconstantcopyofthecurrentmatchingtableelement.Iftableisordered,matchingelementswillbeinspectedin<br />

theordertheyappearintable.tableitselfisnotheldconstantduring executionsofthebody.<br />

anyattributesinvolvingtheelementvariableidentiedinthequalier<br />

Qualier:inspecttable greater(result,source1,source2) TypeRules: Preconditions: source12orderedscalar result2boolean source1source2 source22orderedscalar Exceptions:Depletion Seex11.6,p.113<br />

var(result) init(source2) init(source1) Postconditions: makeinit(result)

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

Saved successfully!

Ooh no, something went wrong!