Titan does not follow the standard wrt timer, component and port type constants.
Summary
Titan does not allow for timer, and port type constants, while the TTCN-3 standard implies otherwise: "The only value that can be assigned to global constants of default, component, port or timer type or component constants of default or component types is the special value null." (Section 10, NOTE)
Steps and/or TTCN-3 code to reproduce
Create a module and insert these rows:
type port mypt message{
inout charstring
}with{extension "internal"}
type component ct_empty{}
const default d := null;
const mypt p := null;
const ct_empty c := null;
const timer t := null;
The same happens if these constants are put in a component type, like:
type component ct_myctf{
const default d := null;
const mypt p := null;
const ct_empty c := null;
const timer t := null;
}
What is the current bug behavior?
The port, and timer constants cause errors. However, they should be allowed in case being assigned the null value.
What is the expected correct behavior?
None of the above lines should cause errors. Furthermore note:
- global default, component, port or timer type constants can only be assigned the null value
- current status: port and timer constants are not accepted on module level (note: except for default, there is no other possible value than null, on global level)
- component-level port or timer type constants can be assigned non-null values
- for port type constants, only non-null values are accepted on component level.
- for timer type constants, nothing is accepted on component level (there is no such thing as timer type btw)
- component-level default or component type constants can only be assigned the null value
- this seems to work.
Relevant logs and/or screenshots
Possible fixes
Titan version
8.1.0
Platform details (OS type and version)
Microsoft Windows 10 Enterprise 10.0.19042
/cc @aknappqwt @mmagyari