Go backward to
Objects and Classes
Go up to
Top
Go forward to
Inheritance Issues
Inheritance of Class Structures
Extension
of classes:
class
EXTENDED-STACK
=
inherits
PERSONAL-STACK
with
begin
...
in record
...
end end
EXTENDED-STACK
is
subclass
of
PERSONAL-STACK
.
Semantics of class inheritance:
pi
|- T
1
:
pi
1
class
pi
-U-
pi
1
|- T
2
:
pi
2
class
pi
|-
inherits
T
1
with
T
2
: (
pi
1
-U-
pi
2
)
class
[[
pi
|-
inherits
T
1
with
T
2
: (
pi
1
-U-
pi
2
)
class
]]
e
s
= (
f
s
)
where
f
s'
=
[[
pi
-U-
pi
1
|- T
2
:
pi
2
class
]](
e
-U-
e
1
)
s
1
and (
e
1
,
s
1
) = [[
pi
|- T
1
:
pi
1
class
]]
e
s'
Wolfgang.Schreiner@risc.uni-linz.ac.at
Id: qualification.tex,v 1.2 1996/05/02 11:53:49 schreine Exp schreine