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

ID | Project | Category | View Status | Date Submitted | Last Update
0005811 | Part 01: TTCN-3 Core Language | Technical | public | 25-11-2010 09:11 | 14-12-2010 14:54

Reporter | Andrus Lehtmets |
Assigned To | Benjamin Zeiss |
Priority | normal | Severity | major | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version | v4.3.1 (published 2011-06) | Fixed in Version |  |
Clause Reference(s) | CL
Source (company - Author) | Elvior

Summary | 0005811: Correction in BNF rules for template variables

Description

While the BNF doesn't allow using static templates and template parameters in expressions, the rule for referenced value (494. ValueReference) allows referencing any variable including template variables. This is because the BNF doesn't distinguish between template variable identifiers and value variable identifiers.
Therefore we propose to change the BNF so that these identifiers are distinct and template variables are excluded from using in expressions in the same way as it is done in case of parameter identifiers.
A new rule should be added to the BNF:
TempVarIdentifier ::= Identifier
The existing rules shall be changed as follows:
305. SingleTempVarInstance ::= TempVarIdentifier [ArrayDef] [AssignmentChar TempVarInitialValue]
307. VariableRef ::= ( VarIdentifier | ValueParIdentifier | TempVarIdentifier | TemplateParIdentifier )
[ ExtendedFieldReference ]
544. DefinitionRef ::= StructTypeIdentifier |
EnumTypeIdentifier |
PortTypeIdentifier |
ComponentTypeIdentifier |
SubTypeIdentifier |
ConstIdentifier |
TemplateIdentifier |
AltstepIdentifier |
TestcaseIdentifier |
FunctionIdentifier |
SignatureIdentifier |
VarIdentifier |
TimerIdentifier |
PortIdentifier |
ModuleParIdentifier |
FullGroupIdentifier |
TempVarIdentifier
In addition to that, the syntactical description in chapter 11.2 shall be changed as follows:
var template [ restriction ] Type TempVarIdentifier [ ArrayDef ] ":=" TemplateBody
{ [ "," ] TempVarIdentifier [ ArrayDef ] ":=" TemplateBody } [ ";" ]
It should be also considered to change VarIdentifier to ValueVarIdentifier so that it follows the same naming pattern as parameter identifiers.

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

Relationships

related to | 0005451 | closed | Ina Schieferdecker | Potential BNF Simplification

Attached Files |

Issue History
Date Modified | Username | Field | Change
25-11-2010 09:11 | Andrus Lehtmets | New Issue |
25-11-2010 09:11 | Andrus Lehtmets | Clause Reference(s) | => CL
25-11-2010 09:11 | Andrus Lehtmets | Source (company - Author) | => Elvior
29-11-2010 15:41 | Jacob Wieland - Spirent | Note Added: 0009832 |
30-11-2010 09:34 | Ina Schieferdecker | Project | TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
30-11-2010 17:35 | Gyorgy Rethy | Relationship added | related to 0005451
30-11-2010 17:35 | Gyorgy Rethy | Assigned To | => Benjamin Zeiss
30-11-2010 17:35 | Gyorgy Rethy | Status | new => assigned
30-11-2010 17:35 | Gyorgy Rethy | Target Version | => Edition 4.3.1 (not yet published)
02-12-2010 15:30 | Benjamin Zeiss | Note Added: 0009933 |
14-12-2010 14:54 | Benjamin Zeiss | Status | assigned => closed
14-12-2010 14:54 | Benjamin Zeiss | Note Added: 0009968 |
14-12-2010 14:54 | Benjamin Zeiss | Resolution | open => fixed

Notes

(0009832)
Jacob Wieland - Spirent
29-11-2010 15:41

agreed, but the name should be TemplateVarIdentifier instead of TempVarIdentifier (analogous to TemplateParIdentifier) - also the other existing TempVar-names should be changed to TemplateVar for more consistency.

(0009933)
Benjamin Zeiss
02-12-2010 15:30

In the BNF simplification of CR5451, we got rid of all superfluous Identifier rules and chain rules. Therefore, this issue will be solved once 5451 is reviewed and becoming the "official" BNF.

(0009968)
Benjamin Zeiss
14-12-2010 14:54

As the BNF simplification has been implementend and CR5451 is closed, this issue is automatically done as well. Hence, closing the issue.