AppendixC.PredenedModule217 dening,72 on(others),50 on(others),96 operatingsystem,4 or,105 ordered tableoperations,29 ordered,108 orderedtable,28 orderedtable,28 others,96 otherwise,27 outcome,88 outport,119 outputport,8,22,119 denition,24 overlap,121 parent,8 passingparametersbyvalue-result, 12 pointers,prohibited,4 polymorph,94 polymorph,64 polymorphtypefamily,125 polymorphictypes,none,18 PolymorphMismatchexception,66, 126,127 position,41 positioninatable,28,110{112 position-of-element,92 position-of-element,113,114 position-of-selector,114 position-of-selector,42 postcondition,89 postconditionfunction,90 precondition,88 predened,19,75 charactertype,102 predefined,19,78 predenedexceptions DivideByZero,104 predefined!boolean,97 predefined!program,51 procedure,40 procedure,125 procedureof,40 procedures,40 process,4 communication,12{17 module,8 name,79 termination,29 process,19 block,96 program,15 checked,23 program,15 programliteral,50 programvalue,71,80 punctuation,73,74 qualier,80,81 RangeErrorexception,29,106,111, 112 realliteral,73 typefamily,103 realarithmetic,103 receive,5,9,123 record,107 recorddenition,43 rem,104 remove,29,42,111 repeatclause,97 reservedwords,74 resolution,75 ofbasevariables,76 ofcomponentnames,77 oftypenames,77 resultvariable,100 return,5,9,24,123 exception,78 reveal,63,117 safenumber,103 safenumbers,103 scalartypefamilies,101 scope,76,80
218C.1.<strong>Reference</strong>s ofelementvariable,109 ofinspectvariable,112 security,55 selectnofairchoice,99 select,26 abbreviation,40 select,98{100 selector,41,91,109 expression,109 long,109 mapping,109 semilattice,57,84 meet,57 send,118,124 sendstatement,60 server,9 serverprocess,25 shareddata,prohibited,4 shell,9 sizeof,26,114 space,73 stringliteral,50,73,109 syntax analysis,71 systemsprogramming,12 table,28 new,109 comparison,108 elementtypestate,108 insert,29 insertat,29 operations,28 representationindependent,28 typefamily,107 unordered,43 table[expr],42 table[key],43 the-element,42,110 tokens,73 typechecking,8,9,17,18,72,80{ 82,150{153 denition,22,77 families,8 inference,72,80{82 inferencerules,55 inferencing,150{153 name,19 specier,21 type,127 typename,77 resolution,77 typespecier,81,82,83 o,104 typestate,22 caseattribute,62 attributes,23,56,78,84{85 checking,9,17,24,56,72, 84{92,150{153 checkingalgorithm,90 checkingexample,89 coercions,87 constraintattributes,85 entry,23,24 errors,91{92 exit,23 exitformal,119 formal,85{86 initialization,23 minimumformal,119 postcondition,90 postconditionrules,152 preconditionfunction,89 preconditionrules,152,155 semilattice,84 semilatticemeet,87 syntax,84{85 valid,86 typestate,127 Uncopyableexception,64,94 unique,105 unite,116 unitestatement,62 unwrap,66,126 unwrapstatement,84 usinglist,19
- Page 1 and 2:
DavidF.BaconArthurP.GoldbergAndyLow
- Page 3 and 4:
Preface Thisdocumentcontainsatutori
- Page 5 and 6:
iv3TypeandTypestateChecking 5Resear
- Page 8:
Tutorial PartI 1
- Page 11 and 12:
ortransactions.AHermesmoduleisastra
- Page 13 and 14:
61.2.GettingStarted|ASimpleHermesPr
- Page 15 and 16:
81.2.GettingStarted|ASimpleHermesPr
- Page 17 and 18:
101.2.GettingStarted|ASimpleHermesP
- Page 19 and 20:
121.4.PuttingProcessesTogether thec
- Page 21 and 22:
141.4.PuttingProcessesTogether newI
- Page 23 and 24:
fullycheckedfortypeandtypestateerro
- Page 25 and 26:
constructs:thenewinput-port,connect
- Page 27 and 28:
201.5.DeclarationsandDenitions whil
- Page 29 and 30:
221.5.DeclarationsandDenitions Stan
- Page 31 and 32:
whichtheoutputportconnects|calledth
- Page 33 and 34:
261.6.ASimpleServer begin QuitCM:Qu
- Page 35 and 36:
281.6.ASimpleServer towritedataabst
- Page 37 and 38:
toaservice,whileretainingtheability
- Page 39 and 40:
322.1.Requirements PutLine PutLine
- Page 41 and 42:
342.3.Interfaces WMInterface:callme
- Page 43 and 44:
asmallchangetotheinterfaceFilter.Re
- Page 45 and 46:
382.5.Front-endProcess callParms.Ge
- Page 47 and 48:
402.5.Front-endProcess paringavalue
- Page 49 and 50:
ationtable[expr].Wehaveencounteredt
- Page 51 and 52:
ishiddenandinnowayaectsthesemantics
- Page 53 and 54:
462.7.TheWindowManager callCurrentW
- Page 55 and 56:
name.Ifwewaitedtobuildtheapplicatio
- Page 57 and 58:
502.8.CreatingaWindowApplication re
- Page 59 and 60:
522.8.CreatingaWindowApplication be
- Page 61 and 62:
examplesillustratedhere. errorhandl
- Page 63 and 64:
563.TypeandTypestateChecking anerro
- Page 65 and 66:
583.TypeandTypestateChecking Therei
- Page 67 and 68:
604.1.ExpressionBlocks anexpression
- Page 69 and 70:
624.3.Variants thevariantcomponents
- Page 71 and 72:
thetypestate(i.e.addattributes),but
- Page 73 and 74:
accesscontrol{anyonecangetit. 664.4
- Page 75 and 76:
685.ResearchDirectionsinHermes
- Page 78 and 79:
6Introduction Thereferencemanualpre
- Page 80 and 81:
7LexicalandSyntacticRules lectionso
- Page 82 and 83:
8Resolution name,attributename,exce
- Page 84 and 85:
8.1.2ComponentNames eachhaveacompon
- Page 86 and 87:
onthehandlerandusedontheexitstateme
- Page 88 and 89:
theelementwillalsobeknownbyapplying
- Page 90 and 91:
documentationpurposesevenwheretheya
- Page 92 and 93:
ments.Therstargumenttocasemustbeava
- Page 94 and 95:
Ifinit(CM)ispresentandCMisacallmess
- Page 96 and 97:
6.Determinethepostconditionsforeach
- Page 98 and 99:
droppedattributesafternormalcomplet
- Page 100 and 101:
11 HermesOperations Throughoutthere
- Page 102 and 103:
Thediscardstatementremovesthevaluef
- Page 104 and 105:
Ifnoneoftheclausescanexitsnormally,
- Page 106 and 107:
Ifthereisanoptionalselectexpression
- Page 108 and 109:
stmemberisanatomwithprintnamematchi
- Page 110 and 111:
types.Additionally,theoperations\an
- Page 112 and 113:
Less,Less-equal,Greater,Greater-equ
- Page 114 and 115:
RecordTypeFamily 11.5RecordOperatio
- Page 116 and 117:
valueofthetable,ifany,isdiscarded.
- Page 118 and 119:
thetableisordered,theelementisinser
- Page 120 and 121:
notallowedonconstantcopies.Avariabl
- Page 122 and 123:
thereisnoselectedelement,aNotFounde
- Page 124 and 125:
willbeuninitialized,andthedestinati
- Page 126 and 127:
Itistheabilityforprogramstosendandr
- Page 128 and 129:
Connect Theconnectstatementhastwoop
- Page 130 and 131:
possible,andstoresitinadestinationv
- Page 132 and 133:
incompatiblewiththeinputporttypeoft
- Page 134 and 135:
Inspect-polymorph willincludefinit(
- Page 136 and 137:
theprogramwhichembedsit.Thereforeth
- Page 138 and 139:
type).Ifthecheckfails,theexceptionD
- Page 140 and 141:
isusuallygeneratedasacoercionwhenme
- Page 142 and 143:
A.1LexicalRules Webeginwiththerules
- Page 144 and 145:
accuracy against andy assert drop e
- Page 146 and 147:
Thesimplestatements: simple{stateme
- Page 148 and 149:
oolean{guard event{guard::=eventinp
- Page 150 and 151:
::=(expression)AppendixA.HermesConc
- Page 152 and 153:
user{exception constant{parameters
- Page 154 and 155:
formal{variable module{name::=ident
- Page 156 and 157:
Typestatesappearinginparticularcont
- Page 158 and 159:
destination,source,andposition.Some
- Page 160 and 161:
operandwillnolongerbeinitialized. B
- Page 162 and 163:
Followingaretheinferencefunctionsap
- Page 164 and 165:
lowestentrycondition(message,port):
- Page 166 and 167:
copy(source,destination):Foreachatt
- Page 168 and 169:
assert(continued) Description:Evalu
- Page 170 and 171:
case(continued) Description:Copythe
- Page 172 and 173:
copy(continued) Preconditions: unco
- Page 174 and 175: drop(continued) SpecialRules:Thenum
- Page 176 and 177: exists(continued) SpecialRules:Thes
- Page 178 and 179: forall(continued) Description:Ifeve
- Page 180 and 181: greater(continued) Description:Ifso
- Page 182 and 183: insert{at(table,element,position) T
- Page 184 and 185: integer{literal(result) TypeRules:
- Page 186 and 187: merge{at(continued) Description:Rem
- Page 188 and 189: not(result,source) TypeRules: Appen
- Page 190 and 191: print(variable) TypeRules:None Prec
- Page 192 and 193: emove(element,table) TypeRules: App
- Page 194 and 195: select(continued) SpecialRules:Allt
- Page 196 and 197: subtract(result,source1,source2) Ty
- Page 198 and 199: unary{minus(result,source) TypeRule
- Page 200 and 201: wrap(continued) Preconditions: var(
- Page 202 and 203: definitions predefined:using() Appe
- Page 204 and 205: );'named'->typename:typenameffullg
- Page 206 and 207: {{Specicinformationneededtocomplete
- Page 208 and 209: attrdefinition:record( attributeid:
- Page 210 and 211: statement:record( id:statementid, o
- Page 212 and 213: {{Ablockstatementqualieridentiesthe
- Page 214 and 215: {{expressionisfalse. ifqualifier:re
- Page 216 and 217: {{expression.The'element'rootvariab
- Page 218 and 219: [ASU88]AlfredV.Aho,RaviSethi,andJer
- Page 220 and 221: [SYB87a]RobertE.Strom,ShaulaAlexand
- Page 222 and 223: AppendixC.PredenedModule215 coercio
- Page 226: variablename discarded,29 variant,6