Home
32 Analyzing TTCN Documents (in Windows)
Contents
1. Furthermore there are restrictions in the ASN Utilities when it is used to extract the external types and values These restrictions are intro duced in translating ASN 1 to SDL but since the same algorithm is used for extracting types and values the restrictions are also relevant for the TTCN suite see Translation of ASN 1 to SDL on page 700 in chapter 14 The ASN 1 Utilities Error Handling Any error that occurs while finding parsing or accessing the ASN 1 module will cause the old definition to remain Only when a completely successful fetching has been made the definition will be updated Pos sible errors could be e The ASN 1 module not found among the dependencies e The ASN 1 module file could not be found or was not readable e The ASN 1 module file was not syntactically correct The referred type value could not be found in the module See chapter 14 The ASN 1 Utilities for a more general view on ASN 1 usage Telelogic Tau 4 5 User s Manual 1281 Chapter 32 Analyzing TTCN Documents in Windows TTCN Static Type Restriction Control The TTCN standard defines a set of semantic rules for type definitions In particular it defines simple types as types which might contain a true subset of the values which the parent type might contain The Analyzer now analyzes the TTCN type system and also reports violations of these tules This analysis is implemented as a post pass over the related ta bles and i
2. reason for this is that the Analyzer does not traverse the se lected items in exactly the listed order The Analyzer order deviates from the listed order in three places e Items inthe PDU type definitions sub tree are analyzed before items in the ASP type definitions sub tree e Items in the PDU constraint declarations sub tree are analyzed be fore items in the ASP constraint declarations sub tree e Items in the defaults library sub tree are analyzed before items in the test step library sub tree and those are analyzed before items in the test cases sub tree ASN 1 External Type Value References References to ASN 1 definitions in external ASN 1 modules can occur in the following four TTCN tables e Test suite constant declarations by reference e ASN 1 type definitions by reference e ASN 1 ASP type definitions by reference e ASN 1 PDU type definitions by reference In these tables there are three important fields to consider e Module Identifier set by user The name of the ASN 1 module This should be the real name of the model i e the name stated inside the module itself e Type Reference Value Reference set by user This is the name of the desired type or value e Type Definition Value set automatically when fetched This is the field where the fetched type definition value is copied in to The term definition is used below both to denote an ASN 1 type defini tion and an ASN 1 value Telelogic Tau 4 5 User
3. s Manual 1279 Chapter 32 Analyzing TTCN Documents in Windows 1280 When an ASN 1 reference is analyzed the referred definition must be available to the Analyzer In the pro formas for this kind of reference in the TTCN suite there is an external column where both the definition and the parse tree is stored If the Analyzer encounters any reference to a type value the definition is fetched given the type value name and the module identifier and copied into the external field before the field is analyzed The operation of fetching the definition of the reference is controlled by an option in the Analyzer dialog Important to note is that the fields Module Identi fier and Type Value Reference are not parsed This means that if a change is made in either of these two fields the row will not be analyzed and thus no fetching will be made The solution to this is to set the En able Forced Analysis in the Analyzer dialog when altering a reference See The Analyzer Dialog on page 1275 Analyzing ASN 1 References This is the general algorithm when encountering an ASN 1 in the anal ysis phase 1 First of all an attempted fetch is only made if no current definition exists or the Analyzer fetching option is selected 2 The actual fetching is made see Retrieving external ASN 1 Defi nitions on page 1280 3 Ifthe definition is successfully fetched the identifiers in the defini tion is converted to TTCN c
4. Chapter 32 Analyzing TTCN Documents in Windows This chapter contains a reference manual to the Analyzer in the TTCN suite You can also find information about how to find erro neous tables displayed in the Analyzer log The TTCN Browser and TTCN Table Editor are described in chap ter 31 Editing TTCN Documents in Windows See chapter 2 Introduction to the TTCN Suite in Windows in the TTCN Suite Getting Started for an overview of the TTCN suite tool set Note Windows version This is the Windows version of the chapter The UNIX version is chapter 27 Analyzing TTCN Documents on UNIX July 2003 Telelogic Tau 4 5 User s Manual 1273 Chapter 32 Analyzing TTCN Documents in Windows Analyzing TTCN Documents 1274 The Analyzer in the TTCN suite does a complete syntax check on both TTCN and ASN 1 as it is used in TTCN The Analyzer also performs a number of static semantic checks mainly the uniqueness and exist ence of identifiers For implementation reasons the Analyzer does not exactly follow the TTCN standard some syntax restrictions and relaxations apply These differences will not affect the vast majority of users but for reference they are documented together with the standard syntax in chapter 39 Languages Supported in the TTCN Suite This chapter also includes the static semantics supported by the TTCN suite During analysis the TTCN suite compiles an extensive symbol table containing all name
5. d objects in the TTCN document and the references between them Using the Analyzer In the TTCN suite the Analyzer works on the currently active TTCN document It is also possible to analyze a TTCN document from the Or ganizer see Analyze TTCN on page 117 in chapter 2 The Organizer e To analyze a subtree of a TTCN document in the TTCN suite select a node in the view and then select Analyze from the Build menu The selected node and all nodes in its subtree will be analyzed If the root node is selected the entire suite will be analyzed The shortcut is lt F7 gt e To analyze the entire test suite regardless of any selections in the test suite select Analyze Suite from the Build menu The shortcut is lt Ctr1 F7 gt e To analyze an entire modular TTCN system containing the cur rently active suite or module starting from the root suite select Analyze System from the Build menu This is equivalent to analyz ing the root node in the Organizer Note that it may take a while before this operation is completed de pending on the size and complexity of the system Telelogic Tau 4 5 User s Manual July 2003 Analyzing TTCN Documents If an item is analyzed incorrectly this will be recorded as an error mes sage in the log Items that have been found to be incorrect will be marked in red in all views of the document The Analyzer Dialog When you analyze a document for the first time the Analyzer d
6. ep table header the default field and in the body rows and 2 of the behaviour description Analysis messages in table ESTABLISH CONNECTION of type Test Step Dynamic Behaviour Default Mismatched number of parameters is 1 should be 0 Row 1 Behaviour Description The referenced identifier CR is of wrong type UPPER PCO CR Row 2 Behaviour Description The referenced identifier CC is of wrong type UPPER_PCO CC A July 2003 Telelogic Tau 4 5 User s Manual 1277 Chapter 32 Analyzing TTCN Documents in Windows 1278 Resolving Forward References During analysis the TTCN suite does two main tasks e It checks the syntax of the abstract TTCN document e It checks some of the static semantics of the TTCN document The syntax of TTCN is defined in ISO IEC 9646 3 Annex A as a list of BNF productions or rules See also The TT CN MP Syntax Produc tions in BNF on page 1530 in chapter 39 Languages Supported in the TTCN Suite The TTCN suite checks all these rules except for a very few minor deviations for more information see The Restrictions in the TTCN Suite on page 1526 in chapter 39 Languages Supported in the TTCN Suite If a rule is not followed in the TTCN document then this will be reported as an error by the Analyzer The static semantic rules of TTCN are also defined in Annex A of ISO IEC 9646 These are in the form of text statements which limit the use of some of the
7. equired To find an erroneous table identified in the Analyzer log 1 Place the cursor on the name of the table in the log and then lt Ctrl1 gt right click the name of the table 2 Inthe popup menu that will be opened select the table name at the top of the menu and the table will be opened You can also use the Finder to find a table See Finding and Sorting Tables on page 1260 in chapter 31 Editing TTCN Documents in Win dows July 2003 Telelogic Tau 4 5 User s Manual 1283 Chapter 32 Analyzing TTCN Documents in Windows 1284 Telelogic Tau 4 5 User s Manual July 2003
8. hecked Forced Analysis Indicates that all selected items are going to be analyzed and no item will be skipped An item is normally skipped if it is OK Retrieve ASN 1 Definitions Indicates that the definitions of encountered ASN 1 references should be retrieved An ASN 1 definition is retrieved if this option is set or if the definition has not been fetched before Enable Restriction Control Enables a set of extra controls done on the TTCN code to find even more semantic errors in the analyzed item Warnings Gives more information Stop After n Errors Stops the analysis when the number of errors is reached Error Messages Errors detected during analysis are recorded in the log For the fields in the header of a table the error messages have the general format Table name and table type Field type 1 Error message Field type 2 Error message Telelogic Tau 4 5 User s Manual July 2003 Analyzing TTCN Documents Example 203 An error found in the default name identifier field of the default dy namic behaviour called UT_DEFAULT Analysis messages in table UT_DEFAULT of type Default Dynamic Behaviour Default Name The referenced identifier UPPER_PCO is not declared UT_DEFAULT p UPPER_PCO In the body of a table where the field type name does not uniquely de fine a field the row number is also included e Row number e Body type e Error message Example 204 Errors found in a test st
9. ialog will be opened and you may change the options Once this has been done the same options will be used and the dialog will not be opened the next time you start the analysis from a quick button or a keyboard shortcut However the dialog will always be opened when you select an analyzer menu choice You can also open the dialog by the menu choice Build gt Options or by the shortcut lt A1t F8 gt Note that every active TTCN document has its own analysis settings so in practice two or more TTCN documents can be edited and or viewed at the same time in the TTCN suite and yet have individual settings But multiple views of the same TTCN document do of course share the same settings TTCN Analyzer 7 TTCN to C Compiler Settings x TTCN Analyzer Options TTCN to C Compiler Options Build Options Options r Warnings ID Forced analysis M Enable C Retrieve ASN 1 Definitions i 7 M Enable restriction control Error limit 2000 errors Figure 229 Analyzer dialog The Analyzer reports all analysis results to the Log Manager For each different test suite a new tab will be created to allow the user to easily access the analysis information for different TTCN documents July 2003 Telelogic Tau 4 5 User s Manual 1275 Chapter 32 Analyzing TTCN Documents in Windows 1276 Note The output of the analysis will not be available if the Log Manager is closed and the option Auto Raise Log is unc
10. ompatible syntax see Syntactic Con version on page 1281 4 Finally a possible update of the definition is made and the analysis is continued Retrieving external ASN 1 Definitions From the ASN 1 module a simple parse tree is built to access its con tents The parse tree is re built when either it has not been built before or the ASN 1 module has been modified since last access The parse tree for an ASN 1 module lives for the duration of the whole analysis phase Telelogic Tau 4 5 User s Manual July 2003 July 2003 Analyzing TTCN Documents Syntactic Conversion The received definition must be manipulated in the following sense All identifiers must be syntactically checked and altered if they include any characters that is disallowed in TTCN The rule is that all dash characters in an ASN 1 name are replaced by a _ underscore No special care has to be considered to ASN 1 comments since they are ignored when the parse tree is built from the module External type references in the type definition e g Module Type will only be converted like above and left for the Analyzer to deal with see also Restrictions on page 1281 Restrictions The following features are not supported in TTCN e External type reference identifiers on the form Moduleldentifi er Type Valuereference are not supported e Type value references within the same ASN 1 module are not sup ported
11. s only applied when the previous passes have been successful Furthermore restriction control is performed on a number of other con structs in the TTCN language thus facilitating the task of writing se mantically correct TTCN documents Most of the TTCN types and val ues are checked and thereby reducing the chance of programming errors slipping through to other tools which depends upon the correctness of the TTCN document Application of Static Type Restriction Control Static type restriction control is applied to at least the following TTCN tables and fields e Simple type definitions e TTCN structured type ASP PDU CM definitions e Test suite constant declarations e Test suite variable declarations e TTCN structured type ASP PDU CM constraint declarations e Actual constraint reference parameter lists e Actual parameter lists The static type restriction control also evaluates expressions in advance where possible and checks that the result does not violate the type re strictions of the field where the value is found It operates on both types and values regarding specific values as special cases of types 1282 Telelogic Tau 4 5 User s Manual July 2003 Finding Tables from the Analyzer Log Finding Tables from the Analyzer Log When you are debugging a TTCN document it may be useful to search for and display named tables The search will include the entire current TTCN document no selections are r
12. syntax rules usually in a specific context TTCN Static Semantics on page 1559 and ASN 1 Static Semantics on page 1575 in chapter 39 Languages Supported in the TTCN Suite describe the static semantics which are controlled by the Analyzer The static se mantics currently supported are mainly of the following types e Identifiers names are checked for uniqueness with respect to the scoping rules defined in ISO IEC 9646 3 e The existence of referenced TTCN objects e g a test step from an other TTCN object e g test case is verified e Type control and type restriction control In order to achieve this the Analyzer constructs a symbol table of all the named TTCN objects that it finds during analysis e g variable names type identifiers tables etc It is important to note that TTCN allows forward references For exam ple a test step may attach another test step that is declared later on in the TTCN document that is the referenced i e attached test step appears after the test step that has done the attach The Analyzer has a feature called back pass designed to resolve for ward references The back pass is automatically invoked at certain points in the analysis process Telelogic Tau 4 5 User s Manual July 2003 Analyzing TTCN Documents July 2003 Forward references usually appear in the context of ASP PDU defini tions constraints and as the result of attachment statements in behaviour trees The
Download Pdf Manuals
Related Search
Related Contents
FEISOL Monopod CM-1401 / CM Samsung HT-DB300 Instrukcja obsługi Honeywell HO-1100RE Manuel d`utilisation 2004 - RM-Spas Notice d`utilisation Sem título-2 Copyright © All rights reserved.
Failed to retrieve file