Table of Contents

 1     Scope        
 2     References             
        2.1     Normative references            
        2.2     Informative references          
 3     Definitions and abbreviations          
        3.1     Definitions   
        3.2     Abbreviations and acronyms 
 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.3     Ordering of language elements          
        5.4     Parameterization      
        5.5     Cyclic Definitions      
 6     Types and values   
        6.1     Basic types and values           
        6.2     Structured types and values   
        6.3     Type compatibility    
        6.4     Type synonym           
 7     Expressions            
        7.1     Operators    
        7.2     Field references and list elements      
 8     Modules    
        8.1     Definition of a module           
        8.2     Module definitions part         
        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.7     Template matching mechanisms       
       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.2     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          
      Page
       20.4     The Interleave statement     
       20.5     Default Handling      
21     Configuration operations   
       21.1     Connection operations          
       21.2     Test case operations
       21.3     Test Component Operations 
22     Communication operations            
       22.1     The communication mechanisms      
       22.2     Message-based communication        
       22.3     Procedure-based communication      
       22.4     The Check operation
       22.5     Controlling communication ports      
       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.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 – BNF and static semantics    
        A.1     TTCN‑3 BNF 
Annex B – Matching incoming values    
        B.1     Template matching mechanisms       
Annex C – Pre-defined TTCN‑3 functions    
        C.0     General exception handling procedures          
        C.1     Integer to character 
        C.2     Integer to universal character            
        C.3     Integer to bitstring   
        C.4     Integer to hexstring  
        C.5     Integer to octetstring             
        C.6     Integer to charstring
        C.7     Integer to float         
        C.8     Float to integer         
        C.9     Character to integer 
       C.10     Character to octetstring       
       C.11     Universal character to integer          
       C.12     Bitstring to integer  
       C.13     Bitstring to hexstring            
       C.14     Bitstring to octetstring          
       C.15     Bitstring to charstring           
       C.16     Hexstring to integer
       C.17     Hexstring to bitstring            
       C.18     Hexstring to octetstring        
       C.19     Hexstring to charstring         
       C.20     Octetstring to integer           
       C.21     Octetstring to bitstring         
       C.22     Octetstring to hexstring        
       C.23     Octetstring to character string          
       C.24     Octetstring to character string, version II      
       C.25     Charstring to integer            
       C.26     Character string to hexstring             
       C.27     Character string to octetstring          
       C.28     Character string to float       
       C.29     Length of strings and lists     
       C.30     Number of elements in a structured value     
       C.31     The IsPresent function          
       C.32     The IsChosen function           
       C.33     The Regexp function
       C.34     The Substring function          
       C.35     The Replace function            
      Page
       C.36     The random number generator function        
       C.37     Enumerated to integer         
       C.38     The IsValue function
       C.39     The encoding function          
       C.40     The decoding function          
       C.41     The testcasename function  
Annex D – 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 – Library of Useful Types    
        E.1     Limitations   
        E.2     Useful TTCN‑3 types 
Annex F – Operations on TTCN‑3 active objects    
        F.1     Test components       
        F.2     Timers          
        F.3     Ports
Annex G – 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    
Annex H – Bibliography