khoroshilov / aadl-qa

1 stars 0 forks source link

About AADL-CTS/02-Semantic/SC0023/AADL-4.2-N14/02-pos #4

Open yoogx opened 11 years ago

yoogx commented 11 years ago

This model is flagged as no bug, but this part is dubious

   PACKAGE TC2
        PUBLIC
            WITH propSetId, pckgId::pckgId;
            propSetId renames package pckgId::pckgId; -- no bug SC0023
    END TC2;

We have a duplicate propSetId, leading to the following issue

what does propSetId::FOO resolves to? in particular if FOO is defined in both the property set and the renamed package? I think this should not be allowed by the standard ...

Note that OSATE2 also bugs on this model: it does not find property set if it is defined after TC2, but find it if defined before

Alexey, why did you flag it as no bug?

Gerlits commented 11 years ago

In two words, according to the current version of the AADL standard the name of a package alias declaration is not required to differ from any names of the property set declarations listed in the import declaration. See an excerpt from SAE AADL AS-5506A Errata Sheet below. We probably should change the statement to rule N(14) below by replacing the phrase "package name" with the word "name".

Location: 4.2 (06) Naming Rule N(14). Errata: An alias for a package can introduce a name that is the same as that of another package in the with clause with a single identifier. Currently the naming rule states that aliases have to be unique in the local namespace. Correction: Add a statement to rule N(14) " If an alias_declaration defines an alias for a package then the alias name must not conflict with any package name listed in an import_declaration or that of the package containing the alias_declaration."

yoogx commented 11 years ago

The errata and my interpretation converge. So I guess, for AADLv2.1 (which OSATE2 and Ocarina are willing to implement), we shall reword the testcase, right?

Gerlits commented 11 years ago

Instruction WITH propSetId; above imports the name of a property set.

The errata states that the name of a package alias must not conflict with any PACKAGE NAME listed in the import declaration. Not only the names of packages may be listed in the import declaration, but also the names of property sets. So, if the authors of the standard agree to change the errata by stating that the name of a package alias must not conflict with any package name as well as any property set name listed in the import declaration, in that case we shall change the testcase. If the authors do not mention property set names intentionally, it means that the test case is perfect.

yoogx commented 11 years ago

Thanks for the clarification. I really think there is an issue with the wording of the errata. As I stated, there is something weird in allowing the name of an alias conflicting with the name of an import declaration.

khoroshilov commented 11 years ago

Shall we propose another errata to the specification?

Gerlits commented 11 years ago

In my mind, we shall change the errata and the AADL specification (test).

Errata: "...alias name must not conflict with any package name listed in an import_declaration..." change to "...alias name must not conflict with any name listed in an import_declaration..."

The ADDL specification (test) is positive now but shoud be changed to be negative. The source must be changed as follows: "...propSetId renames package pckgId::pckgId; -- no bug SC0023..." change to "...propSetId renames package pckgId::pckgId; -- bug SC0023..."

yoogx commented 11 years ago

Thanks, this makes sense for me. I let you add that to the AADL wiki and then close this issue