blob: 19f9ebd910b55617b089e4ac563f6b208ba63639 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
RoomModel TestBindings {
LogicalSystem Sys {
SubSystemRef main: Application
}
SubSystemClass Application {
ActorRef ref1: AC1
ActorRef ref2: AC2
// no self connection allowed, ports are indentical
Binding ref1.reg and ref1.reg
// port with multiplicity 1 is already connected
Binding ref1.reg and ref2.conj
Binding ref1.reg and ref2.conj
// protocols don't match
Binding ref1.reg and ref2.other
// protocol extends incoming
Binding ref1.base and ref2.extin
// ok
Binding ref1.base2 and ref2.extout
// protocol extends outgoing
Binding ref1.base3 and ref2.extout2
// derived protocols not connectable (both directions extended)
Binding ref1.base4 and ref2.extinout
LogicalThread dflt_thread
}
ActorClass AC1 {
Interface {
Port reg: PC1
Port base: PCBase
Port base2: PCBase
conjugated Port base3: PCBase
conjugated Port base4: PCBase
}
Structure {
external Port reg
}
Behavior { }
}
ActorClass AC2 {
Interface {
conjugated Port conj: PC1
conjugated Port other: PC2
conjugated Port extout: PCExtendOut
conjugated Port extin: PCExtendIn
Port extout2: PCExtendOut
Port extinout: PCExtendInOut
}
Structure {
external Port conj
}
Behavior { }
}
ProtocolClass PC1 {
incoming {
Message in1()
}
}
ProtocolClass PC2 {
incoming {
Message in1()
}
}
ProtocolClass PCBase {
incoming {
Message in1()
}
}
ProtocolClass PCExtendIn extends PCBase {
incoming {
Message in2()
}
}
ProtocolClass PCExtendOut extends PCBase {
outgoing {
Message out1()
}
}
ProtocolClass PCExtendInOut extends PCBase {
incoming {
Message in2()
}
outgoing {
// a derived protocol should add either incoming or outgoing messages, not both
Message out1()
}
}
}
|