[Previous]
[Next]
[Contents]
[Index]
The Languages Supported in ITEX
The ITEX editing tools support TTCN and ASN.1 as defined in the TTCN standard. The ITEX C Code Generator on the other hand has limitations on its ASN.1 coverage. See C Code Generator for further details on the restrictions that apply.
The language supported by ITEX covers the whole of TTCN and the whole of ASN.1 as it is used in TTCN.
This chapter describes the TTCN and ASN.1 EBNF grammar supported by ITEX and the additional static semantics supported by ITEX.
Table of Contents
The Restrictions in ITEX
The ITEX editing tools support TTCN and ASN.1 as defined in the TTCN standard. The ITEX C Code Generator on the other hand has limitations on its ASN.1 coverage. See C Code Generator for further details on the restrictions that apply. In a few other cases, ITEX has introduced syntactical restrictions, but in all such cases there are simple work-around solutions.
This section describes the modifications in the TTCN and ASN.1 grammar, e.g. the differences between the TTCN/ASN.1 standards and the language supported by ITEX. Modifications meaning that some constructs will not be analyzed correctly even though they have legal syntax according to the TTCN/ASN.1 standards.
External ASN.1 Types
The analysis of an ASN.1 Value requires access to its Type. In TTCN it is possible to refer to an external ASN.1 Type and define an ASN.1 Value of that type.
Therefore an extra field is included in the ASN.1 type by reference tables. The user provides the definition of an external ASN.1 type in this field. The allowed syntax/semantic for this field is the same as for regular ASN.1 type definition. ASN.1 values of such a reference type will be analyzed according to the provided type definition.
The extra field is exported if the option ITEX MP format is chosen. It is, though, not printed together with the ASN.1 type by reference table.
Another solution to this problem is to open the referred ASN.1 module in the Organizer and define an dependencies link to it (see Dependencies for more information). The type definition is fetched from the referred ASN.1 module before it is analyzed. For more information, see ASN.1 External Type/Value References.
ValueList
The problem is that a ValueList constraint (in MatchingSymbol) with only one element has the same construction as a parenthesized Expression in the top level. In addition, a ConstraintValue and an Expression may appear in the same places (since Expression is allowed in the ConstraintValue).
The Analyzer assumes that a ValueList with only one element is a parenthesized Expression wherever it appears.
Example 138
Assuming the Test Suite Constant C1 (of type integer) with value (2 - X), C2 (also of type integer) with value 3 * (M - K) and C3 (also of type integer) with value (3, X). Both C1 and C2 are correct both syntactically and semantically, but C3 has an illegal value because value lists are not allowed in constants.
Example 139
Assume a TTCN ASP Constraint C with parameters P1 and P2 (both of type integer). The parameter P1 has the value (2 + X) and P2 has the value (2 + Y, X). Both P1 and P2 have a correct value but the value of P1 is considered to be an Expression by the Analyzer.
ASN.1 AnyValue
This ASN.1 construct introduces ambiguities into the language. This is because it is hard to find the place where the Type ends and the Value starts.
A restricted form of AnyValue is supported where the Type in the AnyValue must be a reference to a user defined type. This form covers all cases for ASN.1 AnyValue.
Example 140
Assume the ASN.1 Type definition T:
SEQUENCE {f1 INTEGER, f2 LT1 DEFAULT {s1 2, s2 LT2 FALSE}}
LT1 ::= SEQUENCE {s1 INTEGER, s2 ANY}
LT2 ::= BOOLEAN
ASN.1 NamedType & NamedValue
According to the ASN.1 standard (12.5), in some notation within which a type is referenced, the type may be named. In such cases, the ASN.1 standard specifies the use of the notation NamedType which is defined as:
NamedType ::= identifier Type | Type | SelectionType
The value of a type referenced using the NamedType notation shall be defined by the notation NamedValue which is defined as:
NamedValue ::= identifier Value | Value
According to the Information Technology -OSI- ASN.1 (UDC 681.3:621.39) the identifier in the NamedType definition shall be mandatory. The same modification is suggested for the NamedValue.
The ITEX Analyzer do not allow use of the second alternative of either of these constructs, i.e. the naming identifiers are not optional.
Example 141
Assume that the ASN.1 type T is defined as:
SEQUENCE { x INTEGER, y < Element }
Element ::= CHOICE { x BOOLEAN, y INTEGER }
This type definition is legal. The ASN.1 NamedType in T (x & y) shall be unique (y is considered as a NamedType in this case).
A legal value for T is: {x 2, y 4}
Example 142
Assume another ASN.1 type, T', defined as:
SEQUENCE { x INTEGER, y x < Element }
Element ::= CHOICE { x INTEGER, y BOOLEAN }
This type definition is also legal. The ASN.1 NamedType in T' (x & y) shall be unique (x is not considered as a NamedType in this case).
The value {x 2, y 4} is not considered to be a legal value for T' even though it is allowed according to the ASN.1 standard. A legal value (which will be accepted by the Analyzer) is {x 2, y x 4}
An important point to be noticed is that the TTCN standard does not allow the usage of an ASN.1 NamedValue within arithmetic expressions: (TTCN standard, 10.3.2.2).
Data Object Reference
A consequence of the above described restriction is that ITEX does not permit the ComponentPosition mechanism for a DataObjectReference.
Another restriction for DataObjectReference is that ITEX only permits Record referencing via ComponentIdentifiers. The mixed use of ComponentIdentifier, PDU_Identifier, and StructIdentifier for Record Reference is very vaguely described in the Standard. Almost any interpretation of the usage leads to possible ambiguities in the language.
The corresponding grammar for RecordRef (production 311) will in ITEX be:
RecordRef ::= Dot ComponentIdentifier
The "path" leading down to the data object must be fully specified, i.e. all the component identifiers from the top to the bottom must be present.
Macro Value
The wildcard values "?", "*", or "-" may not in ITEX be used in a Constraint where the identifier for the ASP Parameter, PDU Field, CM Element, or Structured Type Element is replaced by the macro symbol.
The Standard does not explicitly permit this nor does it allow this. The interpretation of using the wildcards for macros would however be very ambiguous. Rather than imposing one of the possible interpretations ITEX will not allow the wildcards as macro values at all.
If wildcards are to be used as values for the elements that are inserted via macro expansion they must be written in the elements of a Structured Type Constraint that is referenced as macro value.
The TTCN-MP Syntax Productions in BNF
TTCN Specification
- TTCN_Specification ::= TTCN_Module | Package | Suite
TTCN Module
- TTCN_Module ::= $TTCN_Module TTCN_ModuleId TTCN_ModuleOverviewPart [TTCN_ModuleImportPart] [DeclarationsPart] [ConstraintsPart] [DynamicPart] $End_TTCN_Module
- TTCN_ModuleId ::= $TTCN_ModuleId TTCN_ModuleIdentifier
- TTCN_ModuleIdentifier ::= Identifier
The Module Overview
- TTCN_ModuleOverviewPart ::= $TTCN_ModuleOverviewPart TTCN_ModuleExports [TTCN_ModuleStructure] [TestCaseIndex] [TestStepIndex] [DefaultIndex] $End_TTCN_ModuleOverviewPart
Module Exports
- TTCN_ModuleExports ::= $Begin_TTCN_ModuleExports TTCN_ModuleId [TTCN_ModuleRef] [TTCN_ModuleObjective] [StandardsRef] [PICSref] [PIXITref] [TestMethods] [Comment] ExportedObjects [Comment] $End_ModuleExports
- TTCN_ModuleRef ::= $TTCN_ModuleRef BoundedFreeText
- TTCN_ModuleObjective ::= $TTCN_ModuleObjective BoundedFreeText
- ExportedObjects ::= $ExportedObjects {ExportedObject} $End_ExportedObjects
- ExportedObject ::= $ExportedObject ObjectId ObjectType [SourceInfo] [Comment] $End_ExportedObject
- ObjectId ::= $ObjectId ObjectIdentifier
- ObjectIdentifier ::= Identifier | ObjectTypeReference
- ObjectTypeReference ::= Identifier '[' Identifier ']'
- ObjectType ::= $ObjectType ObjectPredefinedType
- ObjectPredefinedType ::= SimpleType_Object | StructType_Object | ASN1_Type_Object | TS_Op_Object | TS_Proc_Object | TS_Par_Object | SelectExpr_Object | TS_Const_Object | TS_Var_Object | TC_Var_Object | PCO_Type_Object | PCO_Object | CP_Object | Timer_Object | TComp_Object | TCompConfig_Object | TTCN_ASP_Type_Object | ASN1_ASP_Type_Object | TTCN_PDU_Type_Object | ASN1_PDU_Type_Object | TTCN_CM_Type_Object | ASN1_CM_Type_Object | EncodingRule_Object | EncodingVariation_Object | InvalidFieldEncoding_Object | Alias_Object | StructTypeConstraint_Object | ASN1TypeConstraint_Object | TTCN_ASP_Constraint_Object | ASN1_ASP_Constraint_Object | TTCN_PDU_Constraint_Object | ASN1_PDU_Constraint_Object | TTCN_CM_Constraint_Object | ASN1_CM_Constraint_Object | TestCase_Object | TestStep_Object | Default_Object | NamedNumber_Object | Enumeration_Object
- SourceInfo ::= $SourceInfo (SourceIdentifier | ObjectDirective)
- SourceIdentifier ::= SuiteIdentifier | TTCN_ModuleIdentifier | PackageIdentifier
- ObjectDirective ::= '-' | OMIT | EXTERNAL
TTCN Module Structure
- TTCN_ModuleStructure ::= $Begin_TTCN_ModuleStructure Structure&Objectives [Comment] $End_TTCN_ModuleStructure
TTCN Module Import Part
- TTCN_ModuleImportPart ::= $TTCN_ModuleImportPart [ExternalObjects] [ImportDeclarations] $End_TTCN_ModuleImportPart
External Objects
- ExternalObjects ::= $Begin_ExternalObjects {ExternalObject}+ [Comment] $End_ExternalObjects
- ExternalObject ::= $ExternalObject ExternalObjectId ObjectType [Comment] $End_ExternalObject
- ExternalObjectId ::= $ExternalObjectId ExternalObjectIdentifier
- ExternalObjectIdentifier ::= ObjectIdentifier | TS_OpId&ParList | ConsId&ParList | TestStepId&ParList
Import Declarations
- ImportDeclarations ::= $ImportDeclarations {Imports}+ $End_ImportDeclarations
- Imports ::= $Begin_Imports SourceId [SourceRef] [StandardsRef] [Comment] ImportedObjects [Comment] $End_Imports
- SourceId ::= $SourceId SourceIdentifier
- SourceRef ::= $SourceRef BoundedFreeText
- ImportedObjects ::= $ImportedObjects {ImportedObject}+ $End_ImportedObjects
- ImportedObject ::= $ImportedObject ObjectId ObjectType [SourceInfo] [Comment] $End_ImportedObject
Source Package
- Package ::= $Package PackageId PackageExports PackageImports $End_Package
- PackageId ::= $PackageId PackageIdentifier
- PackageIdentifier ::= Identifier
Package exports
- PackageExports ::= $Begin_PackageExports PackageId [Comment] PackageExportedObjects [Comment] $End_PackageExports
- PackageExportedObjects ::= $PackageExportedObjects {PackageExportedObject}+ $End_PackageExportedObjects
- PackageExportedObject ::= $PackageExportedObject ObjectId ObjectType [SourceInfo] [Comment] $End_PackageExportedObject
Package imports and renames
- PackageImports ::= $PackageImports {PackageImport} $End_PackageImports
Package Import
- PackageImport ::= $Begin_PackageImport SourceId [Comment] PackageImportedObjects [Comment] $End_PackageImport
- PackageImportedObjects ::= $PackageImportedObjects {PackageImportedObject}+ $End_PackageImportedObjects
- PackageImportObject ::= $PackageImportObject ObjectId ObjectType [NewObjectDef] [NewObjectId] [Comment] $End_PackageImportObject
- NewObjectDef ::= $NewObjectDef (NewObjectIdentifier | ObjectDirective)
- NewObjectId ::= $NewObjectId NewObjectIdentifier
- NewObjectIdentifier ::= ObjectIdentifier
Test suite
- Suite ::= $Suite SuiteId SuiteOverviewPart [ImportPart] DeclarationsPart ConstraintsPart DynamicPart $End_Suite
- SuiteId ::= $SuiteId SuiteIdentifier
- SuiteIdentifier ::= Identifier
The Test Suite Overview
- SuiteOverviewPart ::= $SuiteOverviewPart [TestSuiteIndex] SuiteStructure [TestCaseIndex] [TestStepIndex] [DefaultIndex] $End_SuiteOverviewPart
Test Suite Index
- TestSuiteIndex ::= $Begin_TestSuiteIndex {ObjectInfo} [Comment] $End_TestSuiteIndex
The Imported Object Info
- ObjectInfo ::= $ObjectInfo ObjectId ObjectType SourceId OrigObjectId [PageNum] [Comment] $End_ObjectInfo
- PageNum ::= $PageNum PageNumber
- PageNumber ::= Number
- OrigObjectId ::= $OrigObjectId ObjectIdentifier
Test Suite Structure
- SuiteStructure ::= $Begin_SuiteStructure SuiteId StandardsRef PICSref PIXITref TestMethods [Comment] Structure&Objectives [Comment] $End_SuiteStructure
- StandardsRef ::= $StandardsRef BoundedFreeText
- PICSref ::= $PICSref BoundedFreeText
- PIXITref ::= $PIXITref BoundedFreeText
- TestMethods ::= $TestMethods BoundedFreeText
- Comment ::= $Comment [BoundedFreeText]
- Structure&Objectives ::= $Structure&Objectives {Structure&Objective} $End_Structure&Objectives
- Structure&Objective ::= $Structure&Objective TestGroupRef SelExprId Objective $End_Structure&Objective
- SelExprId ::= $SelectExprId [SelectExprIdentifier]
Test Case Index
- TestCaseIndex ::= $Begin_TestCaseIndex {CaseIndex} [Comment] $End_TestCaseIndex
- CaseIndex ::= $CaseIndex TestGroupRef TestCaseId SelExprId Description $End_CaseIndex
- Description ::= $Description BoundedFreeText
Test Step Index
- TestStepIndex ::= $Begin_TestStepIndex {StepIndex} [Comment] $End_TestStepIndex
- StepIndex ::= $StepIndex TestStepRef TestStepId Description $End_StepIndex
Default Index
- DefaultIndex ::= $Begin_DefaultIndex {DefIndex} [Comment] $End_DefaultIndex
- DefIndex ::= $DefIndex DefaultRef DefaultId Description $End_DefIndex
The Import Part
- ImportPart ::= $ImportPart ImportDeclarations $End_ImportPart
The Declarations Part
- DeclarationsPart ::= $DeclarationsPart Definitions Parameterization&Selection Declarations ComplexDefinitions $End_DeclarationsPart
Definitions
- Definitions ::= [TS_TypeDefs] [EncodingDefs] [TS_OpDefs] [TS_ProcDefs]
Test Suite Type Definitions
- TS_TypeDefs ::= $TS_TypeDefs [SimpleTypeDefs] [StructTypeDefs] [ASN1_TypeDefs] [ASN1_TypeRefs] $End_TS_TypeDefs
Simple Type Definitions
- SimpleTypeDefs ::= $Begin_SimpleTypeDefs {SimpleTypeDef}+ [Comment] $End_SimpleTypeDefs
- SimpleTypeDef ::= $SimpleTypeDef SimpleTypeId SimpleTypeDefinition [PDU_FieldEncoding] [Comment] $End_SimpleTypeDef
- SimpleTypeId ::= $SimpleTypeId SimpleTypeIdentifier
- SimpleTypeIdentifier ::= Identifier
- SimpleTypeDefinition ::= $SimpleTypeDefinition Type&Restriction
- Type&Restriction ::= Type [Restriction]
- Restriction ::= LengthRestriction | IntegerRange | SimpleValueList
- LengthRestriction ::= SingleTypeLength | RangeTypeLength
- SingleTypeLength ::= "["Number "]"
- RangeTypeLength ::= "[" LowerTypeBound To UpperTypeBound "]"
- IntegerRange ::= "(" LowerTypeBound To UpperTypeBound ")"
- LowerTypeBound ::= [Minus] Number | Minus INFINITY
- UpperTypeBound ::= [Minus] Number | INFINITY
- To ::= TO | ".."
- SimpleValueList ::= "(" [Minus] LiteralValue {Comma [Minus] LiteralValue} ")"
Structured Type Definitions
- StructTypeDefs ::= $StructTypeDefs {StructTypeDef}+ $End_StructTypeDefs
- StructTypeDef ::= $Begin_StructTypeDef StructId [EncVariationId] [Comment] ElemDcls [Comment] $End_StructTypeDef
- StructId ::= $StructId StructId&FullId
- StructId&FullId ::= StructIdentifier [FullIdentifier]
- FullIdentifier ::= "(" BoundedFreeText ")"
- StructIdentifier ::= Identifier
- ElemDcls ::= $ElemDcls {ElemDcl}+ $End_ElemDcls
- ElemDcl ::= $ElemDcl ElemId ElemType [PDU_FieldEncoding] [Comment] $End_ElemDcl
- ElemId ::= $ElemId ElemId&FullId
- ElemId&FullId ::= ElemIdentifier [FullIdentifier]
- ElemIdentifier ::= Identifier
- ElemType ::= $ElemType Type&Attributes
ASN.1 Type Definitions
- ASN1_TypeDefs ::= $ASN1_TypeDefs {ASN1_TypeDef}+ $End_ASN1_TypeDefs
- ASN1_TypeDef ::= $Begin_ASN1_TypeDef ASN1_TypeId [EncVariationId] [Comment] ASN1_TypeDefinition [Comment] $End_ASN1_TypeDef
- ASN1_TypeId ::= $ASN1_TypeId ASN1_TypeId&FullId
- ASN1_TypeId&FullId ::= ASN1_TypeIdentifier [FullIdentifier]
- ASN1_TypeIdentifier ::= Identifier
- ASN1_TypeDefinition ::= $ASN1_TypeDefinition ASN1_Type&LocalTypes $End_ASN1_TypeDefinition
- ASN1_Type&LocalTypes ::= ASN1_Type {ASN1_LocalType}
- ASN1_Type ::= ASN1_main_Type [ASN1_Encoding]
- ASN1_LocalType ::= TypeAssignment
ASN.1 Type Definitions by Reference
- ASN1_TypeRefs ::= $Begin_ASN1_TypeRefs {ASN1_TypeRef}+ [Comment] $End_ASN1_TypeRefs
- ASN1_TypeRef ::= $ASN1_TypeRef ASN1_TypeId ASN1_TypeReference ASN1_ModuleId [EncVariationId] [Comment] [
ASN1_TypeDefinition
] $End_ASN1_TypeRef
- ASN1_TypeReference ::= $ASN1_TypeReference TypeReference
- TypeReference ::= typereference
- ASN1_ModuleId ::= $ASN1_ModuleId ModuleIdentifier
- ModuleIdentifier ::= moduleidentifier
Test Suite Operation Definitions
- TS_OpDefs ::= $TS_OpDefs {TS_OpDef}+ $End_TS_OpDefs
- TS_OpDef ::= $Begin_TS_OpDef TS_OpId TS_OpResult [Comment] TS_OpDescription [Comment] $End_TS_OpDef
- TS_OpId ::= $TS_OpId TS_OpId&ParList
- TS_OpId&ParList ::= TS_OpIdentifier [FormalParList]
- TS_OpIdentifier ::= Identifier
- TS_OpResult ::= $TS_OpResult TypeOrPDU
- TS_OpDescription ::= $TS_OpDescription BoundedFreeText
Test Suite Operation Procedural Definitions
- TS_ProcDefs ::= $TS_ProcDefs {TS_ProcDef}+ $End_TS_ProcDefs
- TS_ProcDef ::= $Begin_TS_ProcDef TS_ProcId TS_ProcResult [Comment] TS_ProcDescription [Comment] $End_TS_ProcDef
- TS_ProcId ::= $TS_ProcId TS_ProcId&ParList
- TS_ProcId&ParList ::= TS_ProcIdentifier [FormalParList]
- TS_ProcIdentifier ::= Identifier
- TS_ProcResult ::= $TS_ProcResult TypeOrPDU
- TS_ProcDescription ::= $TS_ProcDescription TS_OpProcDef $End_TS_ProcDescription
- TS_OpProcDef ::= [VarBlock] ProcStatement
- VarBlock ::= VAR VarDcls ENDVAR
- VarDcls ::= {VarDcl SemiColon}
- VarDcl ::= [STATIC] VarIdentifiers Colon TypeOrPDU [Colon Value]
- VarIdentifiers ::= VarIdentifier {Comma VarIdentifier}
- VarIdentifier ::= Identifier
- ProcStatement ::= ReturnValueStatement | Assignment | IfStatement | WhileLoop | CaseStatement | ProcBlock
- ReturnValueStatement ::= RETURNVALUE Expression
- IfStatement ::= IF Expression THEN {ProcStatement SemiColon}+ [ELSE {ProcStatement SemiColon}+] ENDIF
- WhileLoop ::= WHILE Expression DO {ProcStatement SemiColon}+ ENDWHILE
- CaseStatement ::= CASE Expression OF {CaseClause SemiColon}+ [ELSE {ProcStatement SemiColon}+] ENDCASE
- CaseClause ::= IntegerLabel Colon ProcStatement
- IntegerLabel ::= Number | TS_ParIdentifier | TS_ConstIdentifier
- ProcBlock ::= BEGIN {ProcStatement SemiColon}+ END
Parameterization and Selection
- Parameterization&Selection ::= [TS_ParDcls] [SelectExprDefs]
Test Suite Parameter Declarations
- TS_ParDcls ::= $Begin_TS_ParDcls {TS_ParDcl}+ [Comment] $End_TS_ParDcls
- TS_ParDcl ::= $TS_ParDcl TS_ParId TS_ParType PICS_PIXITref [Comment] $End_TS_ParDcl
- TS_ParId ::= $TS_ParId TS_ParIdentifier
- TS_ParIdentifier ::= Identifier
- TS_ParType ::= $TS_ParType TypeOrPDU
- PICS_PIXITref ::= $PICS_PIXITref BoundedFreeText
Test Case Selection Expression Definitions
- SelectExprDefs ::= $Begin_SelectExprDefs {SelectExprDef}+ [Comment] $End_SelectExprDefs
- SelectExprDef ::= $SelectExprDef SelectExprId SelectExpr [Comment] $End_SelectExprDef
- SelectExprId ::= $SelectExprId SelectExprIdentifier
- SelectExprIdentifier ::= Identifier
- SelectExpr ::= $SelectExpr SelectionExpression
- SelectionExpression ::= Expression
Declarations
- Declarations ::= [TS_ConstDcls] [TS_ConstRefs] [TS_VarDcls] [TC_VarDcls] [PCO_TypeDcls] [PCO_Dcls] [CP_Dcls] [TimerDcls] [TCompDcls TCompConfigDcls]
Test Suite Constant Declarations
- TS_ConstDcls ::= $Begin_TS_ConstDcls {TS_ConstDcl}+ [Comment] $End_TS_ConstDcls
- TS_ConstDcl ::= $TS_ConstDcl TS_ConstId TS_ConstType TS_ConstValue [Comment] $End_TS_ConstDcl
- TS_ConstId ::= $TS_ConstId TS_ConstIdentifier
- TS_ConstIdentifier ::= Identifier
- TS_ConstType ::= $TS_ConstType Type
- TS_ConstValue ::= $TS_ConstValue DeclarationValue
- DeclarationValue ::= Expression
Test Suite Constant Declarations by Reference
- TS_ConstRefs ::= $Begin_TS_ConstRefs {TS_ConstRef}+ [Comment] $End_TS_ConstRefs
- TS_ConstRef ::= $TS_ConstRef TS_ConstId TS_ConstType ASN1_ValueReference ASN1_ModuleId [Comment] [ASN1_Value] $End_TS_ConstRef
- ASN1_ValueReference ::= $ASN1_ValueReference ValueReference
- ValueReference ::= valuereference
Test Suite Variable Declarations
- TS_VarDcls ::= $Begin_TS_VarDcls {TS_VarDcl}+ [Comment] $End_TS_VarDcls
- TS_VarDcl ::= $TS_VarDcl TS_VarId TS_VarType TS_VarValue [Comment] $End_TS_VarDcl
- TS_VarId ::= $TS_VarId TS_VarIdentifier
- TS_VarIdentifier ::= Identifier
- TS_VarType ::= $TS_VarType TypeOrPDU
- TS_VarValue ::= $TS_VarValue [DeclarationValue]
Test Case Variable Declarations
- TC_VarDcls ::= $Begin_TC_VarDcls {TC_VarDcl}+ [Comment] $End_TC_VarDcls
- TC_VarDcl ::= $TC_VarDcl TC_VarId TC_VarType TC_VarValue [Comment] $End_TC_VarDcl
- TC_VarId ::= $TC_VarId TC_VarIdentifier
- TC_VarIdentifier ::= Identifier
- TC_VarType ::= $TC_VarType TypeOrPDU
- TC_VarValue ::= $TC_VarValue [DeclarationValue]
PCO Type Declarations
- PCO_TypeDcls ::= $Begin_PCO_TypeDcls {PCO_TypeDcl}+ [Comment] $End_PCO_TypeDcls
- PCO_TypeDcl ::= $PCO_TypeDcl PCO_TypeId P_Role [Comment] $End_PCO_TypeDcl
- PCO_TypeId ::= $PCO_TypeId PCO_TypeIdentifier
- PCO_TypeIdentifier ::= Identifier
PCO Declarations
- PCO_Dcls ::= $Begin_PCO_Dcls {PCO_Dcl}+ [Comment] $End_PCO_Dcls
- PCO_Dcl ::= $PCO_Dcl PCO_Id PCO_TypeId&MuxValue P_Role [Comment] $End_PCO_Dcl
- PCO_Id ::= $PCO_Id PCO_Identifier
- PCO_Identifier ::= Identifier
- PCO_TypeId&MuxValue ::= $PCO_TypeId PCO_TypeIdentifier ["(" MuxValue ")"]
- MuxValue ::= TS_ParIdentifier
- P_Role ::= $PCO_Role PCO_Role
- PCO_Role ::= UT | LT
Coordination Points Declaration
- CP_Dcls ::= $Begin_CP_Dcls {CP_Dcl}+ [Comment] $End_CP_Dcls
- CP_Dcl ::= $CP_Dcl CP_Id [Comment] $End_CP_Dcl
- CP_Id ::= $CP_Id CP_Identifier
- CP_Identifier ::= Identifier
Timer Declarations
- TimerDcls ::= $Begin_TimerDcls {TimerDcl}+ [Comment] $End_TimerDcls
- TimerDcl ::= $TimerDcl TimerId Duration Unit [Comment] $End_TimerDcl
- TimerId ::= $TimerId TimerIdentifier
- TimerIdentifier ::= Identifier
- Duration ::= $Duration [DeclarationValue]
- Unit ::= $Unit TimeUnit
- TimeUnit ::= ps | ns | us | ms | s | min
Test Component Declarations
- TCompDcls ::= $Begin_TCompDcls {TCompDcl}+ [Comment] $End_TCompDcls
- TCompDcl ::= $TCompDcl TCompId TCompRole NumOf PCOs NumOf CPs [Comment] $EndTCompDcl
- TCompId ::= $TCompId TCompIdentifier
- TCompIdentifier ::= Identifier
- TCompRole ::= $TCompRole TC_Role
- TC_Role ::= MTC | PTC
- NumOf_PCOs ::= $NumOf_PCOs Num_PCOs
- Num_PCOs ::= Number
- NumOf_Cps ::= $NumOf_CPs Num_CPs
- Num_CPs ::= Number
Test Component Configuration Declarations
- TCompConfigDcls ::= $TCompConfigDcls {TCompConfigDcl}+ $End_TCompConfigDcls
- TCompConfigDcl ::= $Begin_TCompConfigDcl TCompConfigId [Comment] TCompConfigInfos [Comment] $EndTCompConfigDcl
- TCompConfigId ::= $TCompConfigId TCompConfigIdentifier
- TCompConfigIdentifier ::= Identifier
- TCompConfigInfos ::= $TCompConfigInfos {TCompConfigInfo}+ $End_TCompConfigInfos
- TCompConfigInfo ::= $TCompConfigInfo TCompUsed PCOs_Used CPs_Used [Comment] $End_TCompConfigInfo
- TCompUsed ::= $TCompUsed TCompIdentifier
- PCOs_Used ::= $PCOs_Used [PCO_List]
- PCO_List ::= PCO_Identifier {Comma PCO_Identifier}
- CPs_Used ::= $CPs_Used [CP_List]
- CP_List ::= CP_Identifier {Comma CP_Identifier}
ASP, PDU and CM Type Definitions
- ComplexDefinitions ::= [ASP_TypeDefs] [PDU_TypeDefs] [CM_TypeDefs] [AliasDefs]
ASP Type Definitions
- ASP_TypeDefs ::= $ASP_TypeDefs [TTCN_ASP_TypeDefs] [ASN1_ASP_TypeDefs] [ASN1_ASP_TypeDefsByRef] $End_ASP_TypeDefs
Tabular ASP Type Definitions
- TTCN_ASP_TypeDefs ::= $TTCN_ASP_TypeDefs {TTCN_ASP_TypeDef}+ $End_TTCN_ASP_TypeDefs
- TTCN_ASP_TypeDef ::= $Begin_TTCN_ASP_TypeDef ASP_Id PCO_Type [Comment] [ASP_ParDcls] [Comment] $End_TTCN_ASP_TypeDef
- PCO_Type ::= $PCO_Type [PCO_TypeIdentifier]
- ASP_Id ::= $ASP_Id ASP_Id&FullId
- ASP_Id&FullId ::= ASP_Identifier [FullIdentifier]
- ASP_Identifier ::= Identifier
- ASP_ParDcls ::= $ASP_ParDcls {ASP_ParDcl} $End_ASP_ParDcls
- ASP_ParDcl ::= $ASP_ParDcl ASP_ParId ASP_ParType [Comment] $End_ASP_ParDcl
- ASP_ParId ::= $ASP_ParId ASP_ParIdOrMacro
- ASP_ParIdOrMacro ::= ASP_ParId&FullId | MacroSymbol
- ASP_ParId&FullId ::= ASP_ParIdentifier [FullIdentifier]
- ASP_ParIdentifier ::= Identifier
- ASP_ParType ::= $ASP_ParType Type&Attributes
ASN.1 ASP Type Definitions
- ASN1_ASP_TypeDefs ::= $ASN1_ASP_TypeDefs {ASN1_ASP_TypeDef} $End_ASN1_ASP_TypeDefs
- ASN1_ASP_TypeDef ::= $Begin_ASN1_ASP_TypeDef ASP_Id PCO_Type [Comment] [ASN1_TypeDefinition] [Comment] $End_ASN1_ASP_TypeDef
ASN.1 ASP Type Definitions by Reference
- ASN1_ASP_TypeDefsByRef ::= $Begin_ASN1_ASP_TypeDefsByRef {ASN1_ASP_TypeDefByRef}+ [Comment] $End_ASN1_ASP_TypeDefsByRef
- ASN1_ASP_TypeDefByRef ::= $ASN1_ASP_TypeDefByRef ASP_Id PCO_Type ASN1_TypeReference ASN1_ModuleId [Comment]
[ASN1_TypeDefinition]
$End_ASN1_ASP_TypeDefByRef
PDU Type Definitions
- PDU_TypeDefs ::= $PDU_TypeDefs [TTCN_PDU_TypeDefs] [ASN1_PDU_TypeDefs] [ASN1_PDU_TypeDefsByRef] $End_PDU_TypeDefs
Tabular PDU Type Definitions
- TTCN_PDU_TypeDefs ::= $TTCN_PDU_TypeDefs {TTCN_PDU_TypeDef}+ $End_TTCN_PDU_TypeDefs
- TTCN_PDU_TypeDef ::= $Begin_TTCN_PDU_TypeDef PDU_Id PCO_Type [PDU_EncodingId] [EncVariationId] [Comment] [PDU_FieldDcls] [Comment] $End_TTCN_PDU_TypeDef
- PDU_Id ::= $PDU_Id PDU_Id&FullId
- PDU_Id&FullId ::= PDU_Identifier [FullIdentifier]
- PDU_Identifier ::= Identifier
- PDU_EncodingId ::= $PDU_EncodingId [EncodingRuleIdentifier]
- PDU_FieldDcls ::= $PDU_FieldDcls {PDU_FieldDcl} $End_PDU_FieldDcls
- PDU_FieldDcl ::= $PDU_FieldDcl PDU_FieldId PDU_FieldType [PDU_FieldEncoding] [Comment] $End_PDU_FieldDcl
- PDU_FieldId ::= $PDU_FieldId PDU_FieldIdOrMacro
- PDU_FieldIdOrMacro ::= PDU_FieldId&FullId | MacroSymbol
- MacroSymbol ::= "<-"
- PDU_FieldId&FullId ::= PDU_FieldIdentifier [FullIdentifier]
- PDU_FieldIdentifier ::= Identifier
- PDU_FieldType ::= $PDU_FieldType Type&Attributes
- Type&Attributes ::= (Type [LengthAttribute]) | PDU
- LengthAttribute ::= SingleLength | RangeLength
- SingleLength ::= "[" Bound "]"
- Bound ::= Number | TS_ParIdentifier | TS_ConstIdentifier
- RangeLength ::= "[" LowerBound To UpperBound "]"
- LowerBound ::= Bound
- UpperBound ::= Bound | INFINITY
ASN.1 PDU Type Definitions
- ASN1_PDU_TypeDefs ::= $ASN1_PDU_TypeDefs {ASN1_PDU_TypeDef} $End_ASN1_PDU_TypeDefs
- ASN1_PDU_TypeDef ::= $Begin_ASN1_PDU_TypeDef PDU_Id PCO_Type [PDU_EncodingId] [EncVariationId] [Comment] [ASN1_TypeDefinition] [Comment] $End_ASN1_PDU_TypeDef
ASN.1 PDU Type Definitions by Reference
- ASN1_PDU_TypeDefsByRef ::= $Begin_ASN1_PDU_TypeDefsByRef {ASN1_PDU_TypeDefByRef}+ [Comment] $End_ASN1_PDU_TypeDefsByRef
- ASN1_PDU_TypeDefByRef ::= $ASN1_PDU_TypeDefByRef PDU_Id PCO_Type ASN1_TypeReference ASN1_ModuleId [PDU_EncodingId] [EncVariationId] [Comment]
[ASN1_TypeDefinition]
$End_ASN1_PDU_TypeDefByRef
CM Type Definitions
- CM_TypeDefs ::= $CM_TypeDefs [TTCN_CM_TypeDefs] [ASN1_CM_TypeDefs] $End_CM_TypeDefs
Tabular CM Type Definitions
- TTCN_CM_TypeDefs ::= $TTCN_CM_TypeDefs {TTCN_CM_TypeDefs}+ $End_TTCN_CM_TypeDefs
- TTCN_CM_TypeDef ::= $Begin_TTCN_CM_TypeDef CM_Id [Comment] [CM_ParDcls] [Comment] $End_TTCN_CM_TypeDef
- CM_Id ::= $CM_Id CM_Identifier
- CM_Identifier ::= Identifier
- CM_ParDcls ::= $CM_ParDcls {CM_ParDcl} $End_CM_ParDcls
- CM_ParDcl ::= $CM_ParDcl CM_ParId CM_ParType [Comment] $End_CM_ParDcl
- CM_ParId ::= $CM_ParId CM_ParIdOrMacro
- CM_ParIdOrMacro ::= CM_ParIdentifier | MacroSymbol
- CM_ParIdentifier ::= Identifier
- CM_ParType ::= $CM_ParType Type&Attributes
ASN1 CM Type Definitions
- ASN1_CM_TypeDefs ::= $ASN1_CM_TypeDefs {ASN1_CM_TypeDefs}+ $End_ASN1_CM_TypeDefs
- ASN1_CM_TypeDef ::= $Begin_ASN1_CM_TypeDef CM_Id [Comment] [ASN1_TypeDefinition] [Comment] $End_ASN1_CM_TypeDef
Varieties of Encoding Definition
- EncodingDefs ::= $EncodingDefs [EncodingDefinitions] [EncodingVariations] [InvalidFieldEncodingDefs] $End_EncodingDefs
Encoding Definitions
- EncodingDefinitions ::= $Begin_EncodingDefinitions {EncodingDefinition}+ [Comment] $End_EncodingDefinitions
- EncodingDefinition ::= $EncodingDefinition EncodingRuleId EncodingRef EncodingDefault [Comment] $End_EncodingDefinition
- EncodingRuleId ::= $EncodingRuleId EncodingRuleIdentifier
- EncodingRuleIdentifier ::= Identifier
- EncodingRef ::= $EncodingRef EncodingReference
- EncodingReference ::= BoundedFreeText
- EncodingDefault ::= $EncodingDefault [DefaultExpression]
- DefaultExpression ::= Expression
Encoding Variations
- EncodingVariations ::= $EncodingVariations {EncodingVariationSet}+ $End_EncodingVariations
- EncodingVariationSet ::= $Begin_EncodingVariationSet EncodingRuleId Encoding_TypeList [Comment] {EncodingVariation}+ [Comment] $End_EncodingVariationSet
- Encoding_TypeList ::= $Encoding_TypeList [TypeList]
- TypeList ::= Type {Comma Type}
- EncodingVariation ::= $EncodingVariation EncodingVariationId VariationRef VariationDefault [Comment] $End_EncodingVariation
- EncodingVariationId ::= $EncodingVariationId EncVariationId&ParList
- EncVariationId&ParList ::= EncVariationIdentifier [FormalParList]
- EncVariationIdentifier ::= Identifier
- VariationRef ::= $VariationRef VariationReference
- VariationReference ::= BoundedFreeText
- VariationDefault ::= $VariationDefault [DefaultExpression]
Invalid Encoding Definitions
- InvalidFieldEncodingDefs ::= $InvalidFieldEncodingDefs {InvalidFieldEncodingDef}+ $End_InvalidFieldEncodingDefs
- InvalidFieldEncodingDef ::= $Begin_InvalidFieldEncodingDef InvalidFieldEncodingId Encoding_TypeList [Comment] InvalidFieldEncodingDefinition [Comment] $End_InvalidFieldEncodingDef
- InvalidFieldEncodingId ::= $InvalidFieldEncodingId InvalidFieldEncodingId&ParList
- InvalidFieldEncodingId&ParList ::= InvalidFieldEncodingIdentifier [FormalParList]
- InvalidFieldEncodingIdentifier ::= Identifier
- InvalidFieldEncodingDefinition ::= $InvalidFieldEncodingDefinition TS_OpProcDef $End_InvalidFieldEncodingDefinition
Alias Definitions
- AliasDefs ::= $Begin_AliasDefs {AliasDef}+ [Comment] $End_AliasDefs
- AliasDef ::= $AliasDef AliasId ExpandedId [Comment] $End_AliasDef
- AliasId ::= $AliasId AliasIdentifier
- AliasIdentifier ::= Identifier
- ExpandedId ::= $ExpandedId Expansion
- Expansion ::= ASP_Identifier | PDU_Identifier
The Constraints Part
- ConstraintsPart ::= $ConstraintsPart [TS_TypeConstraints] [ASP_Constraints] [PDU_Constraints][CM_Constraints] $End_ConstraintsPart
Test Suite Type Constraint Declarations
- TS_TypeConstraints ::= $TS_TypeConstraints [StructTypeConstraints] [ASN1_TypeConstraints] $End_TS_TypeConstraints
Structured Type Constraint Declarations
- StructTypeConstraints ::= $StructTypeConstraints {StructTypeConstraint}+ $End_StructTypeConstraints
- StructTypeConstraint ::= $Begin_StructTypeConstraint ConsId StructId DerivPath [EncVariationId] [Comment] ElemValues [Comment] $End_StructTypeConstraint
- EncVariationId ::= $EncVariationId [EncVariationCall]
- EncVariationCall ::= EncVariationIdentifier [ActualParList]
- ElemValues ::= $ElemValues {ElemValue}+ $End_ElemValues
- ElemValue ::= $ElemValue ElemId ConsValue [PDU_FieldEncoding] [Comment] $End_ElemValue
- PDU_FieldEncoding ::= $PDU_FieldEncoding [PDU_FieldEncodingCall]
- PDU_FieldEncodingCall ::= EncVariationCall | InvalidFieldEncodingCall
- InvalidFieldEncodingCall ::= InvalidFieldEncodingIdentifier ( ActualParList | "(" ")" )
ASN.1 Type Constraint Declarations
- ASN1_TypeConstraints ::= $ASN1_TypeConstraints {ASN1_TypeConstraint}+ $End_ASN1_TypeConstraints
- ASN1_TypeConstraint ::= $Begin_ASN1_TypeConstraint ConsId ASN1_TypeId DerivPath [EncVariationId] [Comment] ASN1_ConsValue [Comment] $End_ASN1_TypeConstraint
ASP Constraint Declarations
- ASP_Constraints ::= $ASP_Constraints [TTCN_ASP_Constraints] [ASN1_ASP_Constraints] $End_ASP_Constraints
Tabular ASP Constraint Declarations
- TTCN_ASP_Constraints ::= $TTCN_ASP_Constraints {TTCN_ASP_Constraint}+ $End_TTCN_ASP_Constraints
- TTCN_ASP_Constraint ::= $Begin_TTCN_ASP_Constraint ConsId ASP_Id DerivPath [Comment] [ASP_ParValues] [Comment] $End_TTCN_ASP_Constraint
- ASP_ParValues ::= $ASP_ParValues {ASP_ParValue}+ $End_ASP_ParValues
- ASP_ParValue ::= $ASP_ParValue ASP_ParId ConsValue [Comment] $End_ASP_ParValue
ASN.1 ASP Constraint Declarations
- ASN1_ASP_Constraints ::= $ASN1_ASP_Constraints {ASN1_ASP_Constraint}+ $End_ASN1_ASP_Constraints
- ASN1_ASP_Constraint ::= $Begin_ASN1_ASP_Constraint ConsId ASP_Id DerivPath [Comment] [ASN1_ConsValue] [Comment] $End_ASN1_ASP_Constraint
PDU Constraint Declarations
- PDU_Constraints ::= $PDU_Constraints [TTCN_PDU_Constraints] [ASN1_PDU_Constraints] $End_PDU_Constraints
Tabular PDU Constraint Declarations
- TTCN_PDU_Constraints ::= $TTCN_PDU_Constraints {TTCN_PDU_Constraint}+ $End_TTCN_PDU_Constraints
- TTCN_PDU_Constraint ::= $Begin_TTCN_PDU_Constraint ConsId PDU_Id DerivPath [EncRuleId] [EncVariationId] [Comment] [PDU_FieldValues] [Comment] $End_TTCN_PDU_Constraint
- EncRuleId ::= $EncRuleId [EncodingRuleIdentifier]
- ConsId ::= $ConsId ConsId&ParList
- ConsId&ParList ::= ConstraintIdentifier [FormalParList]
- ConstraintIdentifier ::= Identifier
- DerivPath ::= $DerivPath [DerivationPath]
- DerivationPath ::= {ConstraintIdentifier Dot}+
- PDU_FieldValues ::= $PDU_FieldValues {PDU_FieldValue}+ $End_PDU_FieldValues
- PDU_FieldValue ::= $PDU_FieldValue PDU_FieldId ConsValue [PDU_FieldEncoding] [Comment] $End_PDU_FieldValue
- ConsValue ::= $ConsValue ConstraintValue&Attributes
- ConstraintValue&Attributes ::= ConstraintValue ValueAttributes
- ConstraintValue ::= ConstraintExpression | MatchingSymbol | ConsRef
- ConstraintExpression ::= Expression
- MatchingSymbol ::= Complement | Omit | AnyValue | AnyOrOmit | ValueList | ValueRange | SuperSet | SubSet | Permutation
- Complement ::= COMPLEMENT ValueList
- Omit ::= Dash | OMIT
- AnyValue ::= "?"
- AnyOrOmit ::= "*"
- ValueList ::= "(" ConstraintValue&Attributes { Comma ConstraintValue&Attributes }")"
- ValueRange ::= "(" ValRange ")"
- ValRange ::= (LowerRangeBound To UpperRangeBound)
- LowerRangeBound ::= ConstraintExpression | Minus INFINITY
- UpperRangeBound ::= ConstraintExpression | INFINITY
- SuperSet ::= SUPERSET "(" ConstraintValue&Attributes ")"
- SubSet ::= SUBSET "(" ConstraintValue&Attributes ")"
- Permutation ::= PERMUTATION ValueList
- ValueAttributes ::= [ValueLength] [IF_PRESENT] [ASN1_Encoding]
- ASN1_Encoding ::= ENC PDU_FieldEncodingCall
- ValueLength ::= SingleValueLength | RangeValueLength
- SingleValueLength ::= "[" ValueBound "]"
- ValueBound ::= Number | TS_ParIdentifier | TS_ConstIdentifier | FormalParIdentifier
- RangeValueLength ::= "[" LowerValueBound To UpperValueBound "]"
- LowerValueBound ::= ValueBound
- UpperValueBound ::= ValueBound | INFINITY
ASN.1 PDU Constraint Declarations
- ASN1_PDU_Constraints ::= $ASN1_PDU_Constraints {ASN1_PDU_Constraint}+ $End_ASN1_PDU_Constraints
- ASN1_PDU_Constraint ::= $Begin_ASN1_PDU_Constraint ConsId PDU_Id DerivPath [EncRuleId] [EncVariationId] [Comment] [ASN1_ConsValue] [Comment] $End_ASN1_PDU_Constraint
- ASN1_ConsValue ::= $ASN1_ConsValue ConstraintValue&AttributesOrReplace $End_ASN1_ConsValue
- ConstraintValue&AttributesOrReplace ::= ConstraintValue&Attributes | Replacement {Comma Replacement}
- Replacement ::= (REPLACE ReferenceList BY ConstraintValue&Attributes) | (OMIT ReferenceList)
- ReferenceList ::= (ArrayRef | ComponentIdentifier | ComponentPosition) {ComponentReference}
CM Constraint Declarations
- CM_Constraints ::= $CM_Constraints [TTCN_CM_Constraints] [ASN1_CM_Constraints] $End_CM_Constraints
Tabular CM Constraint Declaration
- TTCN_CM_Constraints ::= $TTCN_CM_Constraints {TTCN_CM_Constraint}+ $End_TTCN_CM_Constraints
- TTCN_CM_Constraint ::= $Begin_TTCN_CM_Constraint ConsId CM_Id DerivPath [Comment] [CM_ParValues] [Comment] $End_TTCN_CM_Constraint
- CM_ParValues ::= $CM_ParValues {CM_ParValue} $End_CM_ParValues
- CM_ParValue ::= $CM_ParValue CM_ParId ConsValue [Comment] $End_CM_ParValue
ASN.1 CM Constraint Declaration
- ASN1_CM_Constraints ::= $ASN1_CM_Constraints {ASN1_CM_Constraint}+ $End_ASN1_CM_Constraints
- ASN1_CM_Constraint ::= $Begin_ASN1_CM_Constraint ConsId CM_Id DerivPath [Comment] [ASN1_ConsValue] [Comment] $End_ASN1_CM_Constraint
The Dynamic Part
- DynamicPart ::= $DynamicPart [TestCases] [TestStepLibrary] [DefaultsLibrary] $End_DynamicPart
Test Cases
- TestCases ::= $TestCases {TestGroup | TestCase
| CompactTestGroup
}+ $End_TestCases
- TestGroup ::= $TestGroup TestGroupId
[SelExprId]
[Objective]
{TestGroup | TestCase}+ $End_TestGroup
- TestGroupId ::= $TestGroupId TestGroupIdentifier
- TestGroupIdentifier ::= Identifier
- TestCase ::= $Begin_TestCase TestCaseId TestGroupRef TestPurpose [Configuration] DefaultsRef [Comment]
[SelExprId]
[Description]
BehaviourDescription [Comment] $End_TestCase
- TestCaseId ::= $TestCaseId TestCaseIdentifier
- TestCaseIdentifier ::= Identifier
- TestGroupRef ::= $TestGroupRef TestGroupReference
- TestGroupReference ::= [SuiteIdentifier "/"] {TestGroupIdentifier "/"}
- TestPurpose ::= $TestPurpose BoundedFreeText
- Configuration ::= $Configuration TCompConfigIdentifier
- DefaultsRef ::= $DefaultsRef [DefaultRefList]
- DefaultRefList ::= DefaultReference {Comma DefaultReference}
- DefaultReference ::= DefaultIdentifier [ActualParList]
- CompactTestGroup ::= $Begin_CompactTestGroup TestGroupId DefaultsRef
[SelExprId]
[Objective]
{CompactTestCase} $End_CompactTestGroup
- CompactTestCase ::= $CompactTestCase TestCaseId TestPurpose TestStepAttachment [Comment]
[SelExprId]
[Description]
$End_CompactTestCase
- TestStepAttachment ::= $TestStepAttachment Attach
Test Step Library
- TestStepLibrary ::= $TestStepLibrary {TestStepGroup | TestStep}+ $End_TestStepLibrary
- TestStepGroup ::= $TestStepGroup TestStepGroupId {TestStepGroup | TestStep}+ $End_TestStepGroup
- TestStepGroupId ::= $TestStepGroupId TestStepGroupIdentifier
- TestStepGroupIdentifier ::= Identifier
- TestStep ::= $Begin_TestStep TestStepId TestStepRef Objective DefaultsRef [Comment]
[Description]
BehaviourDescription [Comment] $End_TestStep
- TestStepId ::= $TestStepId TestStepId&ParList
- TestStepId&ParList ::= TestStepIdentifier [FormalParList]
- TestStepIdentifier ::= Identifier
- TestStepRef ::= $TestStepRef TestStepGroupReference
- TestStepGroupReference ::= [SuiteIdentifier "/"] {TestStepGroupIdentifier "/"}
- Objective ::= $Objective BoundedFreeText
Default Library
- DefaultsLibrary ::= $DefaultsLibrary {DefaultGroup | Default}+ $End_DefaultsLibrary
- DefaultGroup ::= $DefaultGroup DefaultGroupId {DefaultGroup | Default}+ $End_DefaultGroup
- DefaultGroupId ::= $DefaultGroupId DefaultGroupIdentifier
- Default ::= $Begin_Default DefaultId DefaultRef Objective [Comment]
[Description]
BehaviourDescription [Comment] $End_Default
- DefaultRef ::= $DefaultRef DefaultGroupReference
- DefaultId ::= $DefaultId DefaultId&ParList
- DefaultId&ParList ::= DefaultIdentifier [FormalParList]
- DefaultIdentifier ::= Identifier
- DefaultGroupReference ::= [SuiteIdentifier "/"] {DefaultGroupIdentifier "/"}
- DefaultGroupIdentifier ::= Identifier
Behaviour descriptions
- BehaviourDescription ::= $BehaviourDescription RootTree {LocalTree} $End_BehaviourDescription
- RootTree ::= {BehaviourLine}+
- LocalTree ::= Header {BehaviourLine}+
- Header ::= $Header TreeHeader
- TreeHeader ::= TreeIdentifier [FormalParList]
- TreeIdentifier ::= Identifier
- FormalParList ::= "(" FormalPar&Type {SemiColon FormalPar&Type} ")"
- FormalPar&Type ::= FormalParIdentifier {Comma FormalParIdentifier} Colon FormalParType
- FormalParIdentifier ::= Identifier
- FormalParType ::= Type | PCO_TypeIdentifier | PDU | CP | TIMER
Behaviour lines
- BehaviourLine ::= $BehaviourLine LabelId Line Cref VerdictId [Comment] $End_BehaviourLine
- Line ::= $Line Indentation StatementLine
- Indentation ::= "[" Number "]"
- LabelId ::= $LabelId [Label]
- Label ::= Identifier
- Cref ::= $Cref [ConstraintReference]
- ConstraintReference ::= ConsRef | FormalParIdentifier | AnyValue
- ConsRef ::= ConstraintIdentifier [ActualCrefParList]
- ActualCrefParList ::= "(" ActualCrefPar {Comma ActualCrefPar} ")"
- ActualCrefPar ::= Value
- VerdictId ::= $VerdictId [Verdict]
- Verdict ::= Pass | Fail | Inconclusive | Result
- Pass ::= PASS | P | "(" PASS ")" | "(" P ")"
- Fail ::= FAIL | F | "(" FAIL ")" | "(" F ")"
- Inconclusive ::= INCONC | I | "(" INCONC ")" | "(" I ")"
- Result ::= R
TTCN statements
- StatementLine ::= (Event [Qualifier] [AssignmentList] [TimerOps]) | (Qualifier [AssignmentList] [TimerOps]) | (AssignmentList [TimerOps]) | TimerOps | Construct | ImplicitSend
- Event ::= Send | Receive | Otherwise | Timeout | Done
- Qualifier ::= "[" Expression "]"
- Send ::= [PCO_Identifier | CP_Identifier | FormalParIdentifier] "!" (ASP_Identifier | PDU_Identifier | CM_Identifier)
- ImplicitSend ::= "<" IUT "!" (ASP_Identifier | PDU_Identifier) ">"
- Receive ::= [PCO_Identifier | CP_Identifier | FormalParIdentifier] "?" (ASP_Identifier | PDU_Identifier | CM_Identifier)
- Otherwise ::= [PCO_Identifier | FormalParIdentifier] "?" OTHERWISE
- Timeout ::= "?" TIMEOUT [TimerIdentifier | FormalParIdentifier]
- Done ::= "?" DONE "(" [TCompIdList] ")"
- TCompIdList ::= TCompIdentifier {Comma TCompIdentifier}
- Construct ::= GoTo | Attach | Repeat | Return | Activate | Create
- Activate ::= ACTIVATE "(" [DefaultRefList] ")"
- Return ::= RETURN
- Create ::= CREATE "(" CreateList ")"
- CreateList ::= CreateTComp {Comma CreateTComp}
- CreateTComp ::= TCompIdentifier Colon TreeReference [ActualParList]
- GoTo ::= ("->" | GOTO) Label
- Attach ::= "+" TreeReference [ActualParList]
- Repeat ::= REPEAT TreeReference [ActualParList] UNTIL Qualifier
- TreeReference ::= TestStepIdentifier | TreeIdentifier
- ActualParList ::= "(" ActualPar {Comma ActualPar} ")"
- ActualPar ::= Value | PCO_Identifier | CP_Identifier | TimerIdentifier
Expressions
- AssignmentList ::= "(" Assignment {Comma Assignment} ")"
- Assignment ::= DataObjectReference ":=" Expression
- Expression ::= SimpleExpression [RelOp SimpleExpression]
- SimpleExpression ::= Term {AddOp Term}
- Term ::= Factor {MultiplyOp Factor}
- Factor ::= [UnaryOp] Primary
- Primary ::= Value | DataObjectReference | OpCall | SelectExprIdentifier | "(" Expression ")"
- DataObjectReference ::= DataObjectIdentifier {ComponentReference}
- DataObjectIdentifier ::= TS_ParIdentifier | TS_ConstIdentifier | TS_VarIdentifier | TC_VarIdentifier | FormalParIdentifier | ASP_Identifier | PDU_Identifier | CM_Identifier
- ComponentReference ::= RecordRef | ArrayRef | BitRef
- RecordRef ::= Dot (ComponentIdentifier | PDU_Identifier | StructIdentifier | ComponentPosition)
- ComponentIdentifier ::= ASP_ParIdentifier | PDU_FieldIdentifier | CM_ParIdentifier | ElemIdentifier | ASN1_Identifier
- ASN1_Identifier ::= Identifier
- ComponentPosition ::= "("Number")"
- ArrayRef ::= Dot "[" ComponentNumber "]"
- ComponentNumber ::= Expression
- BitRef ::= Dot (BitIdentifier | "[" BitNumber "]")
- BitIdentifier ::= Identifier
- BitNumber ::= Expression
- OpCall ::= OpIdentifier ( ActualParList | "(" ")" )
- OpIdentifier ::= TS_OpIdentifier | PredefinedOpIdentifier
- PredefinedOpIdentifier ::= BIT_TO_INT | HEX_TO_INT | INT_TO_BIT | INT_TO_HEX | IS_CHOSEN | IS_PRESENT | LENGTH_OF | NUMBER_OF_ELEMENT
- AddOp ::= "+" | "-" | OR
- MultiplyOp ::= "*" | "/" | MOD | AND
- UnaryOp ::= "+" | "-" | NOT
- RelOp ::= "=" | "<" | ">" | "<>" | ">=" | "<="
Timer operations
- TimerOps ::= TimerOp {Comma TimerOp}
- TimerOp ::= StartTimer | CancelTimer | ReadTimer
- StartTimer ::= START TimerIdentifier [ "(" TimerValue ")"]
- CancelTimer ::= CANCEL [TimerIdentifier]
- TimerValue ::= Expression
- ReadTimer ::= READTIMER TimerIdentifier "(" DataObjectReference")"
Types
- TypeOrPDU ::= Type | PDU
- Type ::= PredefinedType | ReferenceType
Predefined types
- PredefinedType ::= INTEGER | BOOLEAN | BITSTRING | HEXSTRING | OCTETSTRING | R_Type | CharacterString
- CharacterString ::= NumericString | PrintableString | TeletexString | VideotexString | VisibleString | IA5String | GraphicString | GeneralString | T61String | ISO646String
Referenced types
- ReferenceType ::= TS_TypeIdentifier | ASP_Identifier | PDU_Identifier | CM_Identifier
- TS_TypeIdentifier ::= SimpleTypeIdentifier | StructIdentifier | ASN1_TypeIdentifier
Values
- Value ::= LiteralValue | ASN1_Value [ASN1_Encoding]
- LiteralValue ::= Number | BooleanValue | Bstring | Hstring | Ostring | Cstring | R_Value
- Number ::= (NonZeroNum {Num} ) | 0
- NonZeroNum ::= 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
- Num ::= 0 | NonZeroNum
- BooleanValue ::= TRUE | FALSE
- Bstring ::= "'" {Bin | Wildcard} "'" B
- Bin ::= 0 | 1
- Hstring ::= "'" {Hex | Wildcard} "'" H
- Hex ::= Num | A | B | C | D | E | F
- Ostring ::= "'" {Oct | Wildcard} "'" O
- Oct ::= Hex Hex
- Cstring ::= """ {Char | Wildcard | "\"} """
- Char ::= /* REFERENCE - A character defined by the relevant character string type */
- Wildcard ::= AnyOne | AnyOrNone
- AnyOne ::= "?"
- AnyOrNone ::= "*"
- R_Value ::= pass | fail | inconc | none
- Identifier ::= Alpha{AlphaNum | Underscore}
- Alpha ::= UpperAlpha | LowerAlpha
- AlphaNum ::= Alpha | Num
- UpperAlpha ::= A | B| C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
- LowerAlpha ::= a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | p | q | r | s | t | u | v | w | x | y | z
- ExtendedAlphaNum ::= /* REFERENCE - A character from any character set defined in ISO/IEC 10646 */
- BoundedFreeText ::="/*" FreeText "*/"
- FreeText ::= {ExtendedAlphaNum}
Miscellaneous productions
- Comma ::= ","
- Dot ::= "."
- Dash ::= "-"
- Minus ::= "-"
- SemiColon ::= ";"
- Colon ::= ":"
- Underscore ::= "_"
The ASN1 Syntax Productions in BNF
- moduleidentifier ::= BoundedFreeText
- typereference ::= Identifier
- valuereference ::= Identifier
- TypeAssignment ::= typereference "::=" ASN1_main_Type
- ASN1_main_Type ::= BuiltinType | DefinedType | SubType
- BuiltinType ::= BooleanType | IntegerType | BitStringType | OctetStringType
| NullType | SequenceType | SequenceOfType | SetType | SetOfType | ChoiceType | SelectionType | TaggedType | AnyType | ObjectIdentifierType
| CharacterStringType | UsefulType | EnumeratedType | RealType
- NamedType ::= Identifier ASN1_main_Type | ASN1_main_Type | SelectionType
- ASN1_Value ::= BuiltinValue | DefinedValue
- BuiltinValue ::= BooleanValue | IntegerValue | BitStringValue | OctetStringValue | NullValue | SequenceValue | SequenceOfValue | SetValue | SetOfValue
| ChoiceValue | SelectionValue | TaggedValue | ASN1_AnyValue
| ObjectIdentifierValue | CharacterStringValue | EnumeratedValue | RealValue
- NamedValue ::= Identifier ASN1_Value | ASN1_Value
- BooleanType ::= BOOLEAN
- IntegerType ::= INTEGER | INTEGER "{" NamedNumberList "}"
- NamedNumberList ::= NamedNumber | NamedNumberList Comma
NamedNumber
- NamedNumber ::= Identifier "(" Minus Number ")" | Identifier "(" Number ")"
| Identifier "(" DefinedValue ")"
- IntegerValue ::= Minus Number | Number | Identifier
- EnumeratedType ::= ENUMERATED "{" Enumeration "}"
- Enumeration ::= NamedNumber | Enumeration Comma NamedNumber
- EnumeratedValue ::= Identifier
- RealType ::= REAL
- RealValue ::= NumericalRealValue | SpecialRealValue
- NumericalRealValue ::= "{" Mantissa Comma Base Comma Exponent "}"
- Mantissa ::= Minus Number | Number
- Base ::= Two | Ten
- Exponent ::= Minus Number | Number
- SpecialRealValue ::= PLUS_INFINITY | MINUS_INFINITY
- BitStringType ::= BIT STRING | BIT STRING "{" NamedBitList "}"
- NamedBitList ::= NamedBit | NamedBitList Comma NamedBitList
- NamedBit ::= Identifier "(" Number ")" | Identifier "(" DefinedValue ")"
- BitStringValue ::= Bstring | Hstring | "{" IdentifierList "}" | "{" "}"
- IdentifierList ::= Identifier | IdentifierList Comma Identifier
- OctetStringType ::= OCTET STRING
- OctetStringValue ::= Bstring | Hstring
- NullType ::= NULL
- NullValue ::= NULL
- SequenceType ::= SEQUENCE "{" ElementTypeList "}"
- ElementTypeList ::= | ElementType | ElementTypeList Comma ElementType
- ElementType ::= NamedType | NamedType OPTIONAL | NamedType DEFAULT ASN1_Value | COMPONENTS OF ASN1_main_Type
- SequenceValue ::= "{" ElementValueList "}" | "{" "}"
- ElementValueList ::= NamedValue | ElementValueList Comma NamedValue
- SequenceOfType ::= SEQUENCE OF ASN1_main_Type | SEQUENCE
- SequenceOfValue ::= LBRACE ASN1_ValueList RBRACE | LBRACE RBRACE
- ASN1_ValueList ::= ASN1_Value | ASN1_ValueList Comma ASN1_Value
- SetType ::= SET "{" ElementTypeList "}"
- SetValue ::= "{" ElementValueList "}" | "{" "}"
- SetOfType ::= SET OF ASN1_main_Type | SET
- SetOfValue ::= "{" ASN1_ValueList "}" | "{" "}"
- ChoiceType ::= CHOICE "{" AlternativeTypeList "}"
- AlternativeTypeList ::= NamedType | AlternativeTypeList Comma NamedType
- ChoiceValue ::= NamedValue
- SelectionType ::= Identifier "<" ASN1_main_Type
- SelectionValue ::= NamedValue
- TaggedType ::= Tag ASN1_main_Type | Tag IMPLICIT ASN1_main_Type
| Tag EXPLICIT ASN1_main_Type
- Tag ::= "(" Class ClassNumber ")"
- Class ::= UNIVERSAL | APPLICATION | PRIVATE | empty
- ClassNumber ::= Number | DefinedValue
- TaggedValue ::= ASN1_Value
- AnyType ::= ANY | ANY DEFINED_ BY Identifier
- ASN1_AnyValue ::= ASN1_main_Type Colon ASN1_Value
- ObjectIdentifierType ::= OBJECT IDENTIFIER
- ObjectIdentifierValue ::= "{" ObjIdComponentList "}"
| "{" DefinedValue ObjIdComponentList "}"
- ObjIdComponentList ::= ObjComponent | ObjIdComponentList ObjComponent
- ObjComponent ::= NameForm | NumberForm | NameAndNumberForm
- NameForm ::= Identifier
- NumberForm ::= Number | DefinedValue
- NameAndNumberForm ::= Identifier "{" NumberForm "}"
- CharacterStringType ::= Identifier
- CharacterStringValue ::= Cstring
- UsefulType ::= Identifier
- SubType ::= ParentType SubtypeSpec | SET SizeConstraint OF ASN1_main_Type | SEQUENCE SizeConstraint OF ASN1_main_Type
- ParentType ::= ASN1_main_Type
- SubtypeSpec ::= "(" SubtypeValueSetList ")"
- SubtypeValueSetList ::= SubtypeValueSet | SubtypeValueSetList `|'
SubtypeValueSet
- SubtypeValueSet ::= ASN1_Value | ContainedSubtype | ASN1_ValueRange
| PermittedAlphabet | SizeConstraint | InnerTypeConstraints
- ContainedSubtype ::= INCLUDES ASN1_main_Type
- ASN1_ValueRange ::= LowerEndpoint DotDot UpperEndpoint
- LowerEndpoint ::= LowerEndValue | LowerEndValue "<"
- LowerEndValue ::= ASN1_Value | MIN
- UpperEndpoint ::= UpperEndValue | "<" UpperEndValue
- UpperEndValue ::= ASN1_Value | MAX
- SizeConstraint ::= SIZE SubtypeSpec
- PermittedAlphabet ::= FROM SubtypeSpec
- InnerTypeConstraints ::= WITH COMPONENT SingleTypeConstraint
| WITH COMPONENTS MultipleTypeConstraints
- SingleTypeConstraint ::= SubtypeSpec
- MultipleTypeConstraints ::= FullSpecification | PartialSpecification
- FullSpecification ::= "{" TypeConstraints "}"
- PartialSpecification ::= "{" DotDotDot Comma TypeConstraints "}"
- TypeConstraints ::= NamedConstraint | NamedConstraint Comma
TypeConstraints
- NamedConstraint ::= Identifier Constraint | Constraint
- Constraint ::= ValueConstraint PresenceConstraint
- ValueConstraint ::= SubtypeSpec | empty
- PresenceConstraint ::= PRESENT | ABSENT | OPTIONAL | empty
TTCN Static Semantics
The following are those static semantics from the TTCN and ASN.1 standards which are checked by the Analyzer tool in ITEX.
Test Suite
SuiteId shall be the same as the SuiteId declared in Test Suite Structure table (Suite Structure).
Test Case Index
Test Cases shall be listed in the order that they exist in the dynamic part.
Test Step Index
TestStepId shall not include a formal parameter list.
Test Steps shall be listed in the order that they exist in the dynamic part.
Default Index
DefaultId shall not include a formal parameter list.
Defaults shall be listed in the order that they exist in the dynamic part.
Test Suite Type Definitions
Wherever types are referenced within Test Suite Type Definitions those references shall not be recursive (neither directly or indirectly)
Simple Type Definitions
The base type1 shall be a Predefined Type or a Simple Type.
The set of values defined by a restriction must be a true subset of the values of the base type.
In specification of a particular length range, only non-negative INTEGER literals or the keyword INFINITY for the upper bound shall be used.
If Minus is used in SimpleValueList then LiteralValue shall be a number.
The restriction type shall be a list of distinguished values of the base type.
Where a range is used in a type definition either as a value range or as a length range (for strings) it shall be stated with the lower of the two values on the left.
An integer range shall be used only with a base type of INTEGER or a type derived from INTEGER.
Where a value list is used, the values shall be of the base type and shall be a true subset of the values defined by the base type.
LengthRestriction shall be provided only when the base type is a string type (i.e., BITSTRING, HEXSTRING, OCTETSTRING or CharacterString) or derived from a string type
The LiteralValues shall be of the base type
In RangeTypeLength:
LowerTypeBound shall be a non-negative number
LowerTypeBound shall be less than UpperTypeBound
In IntegerRange:
LowerTypeBound shall be less than UpperTypeBound
Structured Type Definitions
Where elements may be of a type of arbitrarily complex structure; there shall be no recursive references.
The elements of Structured Type definitions are considered to be optional, i.e., in instances of these types whole elements may not be present.
A structure element Type shall be a PredefinedType, TS_TypeIdentifier, PDU_Identifier, or PDU.
If a Structured Type is used as a macro expansion, then the names of the elements within the Structured Type shall be unique within each ASP or PDU where it will be expanded.
The optional element length restriction can be used in order to give the minimum and maximum length of an element of a string type.
The set of values defined by LengthAttribute shall be a subset of the values of the base type.
ASN1 Type Definition
Types referred to from the type definition shall be defined in other ASN.1 type definition tables, be defined by reference in the ASN.1 type reference table or be defined locally in the same table, following the first type definition. Locally defined types shall not be used in other parts of the test suite.
ASN.1 type definitions used within TTCN shall not use external type references as defined in ISO/IEC 8824.
When ASN1 is used in a TTCN test suite, ASN1 identifiers from the following list shall be unique throughout the test suite:
a) identifiers occurring in an ASN1ENUMERATED type as distinguished values
b) identifiers occurring in a NamedNumberList of an ASN1 INTEGER type
Each terminal type reference used within the Type production shall be one of the following: ASN1_LocalType typereference, TS_TypeIdentifier or PDU_Identifier.
Test Suite Operation Definition
Only predefined types and data types as defined in the Test Suite Type definitions, ASP type definitions or PDU type definitions may be used as types for formal parameters. PCO types shall not be used as formal parameter types.
When a Test Suite Operation is invoked
- the number of the actual parameters shall be the same as the number of the formal parameters; and
- each actual parameter shall evaluate to an element of its corresponding formal type of parameter's.
Type in ResultType shall be a Predefined Type, TS_TypeIdentifier, PDU_Identifier or ASP_Identifier.
Test Suite Parameters Declarations
The type shall be a Predefined Type, TS_TypeIdentifier, PDU_Identifier or ASP_Identifier.
Test Case Selection Expression Definition
The expression shall use only literal values, Test Suite Parameters, Test Suite Constants and other selection expression identifiers in its terms.
The expression shall evaluate to a BOOLEAN value.
Expression shall not recursively refer (neither directly nor indirectly) to the SelExprIdentifier being defined by that Expression.
Test Suite Constant Declarations
The type shall be a predefined type, an ASN.1 type, a Test Suite Type or a PDU type.
The terms in the value expression shall not contain: Test Suite Variables or Test Case Variables.
The value shall evaluate to an element of the type indicated in the type column.
Test Suite Variable Declarations
Type shall be a Predefined Type, TS_TypeIdentifier, PDU_Identifier or ASP_Identifier.
The terms in the value expression shall not contain: Test Suite Variables or Test Case Variables.
Specifying an initial value is optional.
If an unbound Test Suite Variable is used in the right-hand side of an assignment, then it is a test case error.
The value shall evaluate to an element of the type indicated in the type column.
Test Case Variable Declarations
Type shall be a Predefined Type, TS_TypeIdentifier, PDU_Identifier or ASP_Identifier.
The terms in the value expression shall not contain: Test Suite Variables or Test Case Variables.
Specifying an initial value is optional.
The value shall evaluate to an element of the type indicated in the type column.
PCO Declarations
It is possible to define a PCO to correspond to a set of SAPs.
Timer Declarations
The terms in the value expression shall not contain: Test Suite Variables or Test Case Variables.
The timer duration shall evaluate to an unsigned positive INTEGER value.
ASP Type Definition
ASP type definitions may include ASN1 type definitions, if appropriate.
If only a single PCO is defined within a test suite then PCO_TypeIdentifier is optional. The PCO type shall be one of the PCO types used in the PCO Type Declaration proforma.
The macro symbol shall be used only with Structured Types defined in the Structured Types definitions.
Parameters may be of a type of arbitrarily complex structure, including being specified as a Test Suite Type (either predefined, Simple Type, Structured Type or ASN.1 type).
If a parameter is to be structured as a PDU, then its type may be stated either:
- as a PDU identifier to indicate that in the constraint for the ASP this parameter may be chained to a PDU constraint of a specific PDU type.
- as PDU to indicate that in the constraint for the ASP this parameter may be chained to a PDU constraint of any PDU type.
The boundaries shall be specified in terms of (non-negative) INTEGER literals, Test Suite Parameters, Test Suite Constants or the keyword INFINITY.
The parameters of ASP type definitions are considered to be optional, i.e., in instances of these types whole parameters may not be present.
The names of ASP parameters shall be unique within the ASP in which they are declared.
The optional attribute is Length.
In ASPs that are sent from the tester, values for ASP parameters that are defined in the Constraints Part shall correspond to the parameter or field definition. This means:
a) the value shall be of the type specified for that ASP parameter; and
b) In the case of substructured ASPs, either using Structured Types or ASN.1, the above rules apply to the fields of the substructure(s) recursively.
ASN1 ASP Type Definitions
The PCO type shall be one of the PCO types used in the PCO declaration proforma.
If only a single PCO is defined within a test suite, specifying the PCO type in an ASP type definition is optional.
Types referred to from the ASP definition shall be defined in other ASN.1 type definition tables, be defined by reference in the ASN.1 type reference table or be defined locally in the same table, following the first type definition.
Locally defined types shall not be used in other parts of the test suite.
ASN1 ASP Type Definition By Reference
The PCO type shall be one of the PCO types used in the PCO declaration proforma.
If only a single PCO is defined within a test suite, specifying the PCO type in an ASP type definition is optional.
PDU Type Definition
The PCO type shall be one of the PCO types used in the PCO declaration proforma.
The macro symbol shall be used only with Structured Types defined in the Structured Types definitions.
Fields may be of a type of arbitrarily complex structure, including being specified as a Test Suite Type (either predefined, Simple Type, Structured Type or ASN.1 type).
If a field is to be structured as a PDU, then its type may be stated either
- as a PDU identifier to indicate that in the constraint for the PDU this field may be chained to a PDU constraint of a specific PDU type;
or
- as PDU to indicate that in the constraint for the PDU this field may be chained to a PDU constraint of any PDU type.
The boundaries shall be specified in terms of non-negative INTEGER literals, Test Suite Parameters, Test Suite Constants or the keyword INFINITY.
The fields of PDU type definitions are considered to be optional, i.e., in instances of these types whole fields may not be present.
The names of PDU fields shall be unique within the PDU in which they are declared
The optional attribute is Length;
In PDUs that are sent from the tester, values for PDU fields that are defined in the Constraints Part shall correspond to the field definition. This means
- that the value shall be of the type specified for that PDU field;
and
- in the case of substructured ASPs and/or PDUs, either using Structured Types or ASN.1, the above rules apply to the fields of the substructure(s) recursively.
The set of values defined by LengthAttribute shall be a true subset of the values of the base type.
LengthAttribute shall be provided only when the base type is a string type (i.e. BITSTRING, HEXSTRING, OCTETSTRING or CharacterString) or derived from a string type.
ASN1 PDU Type Definition
The PCO type shall be one of the PCO types used in the PCO declaration proforma.
If only a single PCO is defined within a test suite, specifying the PCO type in an PDU type definition is optional.
Types referred to from the ASP definition shall be defined in other ASN.1 type definition tables, be defined by reference in the ASN.1 type reference table or be defined locally in the same table, following the first type definition.
Locally defined types shall not be used in other parts of the test suite.
ASN1 PDU Type Definition By Reference
The PCO type shall be one of the PCO types used in the PCO declaration proforma.
If only a single PCO is defined within a test suite, specifying the PCO type in an PDU type definition is optional.
String Length Specifications
TTCN permits the specification of length restrictions on string types (i.e., BITSTRING, HEXSTRING, OCTETSTRING and all CharacterString types) in the following instances:
- when declaring Test Suite Types as a type restriction;
- when declaring simple ASP parameters, PDU fields and elements of Structured Types as an attribute of the parameter, field or element type;
and
- when defining ASP/PDU or Structured Type constraints as an attribute of the constraint value. In the context of constraints, length restrictions can also be specified on values of type SEQUENCE OF or SET OF, thus limiting the number of their elements.
Alias Definitions
An Alias shall be used only to replace an ASP identifier or a PDU identifier within a single TTCN statement in a behaviour tree. It shall be used only in a behaviour description column.
Structured Type Constraint Declarations
If an ASP or PDU definition refers to a Structured Type as a substructure of a parameter or field (i.e., with a parameter name or a field name specified for it) then the corresponding constraint shall have the same parameter or field name in the corresponding position in the parameter name or field name column of the constraint and the value shall be a reference to a constraint for that parameter or field (i.e., for that substructure in accordance with the definition of the Structured Type).
ASP Constraint Declarations
If the ASP definition refers to a Structured Type by macro expansion (i.e., with <-
in place of the ASP field name) then in a corresponding constraint either
- the individual elements from the Structured Type shall be included directly within the constraints.
- the macro symbol (
<-
) shall be placed in the corresponding position in the ASP field name column of the constraint and the value shall be a reference to a constraint for the Structured Type referenced from the ASP definition.
PDU Constraint Declarations
If the PDU definition refers to a Structured Type by macro expansion (i.e., with <-
in place of the PDU field name) then in a corresponding constraint either:
- the individual elements from the Structured Type shall be included directly within the constraints;
or
- the macro symbol (
<-
) shall be placed in the corresponding position in the PDU field name column of the constraint and the value shall be a reference to a constraint for the Structured Type referenced from the PDU definition.
Constraints Part
If an ASP and/or PDU is substructured, then the constraints for ASPs and/or PDUs of that type shall have the same tabular structure or a compatible ASN.1 structure (i.e., possibly with some groupings).
Structured Types expanded into an ASP or PDU definition by use of the macro symbol ( <-
) are not considered to be substructures. Constraints for such ASPs or PDUs shall either have a completely flat structure (i.e., the elements of an expanded structure are explicitly listed in the ASP or PDU constraint) or shall reference a corresponding structure constraint for macro expansion.
Whichever way the values are obtained, they shall correspond to the parameter or field entries in the ASP or PDU type definitions. This means
- that the value shall be of the type specified for that parameter or field.
- that the length shall satisfy any restriction associated with the type. (This will not be implemented.)
An expression in a constraint shall contain only literal values, Test Suite Parameters, Test Suite Constants, formal parameters and Test Suite Operations.
Neither Test Suite Variables nor Test Case Variables shall be used in constraints, unless passed as actual parameters.
Literal values, Test Suite Parameters, Test Suite Constants, Test Suite Variables, Test Case Variables and PDU or Test Suite Type constraints may be passed as actual parameters to a constraint in a constraints reference made from a behaviour description. The parameters shall not be of PCO type or ASP type.
In ASN.1 constraints, only ASP parameters and PDU fields declared as OPTIONAL may be omitted. These may be omitted either by using the Omit symbol or by simply leaving out the relevant ASP parameter or PDU field.
The constraint specification of an ASP and/or PDU shall have the same structure as that of the type definition of that ASP or PDU.
In tabular constraints, all ASP parameters and PDU fields are optional and therefore may be omitted using the Omit symbol, to indicate that the ASP parameter or PDU field is to be absent from the event sent.
An expression in a constraint shall contain only Values (including, for instance, ConstraintValue&Attributes), Test Suite Parameters, Test Suite Constraints, formal parameters, Component References and Test Suite Operations.
Matching Mechanisms
Complement: Each constraint value in the list shall be of the type declared for the ASP parameter or PDU field in which the complement mechanism is used.
ValueList: Each value in the ValueList shall be of the type declared for the ASP parameter or PDU field in which the ValueList mechanism is used.
Range: Ranges shall be used only on values of INTEGER type.
Range: A boundary value shall be either:
- INFINITY or -INFINITY
- a constraint expression that evaluates to a specific INTEGER value.
Range: The lower boundary shall be less than the upper boundary.
SuperSet: SuperSet is an operation for matching that shall be used on values of SET OF type. SuperSet shall be used only in ASN1 constraints.
SuperSet: The argument of SuperSet shall be of the type declared for the ASP parameter or PDU field in which the SuperSet mechanism is used.
SubSet: SubSet is an operation for matching that shall be used on values of SET OF type. SubSet shall be used only in ASN1 constraints.
SubSet: The argument of SubSet shall be of the type declared for the ASP parameter or PDU field in which the SubSet mechanism is used.
Permutation: Permutation an operation for matching that can be used only on values inside a value of SEQUENCE OF type. Permutation shall be used only in ASN1 constraints.
Permutation: Each element listed in Permutation shall be of the type declared inside the SEQUENCE OF type of the ASP parameter or PDU field.
Base Constraints and Modified Constraints
The name of the modified constraint shall be a unique identifier.
The name of the base constraint which is to be modified shall be indicated in the derivation path entry in the constraint header. This entry shall be left blank for a base constraint.
A modified constraint can itself be modified. In such a case the Derivation Path indicates the concatenation of the names of the base and previously modified constraints, separated by dots ( . ) A dot shall follow the last modified constraint name.
If a base constraint is defined to have a formal parameter list, the following rules apply to all modified constraints derived from that base constraint, whether or not they are derived in one or several modification steps:
- The modified constraint shall have the same parameter list as the base constraint. In particular, there shall be no parameters omitted from or added to this list
- The formal parameter list shall follow the constraint name for every modified constraint
- Parameterized ASP parameters or PDU in a base constraint fields shall not be modified or explicitly omitted in a modified constrain.
In tabular constraints Omit shall be denoted by dash ( - ). In ASN.1 constraints Omit is denoted by OMIT.
If the ASP or PDU definition refers to a parameter or field specified as being of metatype PDU then in a corresponding constraint the value for that parameter or field shall be specified as the name of a PDU constraint, or formal parameter.
The Behaviour Description
Statements in the first level of alternatives having no predecessor in the root or local tree belong to, shall have the indentation value of zero.
Statements having a predecessor shall have the indentation value of the predecessor plus one as their indentation value.
The parameters may provide PCOs, constraints, variables, or other such items for use within the tree.
Test Case root trees shall not be parameterized.
Formal parameters may be of PCO type, ASP type, PDU type, structure type or one of the other predefined or Test Suite Types.
TTCN Test Events
In the simplest form, an ASP identifier or PDU identifier follows the SEND symbol ( ! ) for events to be initiated by the LT or UT, or a RECEIVE symbol ( ? ) for events which it is possible for the LT or UT to accept.
If both a qualifier and an assignment are associated with the same event, then the qualifier shall appear first.
The tree header identifier used for local trees shall be unique within the dynamic behaviour description in which they appear, and shall not be the same as any identifier having a unique meaning throughout the test suite.
TTCN Expressions
The index notation is used to refer to elements (bits) of the ASN.1 BITSTRING type. BITSTRING is assumed to be defined as SEQUENCE OF {BOOLEAN}. If certain bits of a BITSTRING are associated with an identifier (named bit) then either the dot notation or this identifier shall be used to refer to the bit.
Where a parameter, field or element is defined to be a true substructure of a type defined in a Structured Type table, a reference to the elements in the substructure shall consist of the reference to the parameter, field or element identifier followed by a dot and the identifier of the item within that substructure.
Where a structure is used as a macro expansion, the elements in the structure shall be referred to as if it was expanded into the structure referring to it.
If a parameter, field or element is defined to be of metatype PDU no reference shall be made to fields of that substructure.
The ATTACH Construct
Tree reference may be Test Step Identifiers or tree identifiers, where
- A Test Step Identifier denotes the attachment of a Test Step that resides in the Test Step Library; the Test Step is referenced by its unique identifier
- A tree identifier shall be the name of one of the trees in the current behaviour description; this is attachment of a local tree.
Constraints may be passed as parameters to Test Steps. If the constraint has a formal parameter list then the constraint shall be passed together with an actual parameter list.
When a parameterized tree is attached:
- The number of the actual parameters shall be the same as the number of formal parameters
- Each actual parameter shall evaluate to an element of its corresponding formal parameter type
Labels and the GOTO Construct
A GOTO to a label may be specified within a behaviour tree provided that the label is associated with the first of a set of alternatives, one of which is an ancestor node of the point from which the GOTO is to be made.
A GOTO shall be used only for jumps within one tree, i.e., within a Test Case root tree, a Test Step tree a Default tree or a local tree. As a consequence, each label used in a GOTO construct shall be found within the same tree in which the GOTO is used.
Labels used within a tree shall be unique within a tree.
The Constraints Reference
The actual parameter list shall fulfil the following:
- the number of actual parameters shall be the same as the number of formal parameters;
and
- each actual parameter shall evaluate to an element of its corresponding formal type.
Verdicts
A predefined variable called R is available in each Test Case to store any Intermediate results. R can take the values pass, fail, inconc and none. These values are predefined identifiers and as such are case sensitive.
R shall not be used on the left-hand side of an assignment statement.
PASS or P, FAIL or F and INCONC or I are keywords that are used in the verdicts column only. The predefined identifiers pass, fail, inconc and none are values that represent the possible contents of the predefined variable R. These predefined identifiers are to be used for testing the variable R in behaviour lines only.
A Verdict shall not occur in corresponding to entries in the behaviour tree which are any of the following: empty, an ATTACH construct, a GOTO construct, an IMPLICIT SEND or a RETURN.
Default References
Test Cases or Test Steps shall not be referred to as Defaults.
The actual parameter list shall fulfill the following:
- The number of actual parameters shall be the same as the number of formal parameters.
- Each actual parameter shall evaluate to an element of its corresponding formal type.
- All variables appearing in the parameter list shall be bound when the constraint is invoked. (This won't be implemented.)
Formal Parameters
The formal parameter names which may optionally appear as part of the following shall be unique within that formal parameter list, and shall not be the same as any identifier having a unique meaning throughout the test suite.
A formal parameter name contained in the formal parameter list of a local tree shall header shall take precedence over a formal parameter name contained in the formal parameter list of the Test Step in which it is defined, within the scope of that local formal parameter list.
DataObjectReferences
A reference to a component of one of the following types: SEQUENCE, SET and CHOICE is constructed using a dot notation; i.e., appending a dot and the name (component identifier) of the desired component to the data object identifier; the component identifier shall be used if specified.
ASN.1 Static Semantics
IntegerType: Each identifier appearing in the NamedNumberList shall be different.
BitStringType: The DefinedValue shall be a reference to a value of type integer, or of a type derived from integer by tagging.
BitStringType: Each identifier appearing in the NamedNumberList shall be different.
BitStringValue: Each identifier in BitStringValue shall be the same as an identifier in the BitStringType sequence with which the value is associated.
SequenceType: The Type in the fourth alternative of the ElementType (COMPONENTS OF) shall be sequence type.
SequenceType: If OPTIONAL or DEFAULT are present, the corresponding value may be omitted from a value of the new type.
SequenceType: The identifiers in all NamedType sequence of the ElementTypeList shall be distinct.
SequenceType: The {} notation shall only be used if:
a) all ElementType sequences in the SequenceType are marked DEFAULT or OPTIONAL and all values are omitted
b) the type notation was SEQUENCE {}
SequenceType: There shall be one NamedValue for each NamedType in the SequenceType which is not marked OPTIONAL or DEFAULT, and the values shall be in the same order as the corresponding NamedType sequences.
SequenceOfType: Each Value sequence in the ValueList shall be the notation for a value of the Type specified in the SequenceOfType.
SequenceOfType: The {} notation is used when there are no component values in the sequence-of value.
SetType: The Type in the fourth alternative of the ElementType (COMPONENTS OF) shall be set type.
SetType: If OPTIONAL or DEFAULT are present, the corresponding value may be omitted from a value of the new type.
SetType: The identifiers in all NamedType sequence of the ElementTypeList shall be distinct.
SetType: The {} notation shall only be used if:
a) all ElementType sequences in the SetType are marked DEFAULT or OPTIONAL and all values are omitted
b) the type notation was SET {}
SetOfType: Each Value sequence in the ValueList shall be the notation for a value of the Type specified in the SetOfType.
SetOfType: The {} notation is used when there are no component values in the set-of value.
ChoiceType: The identifiers in all NamedType sequences of the AlternativeTypeList shall be distinct.
ChoiceType: If the NamedValue contains an identifier (in our case it contains always), it shall be a notation for a value of that type in the AlternativeTypeList that is named by the same identifier.
SelectionType: Type is a notation referencing the ChoiceType, and identifier is the identifier in the NamedType.
Subtype: When the SubtypeSpec notation follows the SelectionType notation, the parent type is the SelectionType, not the Type in the SelectionType notation.
Subtype: When the SubtypeSpec notation follows a set-of or sequence-of type notation, it applies to the Type in the set-of or sequence-of notation, not to the set-of or sequence-of type.
1. By Base Type we refer to the particular type in the Type production
[Previous]
[Next]
[Contents]
[Index]