Intellectual Property Rights
Foreword
Modal verbs terminology
1 Scope
2 References
2.1 Normative references
2.2 Informative references
3 Definitions and abbreviations
3.1 Definitions
3.2 Abbreviations
4 Introduction
4.1 The core language and presentation formats
4.2 Unanimity of the specification
4.3 Conformance
5 Basic language elements
5.1 Identifiers and keywords
5.2 Scope rules
5.2.1 Scope of formal parameters
5.2.2 Uniqueness of identifiers
5.3 Ordering of language elements
5.4 Parameterization
5.4.1 Formal parameters
5.4.1.1 Formal parameters of kind value
5.4.1.2 Formal parameters of kind template
5.4.1.3 Formal parameters of kind timer
5.4.1.4 Formal parameters of kind port
5.4.2 Actual parameters
5.5 Cyclic Definitions
6 Types and values
6.1 Basic types and values
6.1.0 Simple basic types and values
6.1.1 Basic string types and values
6.1.1.1 Accessing individual string elements
6.1.2 Subtyping of basic types
6.1.2.1 Lists of templates
6.1.2.2 Lists of types
6.1.2.3 Ranges
6.1.2.4 String length restrictions
6.1.2.5 Pattern subtyping of character string types
6.1.2.6 Mixing subtyping mechanisms
6.1.2.6.1 Mixing patterns, lists and ranges
6.1.2.6.2 Using length restriction with other constraints
6.2 Structured types and values
6.2.1 Record type and values
6.2.1.1 Referencing fields of a record type
6.2.1.2 Optional elements in a record
6.2.1.3 Nested type definitions for field types
6.2.2 Set type and values
6.2.2.1 Referencing fields of a set type
6.2.2.2 Optional elements in a set
6.2.2.3 Nested type definition for field types
6.2.3 Records and sets of single types
6.2.3.1 Nested type definitions
6.2.3.2 Referencing elements of record of and set of types
6.2.4 Enumerated type and values
6.2.5 Unions
6.2.5.1 Referencing fields of a union type
6.2.5.2 Option and union
6.2.5.3 Nested type definition for field types
6.2.6 The anytype
6.2.7 Arrays
6.2.8 The default type
6.2.9 Communication port types
6.2.10 Component types
6.2.10.1 Component type definition
6.2.10.2 Reuse of component types
6.2.11 Component references
6.2.12 Addressing entities inside the SUT
6.2.13 Subtyping of structured types
6.2.13.1 Length subtyping of record ofs and set ofs
6.2.13.2 List subtyping of structured types and anytype
6.2.13.3 Subtyping of the iterated type of record ofs and set ofs
6.2.13.4 Mixing subtyping mechanisms
6.3 Type compatibility
6.3.1 Compatibility of non-structured types
6.3.2 Compatibility of structured types
6.3.2.1 Compatibility of enumerated types
6.3.2.2 Compatibility of record and record of types
6.3.2.3 Compatibility of set and set of types
6.3.2.4 Compatibility of union types
6.3.2.5 Compatibility of anytype types
6.3.2.6 Compatibility between sub-structures
6.3.3 Compatibility of component types
6.3.4 Type compatibility of communication operations
6.3.5 Type conversion
6.4 Type synonym
7 Expressions
7.1 Operators
7.1.1 Arithmetic operators
7.1.2 List operator
7.1.3 Relational operators
7.1.4 Logical operators
7.1.5 Bitwise operators
7.1.6 Shift operators
7.1.7 Rotate operators
7.2 Field references and list elements
8 Modules
8.1 Definition of a module
8.2 Module definitions part
8.2.1 Module parameters
8.2.2 Groups of definitions
8.2.3 Importing from modules
8.2.3.1 General format of import
8.2.3.2 Importing single definitions
8.2.3.3 Importing groups
8.2.3.4 Importing definitions of the same kind
8.2.3.5 Importing all definitions of a module
8.2.3.6 Import definitions from other TTCN-3 editions and from non-TTCN-3 modules
8.2.3.7 Importing of import statements from TTCN-3 modules
8.2.3.8 Compatibility of language specifications in imports
8.2.4 Definition of friend modules
8.2.5 Visibility of definitions
8.3 Module control part
9 Port types, component types and test configurations
9.1 Communication ports
9.2 Test system interface
10 Declaring constants
11 Declaring variables
11.1 Value variables
11.2 Template variables
12 Declaring timers
13 Declaring messages
14 Declaring procedure signatures
15 Declaring templates
15.1 Declaring message templates
15.2 Declaring signature templates
15.3 Global and local templates
15.4 In-line Templates
15.5 Modified templates
15.6 Referencing elements of templates or template fields
15.6.1 Referencing individual string elements
15.6.2 Referencing record and set fields
15.6.3 Referencing record of and set of elements
15.6.4 Referencing signature parameters
15.7 Template matching mechanisms
15.7.1 Specific values
15.7.2 Special symbols that can be used instead of values
15.7.3 Special symbols that can be used inside values
15.7.4 Special symbols which describe attributes of values
15.8 Template Restrictions
15.9 Match Operation
15.10 Valueof Operation
15.11 Concatenating templates of string and list types
16 Functions, altsteps and testcases
16.1 Functions
16.1.1 Invoking functions
16.1.2 Predefined functions
16.1.3 External functions
16.1.4 Invoking functions from specific places
16.2 Altsteps
16.2.1 Invoking altsteps
16.3 Test cases
17 Void
18 Overview of program statements and operations
19 Basic program statements
19.1 Assignments
19.2 The If-else statement
19.3 The Select case statement
19.4 The For statement
19.5 The While statement
19.6 The Do-while statement
19.7 The Label statement
19.8 The Goto statement
19.9 The Stop execution statement
19.10 The Return statement
19.11 The Log statement
19.12 The Break statement
19.13 The Continue statement
19.14 Statement block
20 Statement and operations for alternative behaviours
20.1 The snapshot mechanism
20.2 The Alt statement
20.3 The Repeat statement
20.4 The Interleave statement
20.5 Default Handling
20.5.1 The default mechanism
20.5.2 The Activate operation
20.5.3 The Deactivate operation
21 Configuration Operations
21.1 Connection Operations
21.1.1 The Connect and Map operations
21.1.2 The Disconnect and Unmap operations
21.2 Test case operations
21.2.1 Test case stop operation
21.3 Test Component Operations
21.3.1 The Create operation
21.3.2 The Start test component operation
21.3.3 The Stop test behaviour operation
21.3.4 The Kill test component operation
21.3.5 The Alive operation
21.3.6 The Running operation
21.3.7 The Done operation
21.3.8 The Killed operation
21.3.9 Summary of the use of any and all with components
22 Communication operations
22.1 The communication mechanisms
22.1.1 Principles of message-based communication
22.1.2 Principles of procedure-based communication
22.1.3 Principles of unicast, multicast and broadcast communication
22.1.4 General format of communication operations
22.1.4.1 General format of the sending operations
22.1.4.2 General format of the receiving operations
22.2 Message-based communication
22.2.1 The Send operation
22.2.2 The Receive operation
22.2.3 The Trigger operation
22.3 Procedure-based communication
22.3.1 The Call operation
22.3.2 The Getcall operation
22.3.3 The Reply operation
22.3.4 The Getreply operation
22.3.5 The Raise operation
22.3.6 The Catch operation
22.4 The Check operation
22.5 Controlling communication ports
22.5.1 The Clear port operation
22.5.2 The Start port operation
22.5.3 The Stop port operation
22.5.4 The Halt port operation
22.5.5 The Checkstate port operation
22.6 Use of any and all with ports
23 Timer operations
23.1 The timer mechanism
23.2 The Start timer operation
23.3 The Stop timer operation
23.4 The Read timer operation
23.5 The Running timer operation
23.6 The Timeout operation
23.7 Summary of use of any and all with timers
24 Test verdict operations
24.1 The Verdict mechanism
24.2 The Setverdict operation
24.3 The Getverdict operation
25 External actions
26 Module control
26.1 The Execute statement
26.2 The Control part
27 Specifying attributes
27.1 The Attribute mechanism
27.1.1 Scope of attributes
27.1.2 Overwriting rules for attributes
27.1.2.1 Additional overwriting rules for variant attributes
27.1.3 Changing attributes of imported language elements
27.2 The With statement
27.3 Display attributes
27.4 Encoding attributes
27.5 Variant attributes
27.6 Extension attributes
27.7 Optional attributes
Annex A (normative): BNF and static semantics
A.1 TTCN-3 BNF
A.1.1 Conventions for the syntax description
A.1.2 Statement terminator symbols
A.1.3 Identifiers
A.1.4 Comments
A.1.5 TTCN-3 terminals
A.1.5.1 Use of whitespaces and newlines
A.1.6 TTCN-3 syntax BNF productions
A.1.6.0 TTCN-3 module
A.1.6.1 Module definitions part
A.1.6.1.0 General
A.1.6.1.1 Typedef definitions
A.1.6.1.2 Constant definitions
A.1.6.1.3 Template definitions
A.1.6.1.4 Function definitions
A.1.6.1.5 Signature definitions
A.1.6.1.6 Testcase definitions
A.1.6.1.7 Altstep definitions
A.1.6.1.8 Import definitions
A.1.6.1.9 Group definitions
A.1.6.1.10 External function definitions
A.1.6.1.11 External constant definitions
A.1.6.1.12 Module parameter definitions
A.1.6.1.13 Friend module definitions
A.1.6.2 Control part
A.1.6.3 Local definitions
A.1.6.3.1 Variable instantiation
A.1.6.3.2 Timer instantiation
A.1.6.4 Operations
A.1.6.4.1 Component operations
A.1.6.4.2 Port operations
A.1.6.4.3 Timer operations
A.1.6.4.4 Testcase operation
A.1.6.5 Type
A.1.6.6 Value
A.1.6.7 Parameterization
A.1.6.8 Statements
A.1.6.8.1 With statement
A.1.6.8.2 Behaviour statements
A.1.6.8.3 Basic statements
A.1.6.9 Miscellaneous productions
Annex B (normative): Matching values
B.1 Template matching mechanisms
B.1.1 Matching specific values
B.1.2 Matching mechanisms instead of values
B.1.2.1 Template list
B.1.2.2 Complemented template list
B.1.2.3 Any value
B.1.2.4 Any value or none
B.1.2.5 Value range
B.1.2.6 SuperSet
B.1.2.7 SubSet
B.1.2.8 Omitting optional fields
B.1.3 Matching mechanisms inside values
B.1.3.1 Any element
B.1.3.1.1 Using single character wildcards
B.1.3.2 Any number of elements or no element
B.1.3.2.1 Using multiple character wildcards
B.1.3.3 Permutation
B.1.4 Matching attributes of values
B.1.4.1 Length restrictions
B.1.4.2 The IfPresent indicator
B.1.5 Matching character pattern
B.1.5.1 Set expression
B.1.5.2 Reference expression
B.1.5.3 Match expression n times
B.1.5.4 Match a referenced character set
B.1.5.5 Type compatibility rules for patterns
Annex C (normative): Predefined TTCN-3 functions
C.0 General exception handling procedures
C.1 Conversion functions
C.1.1 Integer to character
C.1.2 Integer to universal character
C.1.3 Integer to bitstring
C.1.4 Integer to enumerated
C.1.5 Integer to hexstring
C.1.6 Integer to octetstring
C.1.7 Integer to charstring
C.1.8 Integer to float
C.1.9 Float to integer
C.1.10 Character to integer
C.1.11 Character to octetstring
C.1.12 Universal character to integer
C.1.13 Bitstring to integer
C.1.14 Bitstring to hexstring
C.1.15 Bitstring to octetstring
C.1.16 Bitstring to charstring
C.1.17 Hexstring to integer
C.1.18 Hexstring to bitstring
C.1.19 Hexstring to octetstring
C.1.20 Hexstring to charstring
C.1.21 Octetstring to integer
C.1.22 Octetstring to bitstring
C.1.23 Octetstring to hexstring
C.1.24 Octetstring to character string
C.1.25 Octetstring to character string, version II
C.1.26 Charstring to integer
C.1.27 Character string to hexstring
C.1.28 Character string to octetstring
C.1.29 Character string to float
C.1.30 Enumerated to integer
C.1.31 Octetstring to universal character string
C.1.32 Universal character string to octetstring
C.2 Length/size functions
C.2.1 Length of strings and lists
C.2.2 Number of elements in a structured value
C.3 Presence checking functions
C.3.1 The IsPresent function
C.3.2 The IsChosen function
C.3.3 The IsValue function
C.3.4 The IsBound function
C.4 String/list handling functions
C.4.1 The Regexp function
C.4.2 The Substring function
C.4.3 The Replace function
C.5 Codec functions
C.5.1 The encoding function
C.5.2 The decoding function
C.5.3 The encoding to universal charstring function
C.5.4 The decoding from universal charstring function
C.6 Other functions
C.6.1 The random number generator function
C.6.2 The testcasename function
C.6.3 The hostId function
Annex D (normative): Preprocessing macros
D.1 Preprocessing macro __MODULE__
D.2 Preprocessing macro __FILE__
D.3 Preprocessing macro __BFILE__
D.4 Preprocessing macro __LINE__
D.5 Preprocessing macro __SCOPE__
Annex E (informative): Library of Useful Types
E.1 Limitations
E.2 Useful TTCN-3 types
E.2.1 Useful simple basic types
E.2.1.0 Signed and unsigned single byte integers
E.2.1.1 Signed and unsigned short integers
E.2.1.2 Signed and unsigned long integers
E.2.1.3 Signed and unsigned longlong integers
E.2.1.4 IEEE 754 floats
E.2.2 Useful character string types
E.2.2.0 UTF-8 character string "utf8string"
E.2.2.1 BMP character string "bmpstring"
E.2.2.2 UTF-16 character string "utf16string"
E.2.2.3 ISO/IEC 10646 character string "iso8859string"
E.2.2.4 Status values for TTCN-3 objects
E.2.3 Useful structured types
E.2.3.0 Fixed-point decimal literal
E.2.4 Useful atomic string types
E.2.4.1 Single Recommendation ITU-T T.50 character type
E.2.4.2 Single universal character type
E.2.4.3 Single bit type
E.2.4.4 Single hex type
E.2.4.5 Single octet type
Annex F (informative): Operations on TTCN-3 active objects
F.1 Test components
F.1.1 Test component references
F.1.2 Dynamic behaviour of PTCs
F.1.3 Dynamic behaviour of the MTC
F.2 Timers
F.3 Ports
F.3.1 Configuration Operations
F.3.2 Port Controlling Operations
F.3.3 Communication Operations
Annex G (informative): Deprecated language features
G.1 Group style definition of module parameters
G.2 Recursive import
G.3 Using all in port type definitions
G.4 sizeof for length of lists
G.5 sizeoftype predefined function
G.6 Mixed ports
G.7 External constants
G.8 Prefixing enumerated values
G.9 Record of/arrays not compatible to record; set of not compatible with set
Annex H (informative): Bibliography
History