-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAADL2TA.atl
More file actions
84 lines (71 loc) · 1.71 KB
/
Copy pathAADL2TA.atl
File metadata and controls
84 lines (71 loc) · 1.71 KB
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
-- @path AADL=/clim1_AADLD2TA/Metamodels/AADL.ecore
-- @path TA=/clim1_AADLD2TA/Metamodels/TA.ecore
module myAADT2TA;
create OUT : TA from IN : AADL;
----------------------------------------------------------------------------
rule Process2TA{
from
M3:AADL!process
to
M4:TA!timed_automata(
nom<-M3.nom,
states<-M3.subccompenets,
clocks<-M3.subcd,
transitions<-M3.connectiont
)
}
-----------------------------------------------------------------------------
rule data2clock{
from
M1:AADL!data
to
M2:TA!clock(
nom<-M1.nom,
value<-M1.value
)
}
-----------------------------------------------------------------------------
rule thred2State{
from
M5:AADL!thread
to
M6:TA!state(
nom<-M5.nom,
invariant<-M5.compute_execution_time
)
}
-----------------------------------------------------------------------------
helper context AADL!trannnsition def : IsFinal(): Boolean =
if self.itsFianl then
true
else
false
endif;
rule transition2trnsition{
from
M7:AADL!trannnsition (M7.IsFinal())
--using {pi : AADL!connectionthread = null ; }
to
-- travail sur le thread source
M8:TA!transition(
guard <- M7.Condition,
action <- M7.Expression,
reset <- M7.InfPort--,
-- source<-pi.sources,
--target<-pi.target
-- Tk.guard = Condition /* the condition is in the left part of this transition*/
-- Tk.action = Expresion /* the expression is in the right part of this transition */
-- Tk.reset = the information send to the output port
)
}
---------------------------------
rule Connection2Transition{
from
M9:AADL!connectionthread
to
M10:TA!transition(
--recupere G A R
source<-M9.sources,
target<-M9.target
)
}