Closed sma350 closed 11 years ago
Hi Smail,
The Ada compiler is confused: your AADL model refers to a data component type called Integer. Ocarina generates it (from the properties you attached to the AADL entity) and places its declaration in PolyORB_HI.Generated.Types. See the first 3 error messages you get.
Your subprogram must reference this type, and not the default Ada integer type.
If you wish to use the Ada integer type directly, use this definition for Integer
data Ada_Integer properties Source_Language => Ada95; Type_Source_Name => "Standard.Integer"; end Ada_Integer;
ok thanks but i cannot use this type in thread or process, i cannot do the connections between not compatible types (Integer in threads and Standard.Integer in subprograms), i have an error when i use Ada_integer :
model.aadl:24:01 Backends: fatal error : This data type cannot be used in thread or process features
line 24 refers to the data Ada_Integer
Then you have to fall back to my first proposal: use PolyORB_HI.Generated.Types.Integer and not Standard.Integer.
Ocarina requires types whose size is known statically to allocate communication buffers, it is the reason why we cannot rely on default Ada types, as it makes the computation too complex.
okay i will try this thanks
Dear all,
I try to generate code with OCARINA from my AADL model but but without success. The model seems correct to me but I get the following error that I can not fix :
polyorb_hi_generated-subprograms.adb:13:03: no visible subprogram matches the specification for "Send_Spg" polyorb_hi_generated-subprograms.adb:13:13: expected type "Standard.Integer" polyorb_hi_generated-subprograms.adb:13:13: found type "Integer" defined at polyorb_hi_generated-types.ads:12 polyorb_hi_generated-subprograms.adb:17:03: no visible subprogram matches the specification for "Send_2_Spg" polyorb_hi_generated-subprograms.adb:22:03: no visible subprogram matches the specification for "Receive_Spg" polyorb_hi_generated-subprograms.adb:27:03: no visible subprogram matches the specification for "Receive_2_Spg" compilation abandoned due to previous error gnatmake: "/home/smail/Bureau/RAVEN/rma_impl/proc_a/polyorb_hi_generated-subprograms.adb" compilation error
and my model (only subprograms):
subprogram Send_Spg features result : out parameter Integer; properties source_name => "user_code.Send_Spg"; source_language => ada; end Send_Spg;
subprogram Receive_Spg features input : in parameter Integer; input_2 : in parameter Integer; properties source_name => "user_code.Receive_Spg"; source_language => ada; end Receive_Spg;
subprogram Send_2_Spg features result : out parameter Integer; result_2 : out parameter Integer; properties source_name => "user_code.Send_2_Spg"; source_language => ada; end Send_2_Spg;
subprogram Receive_2_Spg features input_3 : in parameter Integer; properties source_name => "user_code.Receive_2_Spg"; source_language => ada; end Receive_2_Spg;
thanks for your feedback , Smail.