Hi!
It recently came to my attention that the current version
of the standard (and maybe even the mockup version as well)
contains a potential contradiction in the description of
applicability rules for encoding attributes:
Clause 28.2.1 example (extract):
module MyTTCNmodule
{
type charstring MyType;
// AM: Seeing 'with' statement in the end of this module, the
// above typedef is equivalent to writing:
// type charstring MyType with { encode "Global encoding rule" }
group MyRecords
{
type record MyPDU1
{
MyType field3
// AM: And here the standard says that field3 shall be
// encoded according to rule "Rule 2". This is in my
// opinion in a direct contradiction with clause 28.5
// which discusses similar situation with types MyRecordA
// and MyRecordB, and it gives preference to MyRecordA.
// It should be "Global encoding rule", in my opinion.
// Note that the 'with' statement attached to group MyRecords
// does not use the 'override' keyword, hence in my opinion
// it applies the encoding only to top-level typedefs
// contained in the group, and not to each and every type
// reference associated with record field declarations.
}
// AM: Note: Seeing 'with' statement in the end of group MyRecords,
// an equivalent would be to write:
// type record MyPDU1 { MyType field3 } with { encode "Rule 2" }
}
with { encode "Rule 2" }
}
with { encode "Global encoding rule" }
Similar issue can be found in 28.2.2.
Thanks,
Alexey Mednonogov
OpenTTCN Oy