TASTE bugtrack - Taste
View Issue Details
0000499Taste[All Projects] Generalpublic2016-03-21 09:592023-05-14 16:54
maxime 
maxime 
normalminorhave not tried
closedfixed 
0000499: Name clashing issue with Ada functions and Ada runtime
If the partition name in the deployment view (=name of the binary) is the same as the name of a function implemented in Ada in the interface view, there are compilation issues when using the Ada runtime: the user code will contain an Ada package with the name e.g. FunctionName (package FunctionName in FunctionName.ads/adb) and at the same time Ocarina will generate a file named "FunctionName.adb" in GlueAndBuild/deploymentview_final/FunctionName with a procedure FunctionName
No tags attached.
related to 0000717closed ellidiss Add "main" as a forbidden keyword. 
Issue History
2016-03-21 09:59maximeNew Issue
2016-03-21 11:14huguesNote Added: 0002624
2016-03-22 14:06maximeNote Added: 0002627
2017-10-04 13:43maximeNote Added: 0003039
2017-11-14 17:25huguesNote Added: 0003115
2017-11-14 17:25huguesAssigned To => maxime
2017-11-14 17:25huguesStatusnew => assigned
2017-11-14 19:30maximeNote Added: 0003116
2017-11-15 06:10huguesNote Added: 0003117
2017-11-15 08:37maximeNote Added: 0003119
2017-11-15 08:38maximeRelationship addedrelated to 0000717
2023-05-14 16:54maximeNote Added: 0003825
2023-05-14 16:54maximeStatusassigned => closed
2023-05-14 16:54maximeResolutionopen => fixed

Notes
(0002624)
hugues   
2016-03-21 11:14   
Agreed this is an issue. But what is the proposed resolution ? The name of the binary is the name of the AADL process. So you may a) change the VT to generate a different name and avoid the conflict b) change Ocarina to do a similar name change c) change Ocarina to call the main function main, in package main.adb and then rename the binary from main to the name of the process (we do that for PolyORB-HI/C already) c) is probably better
(0002627)
maxime   
2016-03-22 14:06   
Agreed with your proposed solution.
(0003039)
maxime   
2017-10-04 13:43   
However, if there is a function called "main" in the Interface view, the problem remains.
(0003115)
hugues   
2017-11-14 17:25   
Could this be handled as a check done by the TASTE-xV editor ? We already have some naming checks in place.
(0003116)
maxime   
2017-11-14 19:30   
Agreed. So two actions: (1) Ellidiss to add "main" to the list of forbidden words (2) Jerome to generate the main function in main.adb. I will add a separate ticket to handle (1). This ticket remains open only for point (2).
(0003117)
hugues   
2017-11-15 06:10   
This is not a viable solution, if we have two Ada nodes, they will be called main, and thus break existing setup, e.g. when we copy all binaries to the same directory It makes more sense to forbid function and partition to have the same name
(0003119)
maxime   
2017-11-15 08:37   
For (2), as part of the solution, you proposed "and then rename the binary from main to the name of the process (we do that for PolyORB-HI/C already)" (see above). Wouldn't that do it?
(0003825)
maxime   
2023-05-14 16:54   
Opened for too long, and reasonably acceptable situation.