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.

12411.8.ProcessCreation<strong>and</strong>CommunicationOperations Send<br />

terminedfromthematchinginporttypeoftheoutport.Ifthetypestateis musthavetheentrytypestateorhigher.Thetype<strong>and</strong>typestatearede-<br />

higherthantheentrytypestate,itiscoerceddowntotheentrytypestate. inputport.Itsoper<strong>and</strong>sareasourcevariable<strong>and</strong>anoutport. Thesendstatementmovesavalueoutofavariable<strong>and</strong>enqueuesitonan Thevariablewhosevalueistobesentmusthavethecorrecttype,<strong>and</strong> simple{statement<br />

Theoutputportmustbeinitialized. ::=sendsource{expressiontooutport{expression<br />

carded,thentheDisconnectedexceptionisraised. Create Iftheinputporttowhichtheoutputportwasconnectedhasbeendis-<br />

compiledwithinthemainprogramorwithinotherprocessliterals.Amain setofprocesses.Oneisthemainprogram.Theothersareprocessliterals isavariableoftypepredefined!program.Theresultisanoutport. Thecreateofoperationinstantiatesanewprocess.Theoper<strong>and</strong>ofcreate Theprogrammusthavethetypestatechecked. Theprogramvalueisdenedinthepredefinedmodule.Itconsistsofa secondary::=createofsecondary programistheresultofconvertingtheprocessmoduleproductionofa process.Thismustbeaninputporttype.Whencreateisexecuted,itis sourcemodule. outporttypewhichistheresultofthecreatestatement.Ifitisnot,the checkedthatthisinputporttypeisthematchinginputporttypeofthe exceptionInterfaceMismatchisraised. Theinitializationportisthevariabledeclaredfollowingthekeyword<br />

Procedure initializationportwillbeinitialized.Aconnectiontotheinitializationport isreturnedasthevalueofcreate. willexecutetheprogramdenedbythemainprogramintheprogramvalue, beginningatthestatementfollowingthekeywordbegin.Initiallyonlythe Ifthereisnointerfacemismatch,anewprocessiscreated.Thisprocess<br />

isacheckedprogram,<strong>and</strong>theresultisanoutputport.Aswithcreate, anInterfaceMismatchexceptionisreturnediftheoutputporttypeis Theprocedureofoperationinstantiatesaprocessgenerator.Theoper<strong>and</strong> secondary::=procedureofsecondary

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

Saved successfully!

Ooh no, something went wrong!