- 5 - 10 - 13 - 20 - 25 - 31
1 :: Intro
|
2 :: Templates?
|
3 :: Aim and limitations of paper
|
4 :: Wegner's taxonomy of object languages
(*1): Bertrand Meyer, Book OOSC-2 |
5 :: The new term: process-classes
|
6 :: But is "process-class" possible?
|
7 :: Start of rationale
|
8 :: Sub-classing through occam
|
9 :: Polymorphism through occam
|
10 :: Concurrent OO and "inheritance anomaly"
|
11 :: White-box and black-box reuse |
|
All included:White-box reuse
Black-box reuse
Interface inheritance
|
12 :: Start of code examples
|
Basic - and with "operators" Flow etc. Processes PROTOCOL Conditional IF ALT PAR SEQ IF# ALT# PAR# SEQ# IF@ ALT@ PAR@ SEQ@ TRUE FALSE FALSE & SKIP TRUE & SKIP SKIP STOP CASE CASE ELSE
|
13 :: Inherit process with plug-in of blocksPROC Buffer (CHAN OF INT in, out) PLUSSING (TRUE) INT data: WHILE TRUE SEQ in ? data IF data <> 0 out ! data TRUE# -- Plussing operator on TRUE SEQ in ? data -- Default is to read a second time.. out ! data -- .. and send whatever we then get : PROC BufferChild() ROLLING Buffer TRUE@ -- Rolling operator on corresponding TRUE out ! data -- Don't read a second time : PROC Buffers (CHAN OF INT in, out) CHAN OF INT local: PAR Buffer (in, local) BufferChild (local, out) : |
14 :: Inherit process with plug-in of synchronisationPROC ALTer ([]CHAN OF INT in, out) PLUSSING (ALT) INT data: SEQ data := 0 WHILE TRUE ALT ALT i = 0 FOR SIZE in in[i] ? data INT result: SEQ -- Process something out[i] ! result ALT# FALSE & SKIP SKIP : PROC ALTerChild (CHAN OF INT inspect.out, CHAN OF BOOL inspect) ROLLING ALTer BOOL now: ALT@ inspect ? now inspect.out ! data : CHAN OF INT a,b,c: CHAN OF BOOL d: PAR AProducer (..) ALTerChild (a,b,c,d) AConsumer (..) |
15 :: Inherit process with plug-in of dataPROC TIMEOUTer2 ([]CHAN OF INT in, []CHAN OF INT out) PLUSSING (FALSE&SKIP) INT data: SEQ data := 0 WHILE TRUE ALT ALT i = 0 FOR SIZE in in[i] ? data INT result: SEQ -- Process out[i] ! result FALSE# & SKIP# -- For sub process-class SKIP : PROC TIMEOUTer2Child (CHAN OF INT inspect.out) ROLLING TIMEOUTer2 INITIAL TIMER clock: -- Assume PROC.. INT time: -- ..global scope SEQ clock ? time time := time PLUS 1000 FALSE@ & SKIP@ clock ? AFTER time SEQ inspect.out ! data time := time PLUS 1000 : |
16 :: Inherit interface with plug-in of new protocolPROTOCOL SetGet PLUSSING (CASE) CASE# set.NoRe; INT -- Tag=0 (input) get.Re -- Tag=1 (input) get.End; INT -- Tag=2 (output) : PROTOCOL SetGetChild ROLLING SetGet CASE@ get.Re; INT -- Tag=1 (input) Overridden mask.Re; INT -- Tag=3 (input) New mask.End; INT -- Tag=4 (output) New kill.NoRe -- Tag=5 (input) New : |
17 :: Inherit process with plug-in of new protocol handlingPROC PROTer ([]CHAN OF SetGet in, out) PLUSSING (CASE) INT data: BOOL running: SEQ data := 0 running := TRUE WHILE running ALT i = 0 FOR SIZE in in[i] ? CASE# set.NoRe; data SKIP get.Re out[i] ! get.End; data : PROC PROTerChild ([]CHAN OF SetGetChild in) ROLLING PROTer -- Only input channel redefined CASE@ INT extra: get.Re; extra -- Redefined out[i] ! get.End; data + extra kill.NoRe -- New running := FALSE : CHAN OF SetGetChild a: CHAN OF SetGetChild b: -- Could also have been PROTOCOL SetGet PAR AProducer (..) PROTerChild (a,b) AConsumer (..) |
18 :: Inherit and inherit again: nestingPROC PROTerChild ([]CHAN OF SetGetChild in, out) PLUSSING (CASE) ROLLING PROTer -- Super is PROTer CASE@# INT extra: get.Re; extra out[i] ! get.End; data + extra kill.NoRe running := FALSE : PROC PROTerChildChild() ROLLING PROTerChild CASE@ kill.NoRe running := BOOL (data) : |
19 :: PLUSSING # nested inside ROLLING @
PROC PROTerChild ([]CHAN OF SetGetChild in, out) PLUSSING (SEQ) ROLLING PROTer -- Super is PROTer CASE@ INT extra: get.Re; extra out[i] ! get.End; data + extra INT mask: mask.Re; mask -- New SEQ# data := data BITAND mask out ! mask.End; data kill.NoRe running := FALSE : PROC PROTerChildChild() ROLLING PROTerChild SEQ@ data := data BITOR mask out ! mask.End; data : |
20 :: Start of discussion
|
21 :: No garbage collection (GC) |
22 :: Unnamed blocks - worth anything?
|
23 :: Limitations of scope of this paper
|
24 :: Still no generic buffers
|
25 :: Dynamic loading?
|
26 :: Explicit and implicit PLUSSING |
|
|
|
|
|
|
27 :: Closures, an inspiration
|
28 :: Names of child process-classes
PROC PROTer() ROLLING PROTer
|
29 :: No occam CLASS
|
30 :: In need of a taxonomy
|
-
1 - 5 - 10 - 13 - 20 - 25
31 :: Conclusion:
|