ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0006717 | Part 01: TTCN-3 Core Language | Technical | public | 09-04-2014 13:30 | 05-01-2015 17:31

Reporter | Tomas Urban |
Assigned To | Gyorgy Rethy |
Priority | low | Severity | minor | Reproducibility | N/A
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v4.6.1 (published 2014-06) |
Target Version | v4.7.1 (published 2015-06) | Fixed in Version | v4.7.1 (published 2015-06) |
Clause Reference(s) | 6.2
Source (company - Author) | STF 478

Summary | 0006717: Values of address type in expressions and references

Description

Since address types are based on standard TTCN-3 types, their instances can be used in expressions and extended reference operators (dot notation, index notation) can be applied to them. However, in addition to all values of the base type, the values of the address type can contain a special value null. The current specification doesn't seem to provide guidelines for situation when an address value used in an extended reference or an expression contains this value.
type integer address;
...
var address v_a := null;
var integer v_i := 1 + v_a;
type record address
{
charstring host,
integer tcp_port
}
...
var address v_a := null;
var integer v_i := v_a.tcp_port
It seems obvious that the above examples should produce an error. Therefore I propose to change the specification in the following way:
1. Add explicit compatibility rules for the address type into the section 6.3 that exclude the null value. There's currently a note regarding the address type, but it doesn't consider existence of the null symbol. With null excluded, the problem with expressions will disappear as it won't be possible to convert it to a valid expression operand value.
2. Add either a global rule for referencing an entity within a field to which null is assigned to the section 6.2.12, saying that rules for referencing omitted value are valid in this case or explicitly list the null value together with omit in all places where rules for extended references are specified (in 6.2, see the related CR)

Steps To Reproduce |
Additional Information |
Tags | No tags attached.

Relationships

related to | 0006714 | closed | Gyorgy Rethy | Expansion of LHS in case of uninitialized constructive variables

Attached Files | CR6717_resolution_v1.docx (112,777) 07-10-2014 09:05 http://oldforge.etsi.org/mantis/file_download.php?file_id=3087&type=bug CR6717_resolution_v2.docx (118,859) 07-10-2014 09:28 http://oldforge.etsi.org/mantis/file_download.php?file_id=3090&type=bug CR6717_resolution_v3.docx (119,102) 08-10-2014 16:17 http://oldforge.etsi.org/mantis/file_download.php?file_id=3119&type=bug

Issue History
Date Modified | Username | Field | Change
09-04-2014 13:30 | Tomas Urban | New Issue |
09-04-2014 13:31 | Tomas Urban | Relationship added | related to 0006714
20-06-2014 11:42 | Gyorgy Rethy | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
20-06-2014 11:42 | Gyorgy Rethy | Product Version | => v4.6.1 (published 2014-06)
20-06-2014 11:42 | Gyorgy Rethy | Target Version | => v4.6.1 (published 2014-06)
20-06-2014 11:48 | Gyorgy Rethy | Target Version | v4.6.1 (published 2014-06) => v4.7.1 (published 2015-06)
06-10-2014 16:03 | Gyorgy Rethy | Note Added: 0012235 |
06-10-2014 16:03 | Gyorgy Rethy | Assigned To | => Gyorgy Rethy
06-10-2014 16:03 | Gyorgy Rethy | Priority | normal => low
06-10-2014 16:03 | Gyorgy Rethy | Status | new => confirmed
07-10-2014 09:05 | Gyorgy Rethy | File Added: CR6717_resolution_v1.docx |
07-10-2014 09:05 | Gyorgy Rethy | Note Added: 0012243 |
07-10-2014 09:06 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Tomas Urban
07-10-2014 09:28 | Tomas Urban | File Added: CR6717_resolution_v2.docx |
07-10-2014 09:31 | Tomas Urban | Note Added: 0012246 |
07-10-2014 09:31 | Tomas Urban | Assigned To | Tomas Urban => Gyorgy Rethy
08-10-2014 16:17 | Gyorgy Rethy | File Added: CR6717_resolution_v3.docx |
08-10-2014 16:17 | Gyorgy Rethy | Note Added: 0012295 |
08-10-2014 16:17 | Gyorgy Rethy | Status | confirmed => resolved
08-10-2014 16:17 | Gyorgy Rethy | Resolution | open => fixed
08-10-2014 16:17 | Gyorgy Rethy | Fixed in Version | => v4.7.1 (published 2015-06)
05-01-2015 17:31 | Gyorgy Rethy | Note Added: 0012624 |
05-01-2015 17:31 | Gyorgy Rethy | Status | resolved => closed

Notes

(0012235)
Gyorgy Rethy
06-10-2014 16:03

Add: null is not allowed as operand of expressions referencing a field "behind" null is an error

(0012243)
Gyorgy Rethy
07-10-2014 09:05

Proposed resolution is uploaded in CR6717_resolution_v1.docx. Please review.

(0012246)
Tomas Urban
07-10-2014 09:31

I am mostly fine with the resolution, but I slightly ammended the proposed rules: - null is allowed in non-equality too - applying index notation to null leads to an error Please check and if you are fine with my modifications, we can mark the CR as resolved.

(0012295)
Gyorgy Rethy
08-10-2014 16:17

Your comemnts (and additions) are correct.

(0012624)
Gyorgy Rethy
05-01-2015 17:31

Added to draft V4.6.3