ba_example_001.aadl.out 3.7 KB
Newer Older
1
2
3
4
5
6
7







jhugues's avatar
jhugues committed
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
property set Data_Model is
  Base_Type : list of classifier (
data)
    applies to (data);

  Code_Set : aadlinteger
    applies to (data);

  Data_Digits : aadlinteger
    applies to (data);

  Data_Scale : aadlinteger
    applies to (data);

  Data_Representation : enumeration (Array, Boolean, Character, Enum, Float, Fixed, Integer, String, Struct, Union)
    applies to (data);

  Dimension : list of aadlinteger
    applies to (data);

  Element_Names : list of aadlstring
    applies to (data);

  Enumerators : list of aadlstring
    applies to (data);

  IEEE754_Precision : enumeration (Simple, Double)
    applies to (data);

  Initial_Value : list of aadlstring
    applies to (data, port, parameter);

  Integer_Range : range of aadlinteger
    applies to (data, port, parameter);

  Measurement_Unit : aadlstring
    applies to (data, port, parameter);

  Number_Representation : enumeration (Signed, Unsigned)
    applies to (data);

  Real_Range : range of aadlreal
    applies to (data, port, parameter);

  Representation : list of aadlstring
    applies to (data);

end Data_Model;

package Base_Types
public
  with data_model;

  data Boolean
  properties
    Data_Model::Data_Representation => Boolean;

  end Boolean;

  data Integer
  properties
    Data_Model::Data_Representation => Integer;

  end Integer;

  data Integer_8 extends Integer
  properties
    Data_Model::Number_Representation => Signed;
    Source_Data_Size => 1 Bytes;

  end Integer_8;

  data Integer_16 extends Integer
  properties
    Data_Model::Number_Representation => Signed;
    Source_Data_Size => 2 Bytes;

  end Integer_16;

  data Integer_32 extends Integer
  properties
    Data_Model::Number_Representation => Signed;
    Source_Data_Size => 4 Bytes;

  end Integer_32;

  data Integer_64 extends Integer
  properties
    Data_Model::Number_Representation => Signed;
    Source_Data_Size => 8 Bytes;

  end Integer_64;

  data Unsigned_8 extends Integer
  properties
    Data_Model::Number_Representation => Unsigned;
    Source_Data_Size => 1 Bytes;

  end Unsigned_8;

  data Unsigned_16 extends Integer
  properties
    Data_Model::Number_Representation => Unsigned;
    Source_Data_Size => 2 Bytes;

  end Unsigned_16;

  data Unsigned_32 extends Integer
  properties
    Data_Model::Number_Representation => Unsigned;
    Source_Data_Size => 4 Bytes;

  end Unsigned_32;

  data Unsigned_64 extends Integer
  properties
    Data_Model::Number_Representation => Unsigned;
    Source_Data_Size => 8 Bytes;

  end Unsigned_64;

  data Natural extends Integer
  properties
    Data_Model::Integer_Range => 0 .. Max_Target_Integer;

  end Natural;

  data Float
  properties
    Data_Model::Data_Representation => Float;

  end Float;

  data Float_32 extends Float
  properties
    Data_Model::IEEE754_Precision => Simple;
    Source_Data_Size => 4 Bytes;

  end Float_32;

  data Float_64 extends Float
  properties
    Data_Model::IEEE754_Precision => Double;
    Source_Data_Size => 8 Bytes;

  end Float_64;

  data Character
  properties
    Data_Model::Data_Representation => Character;

  end Character;

  data String
  properties
    Data_Model::Data_Representation => String;

  end String;

end Base_Types;

package Test
public
  data number
  end number;

  subprogram mul
  features
    x : in parameter number;
    y : in parameter number;
    z : out parameter number;

  end mul;

  subprogram cube
  features
    x : in parameter number;
    y : out parameter number;
    mul : requires subprogram access mul;

    annex behavior_specification {**
    variables
      tmp;
    states
      s : initial final state;
    transitions      
      t : s -[]-> s {
         mul!(x, x, tmp);
         mul!(tmp, x, y)
        };
    **};
  end cube;

end Test;