Is this code actually supposed to be human-readable. I.e. are we encouraged to examine it and pose questions?
If so, here are three:
- Apparently, this code is auto-generated. So I would expect it to follow a uniform style. However, members of structs are accessed both through
(*x).y and via x->y. Is there any reason for this?
- The casting functions are often dead code. E.g. consider
CAST_Int_to_D_CYCLOC_TM_conversions(). This essentially performs an int to int conversion.
Now dead code is not per se a problem. However, I am inclined to assume that the typedef'd target type D_CYCLOC is indeed more constrained than the source type kcg_int. So there ought to be some logic here...
Or did you perhaps define a valid range for D_CYCLOC inside SCADE but its KCG component can preserve this constraint only when targeting Ada and not with C (which would be really bad)?
- I tried to trace the origins of
D_CYCLOC in hopes of finding a sanity check for its contents at some earlier point. Unfortunately, I had to stop when stumbling on kcg_copy_array_int_8(), which is essentially defined in a file called kcg_assign.h. However, this file does not seem to be present anywhere in the repository. Am I missing something here?
Perhaps someone can enlighten me?
Cheers,
Moritz
Is this code actually supposed to be human-readable. I.e. are we encouraged to examine it and pose questions?
If so, here are three:
(*x).yand viax->y. Is there any reason for this?CAST_Int_to_D_CYCLOC_TM_conversions(). This essentially performs an int to int conversion.Now dead code is not per se a problem. However, I am inclined to assume that the typedef'd target type
D_CYCLOCis indeed more constrained than the source typekcg_int. So there ought to be some logic here...Or did you perhaps define a valid range for
D_CYCLOCinside SCADE but its KCG component can preserve this constraint only when targeting Ada and not with C (which would be really bad)?D_CYCLOCin hopes of finding a sanity check for its contents at some earlier point. Unfortunately, I had to stop when stumbling onkcg_copy_array_int_8(), which is essentially defined in a file called kcg_assign.h. However, this file does not seem to be present anywhere in the repository. Am I missing something here?Perhaps someone can enlighten me?
Cheers,
Moritz