Logo etsi

ETSI's Bug Tracker

Notice: information submitted on the ETSI issue Tracker may be incorporated in ETSI publication(s) and therefore subject to the ETSI IPR policy.

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007766Part 01: TTCN-3 Core LanguageNew Featurepublic24-05-2018 12:4306-01-2019 08:58
ReporterKristóf Szabados 
Assigned ToGyorgy Rethy 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.11.1 (published 2019-05) 
Summary0007766: enumeration items should accept any value that can be statically evaluated to an integer
DescriptionIn the current standard enumeration items can have user specified values. But only integer numeric values.

Actually it would be possible and usefull for user, to allow using any value that can be evaluated and converted to an integer number statically.

For example:
const integer c_int := 45;
const bitstring c_bit := '10101111'B;

type enumerated MyEnum {
  e_num (1),
  e_bin ('10'B),
  e_oct ('12'O),
  e_hex ('AB'H),
  e_bin_conv (bit2int('0111'B)),
  e_oct_conv (oct2int('34'O)),
  e_hex_conv (hex2int('AC'H)),
  e_num_const (c_int),
  e_bin_const (c_bit)
}
TagsNo tags attached.
Clause Reference(s)6.2.4
Source (company - Author)L.M. Ericsson
Attached Filesdocx file icon CR_7766.docx [^] (164,136 bytes) 17-07-2018 10:12
docx file icon CR_7766-2.docx [^] (186,559 bytes) 19-07-2018 11:02

- Relationships

-  Notes
(0015108)
Jacob Wieland - Spirent (reporter)
05-06-2018 14:57

What is the benefit of this feature?

It just puts strain on the tool to be able to evaluate all these expressions at compile-time to ensure a) the consistency of the enumerated type (no number used twice) and b) the actual value of un-numbered enumerated values which are dependent on the values of numbered ones.

If at all, the only things I would allow would be usages of constant literals and calls, shift/rotate operators and predefined functions.

Otherwise, the boundary of what is still (feasibly) statically evaluatable is fuzzy and some tools would define that boundary differently than others.
(0015136)
Jens Grabowski (manager)
16-07-2018 14:37

STF discussion: ok, but only with the restrictions valid for type definintions and should be of type integer
(0015151)
Kristóf Szabados (reporter)
18-07-2018 08:05

Please check.
(0015172)
Tomas Urban (developer)
19-07-2018 11:04

Review, no major issues found, I only corrected two capitalized identifiers. Ready to be added to the next version of the core language standard.
(0015326)
Gyorgy Rethy (reporter)
06-01-2019 08:58

Added to draft v4.10.2

- Issue History
Date Modified Username Field Change
24-05-2018 12:43 Kristóf Szabados New Issue
05-06-2018 14:57 Jacob Wieland - Spirent Note Added: 0015108
16-07-2018 14:37 Jens Grabowski Note Added: 0015136
16-07-2018 14:37 Jens Grabowski Assigned To => Kristóf Szabados
16-07-2018 14:37 Jens Grabowski Status new => assigned
17-07-2018 10:12 Kristóf Szabados File Added: CR_7766.docx
18-07-2018 08:05 Kristóf Szabados Note Added: 0015151
18-07-2018 08:05 Kristóf Szabados Assigned To Kristóf Szabados => Tomas Urban
18-07-2018 08:05 Kristóf Szabados Status assigned => confirmed
19-07-2018 11:02 Tomas Urban File Added: CR_7766-2.docx
19-07-2018 11:04 Tomas Urban Note Added: 0015172
19-07-2018 11:04 Tomas Urban Status confirmed => resolved
19-07-2018 11:04 Tomas Urban Resolution open => fixed
19-07-2018 11:04 Tomas Urban Assigned To Tomas Urban => Gyorgy Rethy
06-01-2019 08:35 Gyorgy Rethy Project TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
06-01-2019 08:58 Gyorgy Rethy Note Added: 0015326
06-01-2019 08:58 Gyorgy Rethy Status resolved => closed
06-01-2019 08:58 Gyorgy Rethy Fixed in Version => 4.11.1 (published 2019-05)


MantisBT 1.2.14 [^]
Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker