OpenAADL / ocarina

AADL model processor: mappings to code (C, Ada); Petri Nets; scheduling tools (MAST, Cheddar); WCET; REAL
http://www.openaadl.org
Other
64 stars 29 forks source link

whether can ignore 'source_text' in subprogram? #313

Open ibertli opened 1 year ago

ibertli commented 1 year ago

Hello Sir, i have a question asking for your help. Based on my understanding,we cannot ignore 'source_text' in subprogram, but i found in '/ocarina-build/ocarina/doc/source/ping/devices.aadl' at line21 where the special subprogram has no 'source_text'. It confused me. thanks for your replay!

yoogx commented 1 year ago

What do you mean by "we cannot ignore source_text in source program"? A model is perfectly valid if subprograms do not define source_text. However it may not be correct for a specific model processing if absent. For instance, scheduling analysis does not need this property defined, but code generation does. Since code generation may not consider device, it is fine.

ibertli commented 1 year ago

What do you mean by "we cannot ignore source_text in source program"? A model is perfectly valid if subprograms do not define source_text. However it may not be correct for a specific model processing if absent. For instance, scheduling analysis does not need this property defined, but code generation does. Since code generation may not consider device, it is fine.

I do not understand. If i do code generation work use software component without 'source_text' in subprogram, how can i confirm which file to execute when call a subprogram and where is the function 'subprogram_b'? Example like this:


SUBPROGRAM subprogram_b features subb_port: in parameter Base_Types::integer; PROPERTIES SOURCE_LANGUAGE => (C); SOURCE_NAME => "subprogram_b"; END subprogram_b;


yoogx commented 1 year ago

I suggest you study the provided examples.

As I said;

ibertli commented 1 year ago

I know what's your mean. Aimed at code geration, i cannot ignore 'source_text'。Thanks very much!