Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000499Taste[All Projects] Generalpublic2016-03-21 09:592023-05-14 16:54
Reportermaxime 
Assigned Tomaxime 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Summary0000499:

Name clashing issue with Ada functions and Ada runtime

Description

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

TagsNo tags attached.
Attached Files

- Relationships
related to 0000717closedellidiss 

Add "main" as a forbidden keyword.

 

-  Notes
(0002624)
hugues (administrator)
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 (administrator)
2016-03-22 14:06

Agreed with your proposed solution.

(0003039)
maxime (administrator)
2017-10-04 13:43

However, if there is a function called "main" in the Interface view, the problem remains.

(0003115)
hugues (administrator)
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 (administrator)
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 (administrator)
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 (administrator)
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 (administrator)
2023-05-14 16:54

Opened for too long, and reasonably acceptable situation.


- Issue History
Date Modified Username Field Change
2016-03-21 09:59 maxime New Issue
2016-03-21 11:14 hugues Note Added: 0002624
2016-03-22 14:06 maxime Note Added: 0002627
2017-10-04 13:43 maxime Note Added: 0003039
2017-11-14 17:25 hugues Note Added: 0003115
2017-11-14 17:25 hugues Assigned To

=> maxime

2017-11-14 17:25 hugues Status

new => assigned

2017-11-14 19:30 maxime Note Added: 0003116
2017-11-15 06:10 hugues Note Added: 0003117
2017-11-15 08:37 maxime Note Added: 0003119
2017-11-15 08:38 maxime Relationship added

related to 0000717

2023-05-14 16:54 maxime Note Added: 0003825
2023-05-14 16:54 maxime Status

assigned => closed

2023-05-14 16:54 maxime Resolution

open => fixed



Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker