µ
≠≠
hKi
k
h List [ (K, Bag) ] i
stack
hhMap [Id 7→ Int]i
env
hClassT ypei
crntClass
hInti
location
i
methodContext
thread
threads
µµ
hClassT ypei
classType
hClassM etaT ypei
classMetaType
hMap [Signature 7→ ClassT ype]i
methods
¥¥
hSignaturei
methodSignature
h List [ MethodP aram ] i
methodParams
hKi
methodBody
hAccessModei
methodAccessMode
hContextT ypei
methodContextType
æ
methodDec
æ
methodDecs
ø
class
ø
classes
ø
T
hi
k
hi
stack
hi
methodContext
hi
class
hi
classType
hi
class
hi
classMetaType
hi
methods
hi
methods
hi
methodDec
hi
methodSignature
::=
|
::= ( , )
|
·
K
·
K
::= ( )
::=
::= List{ , , }
hi
class
hi
classDec
::= ( , , , , , )
Qual
Name
( (Name, (Args)), (Qual),
·
K
,
·
K
,
·
K
,
·
K
)
(Args : TypedVals)
::= List{ , , }
::=
*
(Sig, QualC ,
·
K
MetaT
,
·
K
DecC
, , )( ) ···
+
k
hQualC i
classType
hMetaT i
classMetaType
·· Sig 7→ DecC ···i
methods
hi
methods
*
(Sig, QualC ,
·
K
MetaT
, ,
·
K
,
·
K
)( ) ···
+
k
hQualC i
classType
hMetaT i
classMetaType
hMethodsi
methods
¬
Bool
Sig (Methods)
*
(Sig, , , DecC ,
·
K
ContextT
,
·
K
Acc
)( ) ···
+
k
hDecC i
classType
hSigi
methodSignature
hContextT i
methodContextType
hAcci
methodAccessMode
::= ( , )
·
K
·
K
(Sig, , , DecC , , )
(Sig, DecC )
( )
( , , , , , )( )
( )
( , )
(Sig, , , DecC , , )
(Sig, DecC )
( )
hi
methods
hi
methods
( , ObjC )
(Sig, , , , , Acc)
(Sig, DecC )
( ) ···
k
hObjC i
classType
·· Sig 7→ DecC ···i
methods
Acc =
K
Bool
Acc =
K
·
K
( , ObjC ) QualC
(Sig, QualC , , , , )
(Sig, (QualC , ObjC ),
·
K
)
( ) ···
k
hQualC i
classType
·· Sig 7→ ···i
methods
( )
() =
KLabel
0
lookupP M
::= ( , )
::= ( , , )
hi
methods
hi
methods
hi
methods
hi
methods
hi
methods
·
K
*
(Sig,
CurrentC Cs
Cs
,
·
K
DecC
) ···
+
k
hCurrentC i
classType
·· Sig 7→ DecC ···i
methods
hhCurrentCi
classType
h...Sig 7→ CurrentC...i
methods
i
class
hi
methods
¥
(Sig,
CurrentC Cs
Cs
,
OldDecC
( (OldDecC , Acc, CurrentC ))
{CurrentC } {OldDecC }
) ···
æ
k
hhOldDecC i
classType
hSigi
methodSignature
hAcci
methodAccessMode
···i
class
hhCurrentC i
classType
·· Sig 7→ CurrentC ···i
methods
···i
class
::= ( , , )
( , , )
( , , )
(BaseC , , SubC )
( (BaseC )) ( (SubC ))
( , , )
7→ hi
methods
*
(Sig,
CurrentC Cs
Cs
, ) ···
+
k
hCurrentC i
classType
·· Sig 7→ DecC ···i
methods
CurrentC 6=
K
DecC
(Sig,
·
ClassTypes
, DecC )
(Sig, DecC )
hlookupP M (f (), (a.A, a.B, b.C),
·
K
)...i
k
hAi
classType
h...f() 7→ A...i
methods
hlookupP M (f (), (a.B, b.C), a.A)...i
k
h ha.Ai
classType
hf()i
methodSignature
hpackagei
methodAccessMode
...i
class
h ha.Bi
classType
h...f() 7→ a.B...i
methods
...i
class
hlookupP M (f (), (b.C), a.B)...i
k
h ha.Bi
classType
hf()i
methodSignature
hprotectedi
methodAccessMode
...i
class
h hb.Ci
classType
h...f() 7→ b.C...i
methods
...i
class
hlookupP M (f (),
·
ClassTypes
, b.C)...i
k
hmethodRef (f(), b.C)...i
k
·
K
·
K
hi
methodContext
hi
stack
hi
env
hi
crntClass
hi
location
·
K
Qual (Sig, DecC )(Args) y RestK
(DecC ) y (Params, Args) y Body y
k
·
List
(RestK , MethodContext)
···
stack
MethodContext
h
·
Map
i
env
hDecC i
crntClass
h (Qual)i
location
methodContext
hDecC i
classType
hSigi
methodSignature
hParamsi
methodParams
hBodyi
methodBody
::= ( )
( (OId, ) )
OId
(
·
K
)
·
K
::= ( , )
({T X } RestP, (TV RestV ))
T X y (X ((T )TV )) y (RestP, RestV )
(
·
Params
,
·
TypedVals
)
·
K
µ
≠≠
hKi
k
hhMap [Id 7→ Int]i
env
hClassT ypei
crntClass
hInti
location
i
methodContext
thread
threads
≠≠
hClassT ypei
classType
hClassT ypei
enclosingClass
hClassT ypei
extends
hList[F ieldDec]i
instanceFields
class
classes
hMap [Int 7→ T ypedV al]i
store
hInti
nextLoc
∞∞
hInti
objectId
hClassT ypei
objectType
hClassT ypei
layerClass
hMap [Id 7→ Int]i
layerEnv
hKi
layerEnclosingObject
layer
object
objectStore
ø
T
hi
k
hi
env
hi
methodContext
hi
env
hi
methodContext
hi
class
hi
classType
hi
class
hi
class
hi
enclosingClass
hi
extends
hi
instanceFields
hi
store
hi
env
hi
nextLoc
hi
objectStore
hi
objectId
hi
objectType
hi
layer
hi
layerClass
hi
layerEnv
hi
layerEnclosingObject
hi
layerClass
Qual
Name
( ( (Qual)), Name)
( )
hi
nextLoc
hi
objectStore
hi
object
hi
objectId
hi
objectType
hi
object
hi
objectStore
hi
store
hi
object
hi
methodContext
hi
k
hi
object
hi
layer
hi
methodContext
µ
Qual Class(Args)
(Class) y (Class)
y ( (L), Class, Qual)
y (L) (Class)(Args)
y (MethContext) y (L)
···
ø
k
···
·
Map
L 7→ (L, Class) Class
···
store
*
L
L +
Int
+
nextLoc
·
Bag
hhLi
objectId
hClassi
objectType
i
object
MethContext
h
·
Map
i
env
h
·
K
i
crntClass
hLi
location
methodContext
::= ( )
(Class)
(BaseClass) y (Class) y FieldDecs y
···
k
hClassi
classType
hBaseClassi
extends
hFieldDecsi
instanceFields
(
·
K
)
·
K
::= ( )
*
(Class)
·
K
···
+
k
*
Class
+
crntClass
::=
*
·
K
···
+
k
*
Env
·
Map
+
env
hClassi
crntClass
hOIdi
location
hOIdi
objectId
·
Bag
hhClassi
layerClass
hEnvi
layerEnv
···i
layer
···
object
::= ( , , )
*
( (OId, ) , Class, EncloserVal )
·
K
···
+
k
hOIdi
objectId
hClassi
layerClass
*
EncloserVal EncloserClass
+
layerEnclosingObject
hClassi
classType
hEncloserClassi
enclosingClass
( , ,
·
K
)
·
K