ba_example_003.aadl.out 5.17 KB
Newer Older
1 2 3 4 5 6 7







jhugues's avatar
jhugues committed
8

yoogx's avatar
yoogx committed
9 10 11
package Test
public
  with Base_types, Data_Model;
12

yoogx's avatar
yoogx committed
13 14 15 16
  thread sender
  features
    d : out event data port Base_Types::Integer;
    a : in event data port Base_Types::Integer;
17

yoogx's avatar
yoogx committed
18 19 20
  properties
    Dispatch_Protocol => Timed;
    Period => 10 Ms;
21

yoogx's avatar
yoogx committed
22
  end sender;
23

yoogx's avatar
yoogx committed
24 25 26
  thread implementation sender.v1
  subcomponents
    v : data Base_Types::Integer;
27

yoogx's avatar
yoogx committed
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
    annex behavior_specification {**
    states
      st : initial complete state;
      sf : complete state;
      s1, s2 : state;
    transitions      
      st -[on dispatch timeout]-> st {
        v := 1;
         d!(v)
        };      
      st -[on dispatch a]-> s1;      
      s1 -[a = 1]-> sf;      
      s1 -[a = 0]-> st;      
      sf -[on dispatch timeout]-> sf {
        v := 0;
         d!(v)
        };      
      sf -[on dispatch a]-> s2;      
      s2 -[a = 0]-> st;      
      s2 -[a = 1]-> sf;
    **};
  end sender.v1;
50

yoogx's avatar
yoogx committed
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
  thread implementation sender.v2
    annex behavior_specification {**
    states
      st : initial complete state;
      sf : complete state;
      s1, s2 : state;
    transitions      
      st -[on dispatch timeout]-> st {
         d!(1)
        };      
      st -[on dispatch a]-> s1;      
      s1 -[a = 1]-> sf;      
      s1 -[a = 0]-> st;      
      sf -[on dispatch timeout]-> sf {
         d!(0)
        };      
      sf -[on dispatch a]-> s2;      
      s2 -[a = 0]-> st;      
      s2 -[a = 1]-> sf;
    **};
  end sender.v2;
72

yoogx's avatar
yoogx committed
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
  thread implementation sender.v3
    annex behavior_specification {**
    states
      st : initial complete state;
      sf : complete state;
    transitions      
      st -[on dispatch timeout]-> st {
         d!(1)
        };      
      st -[on dispatch a(1)]-> sf;      
      st -[on dispatch a(others)]-> st;      
      sf -[on dispatch timeout]-> sf {
         d!(0)
        };      
      sf -[on dispatch a(0)]-> st;      
      sf -[on dispatch a(others)]-> sf;
    **};
  end sender.v3;
91

yoogx's avatar
yoogx committed
92
end Test;
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

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;

yoogx's avatar
yoogx committed
206 207 208 209
property set Data_Model is
  Base_Type : list of classifier (
data)
    applies to (data);
210

yoogx's avatar
yoogx committed
211 212
  Code_Set : aadlinteger
    applies to (data);
213

yoogx's avatar
yoogx committed
214 215
  Data_Digits : aadlinteger
    applies to (data);
216

yoogx's avatar
yoogx committed
217 218
  Data_Scale : aadlinteger
    applies to (data);
219

yoogx's avatar
yoogx committed
220 221
  Data_Representation : enumeration (Array, Boolean, Character, Enum, Float, Fixed, Integer, String, Struct, Union)
    applies to (data);
222

yoogx's avatar
yoogx committed
223 224
  Dimension : list of aadlinteger
    applies to (data);
225

yoogx's avatar
yoogx committed
226 227 228 229
  Indefinite_Dimension : constant aadlinteger => -1;
  Infinite_Dimension : constant aadlinteger => -2;
  Element_Names : list of aadlstring
    applies to (data);
230

yoogx's avatar
yoogx committed
231 232
  Enumerators : list of aadlstring
    applies to (data);
233

yoogx's avatar
yoogx committed
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
  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;
256