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

ID | Project | Category | View Status | Date Submitted | Last Update
0008210 | Part 01: TTCN-3 Core Language | Clarification | public | 13-07-2023 09:46 | 21-12-2023 14:44

Reporter | Matthias Simon |
Assigned To | Gusztáv Adamis |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version |  | Fixed in Version |  |
Clause Reference(s) | 6.2.13.2 -- List subtyping of structured types and anytype
Source (company - Author) | Nokia - Matthias Simon

Summary | 0008210: Clarify list subtyping of record of types

Description

Clarification is needed for example 2 in section "6.2.13.2 -- List subtyping of structured types and anytype".
A comment in example 2 states that type `MyRecordOfSub4` is an empty type, because the second constraint is not a possible value of `MyRecordOfSub1`.
I believe this comment contradicts previous specification:
> [1] Subtyping is possible [...] on an existing parent type,
> [2] [the constraining values] shall be valid templates of the first parent type
The first parent type of `MyRecordOfSub4` is `MyRecordOf` (not not `MyRecordOfSub1`).
I would expect the allowed values for `MyRecordOfSub4` to be {"aa"} and {"bbb","cc"}.
Rationale:
1. a type is a set of allowed values. These sets can be finite (e.g. boolean, integer (1..10), ...) or infinite (e.g. integer). `any` represents the set of all possible values TTCN-3 can represent.
2. a subtype S is the intersection of its parent type P with the set of its value constraints C (S := P*C). When C is omitted we assume it's the `any` type.
Applying above definitions to `MyRecordOfSub4`:
MyRecordOfSub4 := MyRecordOfSub1 * (MyRecordOfSub2, {"ddd","ee","fff"})
MyRecordOfSub4 := ({"aa"},{"bbb","cc"},{"ddd","ee","ff"}) * ({"aa"},{"bbb","cc"},{"ddd","ee","fff"})
MyRecordOfSub4 := ({"aa"},{"bbb","cc"})

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | CR8210-v1.docx (227,442) 10-11-2023 08:47 http://oldforge.etsi.org/mantis/file_download.php?file_id=4127&type=bug CR8210-v2.docx (137,589) 21-12-2023 09:26 http://oldforge.etsi.org/mantis/file_download.php?file_id=4129&type=bug

Issue History
Date Modified | Username | Field | Change
13-07-2023 09:46 | Matthias Simon | New Issue |
05-09-2023 09:14 | Jens Grabowski | Note Added: 0016511 |
05-09-2023 09:14 | Jens Grabowski | Assigned To | => Tomas Urban
05-09-2023 09:14 | Jens Grabowski | Status | new => assigned
05-09-2023 09:27 | Jens Grabowski | Note Added: 0016513 |
05-09-2023 09:38 | Jens Grabowski | Note Added: 0016514 |
07-11-2023 14:20 | Jens Grabowski | Note Added: 0016537 |
10-11-2023 08:47 | Tomas Urban | File Added: CR8210-v1.docx |
10-11-2023 09:04 | Tomas Urban | Note Added: 0016572 |
10-11-2023 09:04 | Tomas Urban | Assigned To | Tomas Urban => Matthias Simon
10-11-2023 09:04 | Tomas Urban | Status | assigned => confirmed
21-12-2023 09:26 | Matthias Simon | File Added: CR8210-v2.docx |
21-12-2023 09:29 | Matthias Simon | Note Added: 0016584 |
21-12-2023 09:30 | Matthias Simon | Assigned To | Matthias Simon => Gusztáv Adamis
21-12-2023 09:30 | Matthias Simon | Status | confirmed => resolved
21-12-2023 14:44 | Jens Grabowski | Note Added: 0016588 |
21-12-2023 14:44 | Jens Grabowski | Status | resolved => closed
21-12-2023 14:44 | Jens Grabowski | Resolution | open => fixed

Notes

(0016511)
Jens Grabowski
05-09-2023 09:14

TTF discussion: Example should be updated.

(0016513)
Jens Grabowski
05-09-2023 09:27

TTF discussion: Example should be updated. The term "first parent type" needs to be specified/clarified. Definitions have to be checked.

(0016514)
Jens Grabowski
05-09-2023 09:38

TTF discussions: Definitions to be clarified/specified: parent type, root type, first parent type, base type

(0016537)
Jens Grabowski
07-11-2023 14:20

TTF discussion: To be resolved in the next version.

(0016572)
Tomas Urban
10-11-2023 09:04

I uploaded the first draft. The mentioned example has a new comment saying that this definition is invalid. I also changed all comments that contained words "causes an error" replacing this expression with "an invalid type" in order to have the same commenting style in all examples.
Terminology changes:
Root type - kept. The meaning is narrower, basically equal to TTCN-3 type keywords
Base type - removed, because it was rarely used, had no fixed meaning and it was possible to replace with other terms. Besides, it was too similar to the basic type.
Parent type - kept. The meaning is narrower, it is used in subtyping only. Components use a different mechanism so they got a different term
First parent type - removed, replaced with a core type
Core type - equal to the root type for basic types, default, timer and open type. In case of all other types, it is basically the type whose declaration defines the type structure and dimensions. Explained in the terminology section.
Supertype - new term for component types, similar to terminology used in the object extension (class -> superclass)

(0016584)
Matthias Simon
21-12-2023 09:29

Great work. It's much easier to understand. I uploaded another version of the document containing a fix for the invalid example and a definition for "supertype". Note, we have not defined what "invalid type" implies. This is a discussion for another TF, though.

(0016588)
Jens Grabowski
21-12-2023 14:44

implemented as suggested.