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.

8Resolution name,attributename,exceptionname,exitname,<strong>and</strong>processname.Names ofanamemustberesolved. ingoccurrences,<strong>and</strong>rejectingundenedappliedoccurrencesorconicting deningoccurrences. Resolutionmeansmatchingappliedoccurrencesofnameswiththeirden-<br />

consistofoneormoreidentiers.Eachidentierinanappliedoccurrence Foreachclassofname,therearerulesspecifying: Thefollowingclassesofnamesappearin<strong>Hermes</strong>:variablename,type<br />

theregionswhereeachnamespaceisvisible|thatis,wherethe thenamespaceinwhichthenameisdened.Anamespaceisanassociationbetweenidentiers<strong>and</strong>theirdenitions.Withineachname<br />

er.(Rememberthatcaseisignored,sox<strong>and</strong>Xcannotappearinthe samenamespace.) spacetherecanbeonlyonedeninginstanceofaparticularidentidenition<strong>and</strong>thereisnodeningoccurrence.Forexample,thetypestate<br />

howtodisambiguateanameifthenamebeingresolvedisinmore identierscanbereferredtobyappliedoccurrences.<br />

saidtobepredenedifitisdenedinthepredefinedmodule,whichis attributeinit<strong>and</strong>theexceptionnameNotFoundarebuiltin.Anameis implicitlyimportedbyall<strong>Hermes</strong>modules.Forexample,thetypenames Anameissaidtobebuiltinifitsmeaningisgiveninthe<strong>Hermes</strong>language thanonevisiblenamespace.Itisaresolutionerroreitherifthere isnovisibledenition,orifthereismorethanonevisibledenition<br />

havetosupplydenitionsforeitherbuiltinorpredenednames. Charstring,integer<strong>and</strong>programarepredened.Programmersdonot <strong>and</strong>nodisambiguationispossible.<br />

asoper<strong>and</strong>s. Avariablenamedenotesacontainerforavalue.Variablenamesareused 8.1VariableNames variable{name ::=base{variable[.component{name]...

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

Saved successfully!

Ooh no, something went wrong!