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.

Followingaretheinferencefunctionsappearingininferencerules.Each B.3InferenceFunctionsAppendixB.<strong>Hermes</strong>Operations155 typemustbethetypeinferredbythegiveninferencefunctionfromthe inferencefunctioninfersatypefromitsoper<strong>and</strong>.Aninferencerulerelates twooper<strong>and</strong>s,asource<strong>and</strong>atarget,byspecifyingthattargetoper<strong>and</strong>'s sourceoper<strong>and</strong>'stype. casetypeof(oper<strong>and</strong>):Thesourcetypeisinclassvariant.Thetar-<br />

sameas(oper<strong>and</strong>):Thetarget<strong>and</strong>sourceoper<strong>and</strong>smusthavethe matchinginportof(oper<strong>and</strong>):Thesourcetypeisinclassoutport. gettypeistheenumerationtypeappearinginthesourcetype'sde-<br />

sametype.1<br />

messagetypeof(oper<strong>and</strong>):Thesourcetypeiseitherinclassinport<br />

Thetargettypeistheinputporttypeappearinginthesourcetype's denition.<br />

elementtypeof(oper<strong>and</strong>):Thesourcetypeisinclasstable.The orinclassoutport.Intheformercase,thetargettypeisthecallmessagetypeappearinginthesourcetype'sdenition;inthelattercase,<br />

iftypeipistheinputporttypeappearinginthesourcetype'sde-<br />

type'sdenition. targettypeistheassociatedelementtypeappearinginthesource denitionofip. nition,thenthetargettypeisthecallmessagetypeappearinginthe<br />

B.4.1TypestatePreconditions B.4PreconditionFunctions<br />

(2)inserttheoperationoper<strong>and</strong>,<strong>and</strong>adot(`.')beforeallotherattribute toanyattributeintheformaltypestatewiththeoperationoper<strong>and</strong>;<strong>and</strong> tion.Thissubstitutionconsistsofthefollowing:(1)replaceany`*'oper<strong>and</strong> oper<strong>and</strong>intoaformaltypestatethatissomehowassociatedwiththeopera-<br />

mustnotbepresent. programtypestatebeforeinvokingtheoperation,aswellasattributesthat Thefollowingpreconditionsensurepropertypestatepriortoanoperation. Eachpreconditioncanspecifytypestateattributesthatarerequiredinthe<br />

op1op2...opntodenoteallrulesopi Inseveralcases,requiredattributesaredeterminedbysubstitutingan 1Intheoperatordescriptionpanels,weusethespecialnotation sameas(opj)fori6=j.

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

Saved successfully!

Ooh no, something went wrong!