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.

726.Introduction Conversion<strong>and</strong>resolution:Theparsedprogramisconvertedinto<br />

Typechecking<strong>and</strong>inference:Thetypeofeachvariablemustsatisfy deningoccurrence.Theresolutionrulesaredescribedinformallyin chapter8. rences.Resolutionmeansassociatingeachappliedoccurrencewitha adeningoccurrencewheretheidentierisassociatedwithitsdenition.Otherappearancesofoftheidentierarecalledappliedoccur-<br />

names.Namesaremadeupofidentiers.Foreachidentierthereis a<strong>Hermes</strong>programvalue.Thisrequiresthecompilertoresolveall<br />

Typestatechecking:Thetypestateateachpointintheprogramis typechecking<strong>and</strong>inferencealgorithmisexplainedinchapter9 oper<strong>and</strong>.Forvariableswithoutdeclarations(expressiontemporaries), thecompilerappliestypeinferencetogenerateadeclaration.Itis checkedthatexactlyonetypecanbeinferred<strong>and</strong>thatthistype satisesthetyperules.Thetyperulesaregiveninanappendix.The thetyperulesfortheoperationwherethevariableappearsasan<br />

Otherstaticrestrictions:Theseareconstraintsonthevalueofaprogramotherthanthosecapturedinthetable-drivenrules.Example:<br />

appendix.Thetypestatecheckingalgorithmisexplainedinchapter Thenumberofargumentstocallmustmatchthenumberofcom-<br />

aregeneratedwherenecessary.Thetypestaterulesaregiveninan sistentwiththetypestaterequirementsofthatoperation.Coercions computed.Itischeckedthatthetypestateateachoperationiscon-<br />

10. Execution:Wedescribethesemanticsofeachoperationrigorously butinformallyinchapter11. formallynexttotheconstructstheyrestrict. ponentsinthecallmessagetype.Theserestrictionsaredescribedin-

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

Saved successfully!

Ooh no, something went wrong!