Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: b9c29813aa15d5a23a66f38cc59fd4a693fb5c89 (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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
RoomModel Semantics_basic {
		
	ActorClass GroupTransition_ac  {
		Structure {
			Port p0 : Sem_Protocol2
		}
		Behavior { 
			StateMachine {
				Transition init: initial -> state0 {
					action {
						"p0.out3();"
					}
				}
				Transition tr0: state0 -> state1 {
					triggers {
						<in1: p0>
					}
				}
				Transition tr1: state1 -> state0 {
					triggers {
						<in2: p0>
					}
				}
				Transition tr2: state0 -> tp0 of state2 {
					triggers {
						<in1: p0 guard {
							"if(true)"
						}>
					}
				}
				Transition tr3: tp1 of state2 -> state0
				Transition tr4: state2 -> state0 {
					triggers {
						<in2: p0>
					}
				}
				Transition tr5_vt: state2 -> state1 {
					triggers {
						<wrong1: p0>
					}
				}
				State state0
				State state1 {
					subgraph {
						Transition init: initial -> state1_0 { }
						State state1_0 {
							subgraph {
								Transition init: initial -> state1_0_0_vm { }
								State state1_0_0_vm {
									entry {
										"p0.out2();"
									}
								}
							}
						}
					}
				}
				State state2 {
					subgraph {
						Transition tr0: my tp0 -> state0
						Transition tr1: state0 -> my tp1 {
							triggers {
								<in2: p0 guard {
									"if(true)"
								}>
							}
						}
						EntryPoint tp0
						ExitPoint tp1
						State state0
					}
				}
			}
		}
	}
	
	ActorClass SimpleAlternative_ac  {
		Structure {
			Port p0 : Sem_Protocol2
		}
		Behavior {
			StateMachine {
				Transition init: initial -> state0 { }
				Transition tr0: state0 -> state1 {
					triggers {
						<in1: p0>
					}
				}
				Transition tr1: state0 -> state2 {
					triggers {
						<in2: p0>
					}
				}
				Transition tr2: state2 -> state3 {
					triggers {
						<in3: p0 guard {
							"if(true)"
						}>
					}
				}
				Transition tr3: state1 -> state3 {
					triggers {
						<in3: p0>
					}
				}
				Transition tr4: state3 -> state5 {
					triggers {
						<in1: p0>
					}
				}
				Transition tr5: state3 -> state4 {
					triggers {
						<in2: p0>
					}
				}
				Transition tr6_vt: state3 -> state6_rm {
					triggers {
						<in3: p0>
					}
				}
				State state0 {
					entry {
						"p0.out1();"
					}
				}
				State state1
				State state2
				State state3
				State state4
				State state5
				State state6_rm
			}
		}
	}
	
	ActorClass TransitionsPoint_ac{
		Structure {
			Port p0 : Sem_Protocol2
		}
		Behavior {
			StateMachine {
				Transition init: initial -> state0 {
					action {
						"p0.out2();"
					}
				}
				Transition tr0: state0 -> state1 {
					triggers {
						<in1: p0>
					}
				}
				Transition tr1: my tp0 -> state2 {
					triggers {
						<in3: p0>
					}
				}
				Transition tr2: state2 -> state1 {
					triggers {
						<in1: p0>
					}
				}
				Transition tr3_vtvm: my tp0 -> state1 {
					triggers {
						<in1: p0>
					}
					action {
						"p0.out1();"
					}
				}
				TransitionPoint tp0
				State state0
				State state1
				State state2
			}
		}
	}
	
	ActorClass NoSemantics_ac{
		Structure {
			Port p0 : Sem_ProtocolA
			Port p1: Dummy
		}
		Behavior {
			StateMachine {
				Transition init: initial -> state0_rm { }
				Transition tr0: state0_rm -> state1_rm {
					triggers {
						<someEvent1: p1>
					}
				}
				Transition tr1: state1_rm -> state0_rm {
					triggers {
						<someEvent2: p1>
					}
				}
				State state0_rm
				State state1_rm
			}
		}
	}
	
	ActorClass DualSemantics_ac{
		Structure {
			Port a: Sem_ProtocolA
			Port b: Sem_ProtocolB
		}
		Behavior {
			StateMachine {
				Transition init: initial -> state0 {
					action {
						"b.outB1();"
					}
				}
				Transition tr0: state0 -> state1 {
					triggers {
						<inA1: a>
					}
				}
				Transition tr1: state0 -> state2_sm {
					triggers {
						<inA1: a guard {
							"if(true)"
						}>
					}
				}
				Transition tr3: state1 -> state3 {
					triggers {
						<inB1: b>
					}
				}
				Transition tr4: state2_sm -> state3 {
					triggers {
						<inB1: b>
					}
				}
				Transition tr2: state0 -> state0 {
					triggers {
						<inB1: b>
					}
				}
				Transition tr5_vm: state2_sm -> state4 {
					triggers {
						<inB1: b guard {
							"if(true)"
						}>
					}
					action {
						"a.outA1();"
					}
				}
				State state0
				State state1 {
					entry {
						"a.outA1();"
					}
				}
				State state2_sm {
					exit {
						"a.outA1();"
					}
				}
				State state3
				State state4
			}
		}
	}

	ProtocolClass Sem_Protocol2 {
		incoming {
			Message in1()
			Message in2()
			Message in3()
			Message wrong1()
		}
		outgoing {
			Message out1()
			Message out2()
			Message out3()
			Message wrong1()
		}
		semantics {
			// TransitionPoint
			out:out1->(in:in2->in:in3->in:in2, in:in1->in:in3->in:in1)
			// SimpleAlternative
			out:out2->(in:in1->in:in3->in:in1, in:in3->(in:in1, in:in3))
			// GroupTransition
			out:out3->in:in1->in:in2 
			
		}
	}
	
	ProtocolClass Sem_ProtocolA {
		incoming {
			Message inA1()
		}
		outgoing {
			Message outA1()
		}
		semantics {
			in: inA1 -> out: outA1
		}
	}
	
	ProtocolClass Sem_ProtocolB {
		incoming {
			Message inB1()
		}
		outgoing {
			Message outB1()
		}
		semantics {
			out: outB1 -> in: inB1
		}
	}
	
	ProtocolClass Dummy {
		incoming {
			Message someEvent1()
			Message someEvent2()
			Message someEvent3()
		}
		outgoing {
			Message someEvent1()
			Message someEvent2()
			Message someEvent3()
		}
	}

}

Back to the top