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

ID | Project | Category | View Status | Date Submitted | Last Update
0007455 | Part 01: TTCN-3 Core Language | New Feature | public | 19-07-2016 15:02 | 28-12-2019 15:28

Reporter | Jacob Wieland - Spirent |
Assigned To | Gyorgy Rethy |
Priority | low | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v4.9.1 (published 2017-05) |
Target Version | 4.11.1 (published 2019-05) | Fixed in Version | 4.12.1 (published 2020-05) |
Clause Reference(s) | 16.1.3
Source (company - Author) | Spirent - Jacob Wieland

Summary | 0007455: The type of formal in parameters of external functions should be allowed to be 'any'

Description

In some cases, an external function should be able to work on any value, regardless of type. Redefining the same function for different types or using generic parameters or wrapping the value in an anytype is tedious and not user-friendly.
We could introduce the type 'any' to be used for external function in-parameters.
This would allow, for instance, to declare and implement such a function as valueof() as an external function
external function valueof(template any t) return boolean;
Typical use-cases are normalization, stringification/logging, runtime-checking, special encoding functions.

Steps To Reproduce |
Additional Information | If such a feature existed, some of the predefined functions in the standard could be pushed into a UsefulFunctions library (which could still be standardized) so that they are not further cluttering up the global name space.
Tags | No tags attached.

Relationships

related to | 0007867 | closed | Gyorgy Rethy | the ispresent, ischosen, isvalue, isbound predefined functions should be moved to operations.

Attached Files | CR7455-1.docx (240,526) 26-08-2019 14:27 http://oldforge.etsi.org/mantis/file_download.php?file_id=3853&type=bug CR7455-2.docx (216,731) 26-08-2019 15:11 http://oldforge.etsi.org/mantis/file_download.php?file_id=3857&type=bug

Issue History
Date Modified | Username | Field | Change
19-07-2016 15:02 | Jacob Wieland - Spirent | New Issue |
15-08-2016 11:54 | Jens Grabowski | Note Added: 0014071 |
15-08-2016 11:54 | Jens Grabowski | Assigned To | => Jens Grabowski
15-08-2016 11:54 | Jens Grabowski | Priority | normal => low
15-08-2016 11:54 | Jens Grabowski | Status | new => assigned
17-08-2016 11:30 | Jacob Wieland - Spirent | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
17-08-2016 11:30 | Jacob Wieland - Spirent | Target Version | => v4.9.1 (published 2017-05)
16-11-2016 14:35 | Jens Grabowski | Note Added: 0014268 |
16-11-2016 14:35 | Jens Grabowski | Target Version | v4.9.1 (published 2017-05) => v4.10.1 (published 2018-05)
24-10-2017 13:42 | Jens Grabowski | Note Added: 0014850 |
05-01-2018 13:28 | Gyorgy Rethy | Product Version | => v4.9.1 (published 2017-05)
05-01-2018 13:28 | Gyorgy Rethy | Target Version | v4.10.1 (published 2018-05) => 4.11.1 (published 2019-05)
08-08-2019 14:28 | KristÃ³f Szabados | Note Added: 0015435 |
08-08-2019 14:28 | KristÃ³f Szabados | Assigned To | Jens Grabowski => Tomas Urban
26-08-2019 13:35 | Tomas Urban | File Added: CR7455-1.docx |
26-08-2019 13:36 | Tomas Urban | File Deleted: CR7455-1.docx |
26-08-2019 14:27 | Tomas Urban | File Added: CR7455-1.docx |
26-08-2019 14:28 | Tomas Urban | Note Added: 0015457 |
26-08-2019 14:28 | Tomas Urban | Assigned To | Tomas Urban => Jacob Wieland - Spirent
26-08-2019 14:28 | Tomas Urban | Status | assigned => confirmed
26-08-2019 15:11 | Tomas Urban | File Added: CR7455-2.docx |
26-08-2019 15:18 | Tomas Urban | Note Added: 0015462 |
26-08-2019 15:19 | KristÃ³f Szabados | Relationship added | related to 0007867
16-12-2019 13:32 | Jacob Wieland - Spirent | Note Added: 0015524 |
16-12-2019 13:32 | Jacob Wieland - Spirent | Status | confirmed => resolved
16-12-2019 13:32 | Jacob Wieland - Spirent | Fixed in Version | => 4.11.1 (published 2019-05)
16-12-2019 13:32 | Jacob Wieland - Spirent | Resolution | open => fixed
16-12-2019 13:32 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Jens Grabowski
16-12-2019 17:44 | KristÃ³f Szabados | Note Added: 0015531 |
16-12-2019 17:44 | KristÃ³f Szabados | Status | resolved => new
16-12-2019 17:45 | KristÃ³f Szabados | Assigned To | Jens Grabowski => Jacob Wieland - Spirent
16-12-2019 17:45 | KristÃ³f Szabados | Status | new => assigned
17-12-2019 07:50 | Jacob Wieland - Spirent | Note Added: 0015532 |
17-12-2019 07:57 | Jacob Wieland - Spirent | Status | assigned => resolved
17-12-2019 07:57 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Jens Grabowski
28-12-2019 15:07 | Gyorgy Rethy | Assigned To | Jens Grabowski => Gyorgy Rethy
28-12-2019 15:07 | Gyorgy Rethy | Status | resolved => assigned
28-12-2019 15:08 | Gyorgy Rethy | Status | assigned => resolved
28-12-2019 15:28 | Gyorgy Rethy | Note Added: 0015589 |
28-12-2019 15:28 | Gyorgy Rethy | Status | resolved => closed
28-12-2019 15:28 | Gyorgy Rethy | Fixed in Version | 4.11.1 (published 2019-05) => 4.12.1 (published 2020-05)

Notes

(0014071)
Jens Grabowski
15-08-2016 11:54

STF discussion: alternative solution: simplification of anytype assignment (automatic boxing and unboxing)

(0014268)
Jens Grabowski
16-11-2016 14:35

Moved to the 2017 Maintenance STF

(0014850)
Jens Grabowski
24-10-2017 13:42

To be moved to 2018 maintenance. Maybe partially resolved by OO extension.

(0015435)
KristÃ³f Szabados
08-08-2019 14:28

STF discussion: Allow it as type of external function formal parameters.

(0015457)
Tomas Urban
26-08-2019 14:28

Resolution uploaded. Please check.

(0015462)
Tomas Urban
26-08-2019 15:18

Predefined detection functions (isvalue, isbound etc.) were removed from the proposed resolution, because these functions will be changed to operators.

(0015524)
Jacob Wieland - Spirent
16-12-2019 13:32

Seems fine to me.

(0015531)
KristÃ³f Szabados
16-12-2019 17:44

How can this be?: "Values of open type occurring on the right hand side of an assignment are compatible with a value “a” of a type “A”, if the actual value contained in the open type value is compatible with “A”." If open types are only allowed "in formal parameters of external and predefined functions" they should not be able to occure on the right hand side of assignments.

(0015532)
Jacob Wieland - Spirent
17-12-2019 07:50

The reason for that sentence is the possibility of formal out parameters of type any (where the actual parameter is semantically on the left hand side of the formal parameter) and inout formal parameters of type any (where the actual parameter is both on the left and the right hand side).
The sentence means, for instance, that if a variable of type A is given to decvalue then it should be assigned something compatible with A if decvalue has decoded successfully. Thus, even the external functions need to respect such type restrictions and cannot assign something of an incompatible type.

(0015589)
Gyorgy Rethy
28-12-2019 15:28

Implemented in final draft 4.11.2