Home

56 Analyzing a System

image

Contents

1. Click the Convert button to order the conversion The Organizer s status bar reads Analyzer ready when the conversion is complet ed Each diagram that is specified or included and expanded in the source PR file is transformed to one file These files are assigned default file names see Save in file on page 62 in chapter 2 The Organizer The generated diagrams are assigned a layout by the SDL Edi tor Error and warning messages if any are appended to the Orga nizer log window To look at the resulting diagrams you may either open the resulting files in the SDL Editor Alternatively identify the root diagram file that has been pro duced You may need to look at the input SDL PR file to deter mine what file to look for Then import this file into the Orga nizer with Import SDL from the File menu Specify the root di agram file as Root document Root document Tyr Sytem a Hame Hi gt File For unspecited diagrams les search in directory thomeipWSDiidermon gane ET em Figure 488 Importing an SDL structure Telelogic Tau 4 5 User s Manual 2559 Chapter 5 6 Analyzing a System 2560 Telelogic Tau 4 5 User s Manual July 2003
2. SDL PR with Expander macros expanded t Pretty printed SDL PR SDL GR diagrams Cross References listings Instance Tree Figure 483 Analyzer passes 2544 Telelogic Tau 4 5 User s Manual July 2003 July 2003 General Description Conversion to PR This pass is needed when input is not SDL PR i e for SDL GR diagrams ASN 1 files C and C header files The result is a PR file with a raw layout that is submitted as input to the next pass This PR file is not intended to be read by the hu man See Conversion to PR on page 2431 in chapter 55 The SDL Analyzer for a more thorough description Macro expansion This pass is needed when input contains referenc es to macros which need to be expanded The result is a PR file where SDL macros are expanded See The Macro Expander on page 2432 in chapter 55 The SDL Analyzer for a more complete de scription of the Macro Expander Lexical and syntactic analysis This pass checks that the input fol lows the SDL definition with respect to syntactic rules During this pass the Analyzer builds an abstract syntax tree that is used by the following passes See The Lexical and Syntactic Analyzer on page 2434 in chapter 55 The SDL Analyzer for a more thorough de scription Pretty printing This optional pass uses the pretty printer to produce an SDL PR file with a nice layout easy to read and understand by the human The pretty print
3. is initialized and starts executing this is indicated in the Organizer status bar which now reads Analyzer working Telelogic Tau 4 5 User s Manual 2549 Chapter 5 6 Analyzing a System 2550 7 When the Analyzer has analyzed the input as specified in the op tions the Organizer status bar reads Analyzer ready The results of the analysis are reported in the Organizer log window Performing Syntax Check 1 If the input contains SDL macros you should expand these before proceeding with the syntax analysis in the resulting SDL PR file Turn the Macro expansion button on to order expansion of SDL macros 2 Turn the Syntactic analysis button on to include the syntax checking pass 3 Click the Analyze button Performing Semantic Check Turn the Semantic analysis button on to include the semantic check pass This option cannot be turned on unless the Syntactic analysis pass is enabled The semantic checker may be set up with by a number of op tions each one individually activated by a toggle button Telelogic Tau 4 5 User s Manual July 2003 July 2003 Using the Analyzer Note Optimizing a System to Reduce Analysis Time There are two components that to a large extent affect the perfor mance of the resolution by context in the semantic analysis pass e The depth of the expressions because all possible combinations must be tried e The size of the system because the context is all the vis
4. parameter to specify the depth limit that the Analyzer should check for when evaluating expressions Expressions which depth exceed the specified limit will be reported Where possible try to break down deep expressions since they require advanced calcu lations and slow down the Analyzer Specifying the Error Limit Adjust the Error limit parameter to an adequate value drag the slider for coarse adjustments click left or right on the bar for fine adjust ments The Analyzer will stop its execution once this error limit has been reached Using a Filter With the Filter command files can be filtered or preprocessed before they are read by the Analyzer The specified executable file will be called with two arguments the file to be processed by the Analyzer and the Analyzer pass to be executed import macro or parse Try a simple OS command and look in the Organizer log to find out exactly how it is called Telelogic Tau 4 5 User s Manual 2553 Chapter 5 6 Analyzing a System 2554 Tracing the Analyzer Execution You can trace the execution of the Analyzer by turning on the option Echo Analyzer commands All Analyzer commands are then printed in the Organizer Log as they are executed Terminating the Analyzer Process Turn on the option Terminate Analyzer when done if you want the An alyzer process to terminate after analysis is done Otherwise the Ana lyzer process is left running in the background Locating and Correc
5. separately Telelogic Tau 4 5 User s Manual July 2003 General Description The Analyzer User Interfaces The Analyzer provides the following user interfaces Graphical UI When started from the Organizer with the Analyze command the Ana lyzer takes advantage of the graphical user interface and integration mechanism of the SDL suite For instance e Graphical references between source documents and error reports is supported which facilitates locating and correcting errors in the source SDL diagrams e AnSDL Make facility managed by the Organizer controls the An alyzer and brings down the analysis work that needs to be done e On line help on analysis diagnostics is available provided the pre requisites for the on line help are satisfied Batch UI Suitable for running the Analyzer non interactively See Batch Facili ties on page 203 in chapter 2 The Organizer Command Line Ul Suitable for working on the file level with detailed control See The Analyzer Command Line UI on page 2404 in chapter 55 The SDL An alyzer July 2003 Telelogic Tau 4 5 User s Manual 2547 Chapter 5 6 Analyzing a System Using the Analyzer This section describes how you operate the Analyzer from the Organiz er We will discuss topics related to the various ways you may analyze an SDL structure With the SDL suite you may for instance perform syntax check on an SDL structure or check an entire SDL system
6. Chapter 56 July 2003 Analyzing a System Analyzing a system means checking that its SDL description obeys the syntax and semantic rules as defined in the Z 100 recommenda tion some syntax checking is performed by the SDL Editor at edit ing time The SDL Analyzer allows you to perform a complete syntactic and semantic check of an SDL system This chapter describes the Ana lyzer and how you may use it to analyze an SDL system For a reference to the Analyzer commands and the Analyzer func tionality and restrictions see chapter 55 The SDL Analyzer Telelogic Tau 4 5 User s Manual 2543 Chapter 5 6 Analyzing a System General Description The Analyzer s main task is to perform syntactic and semantic analysis of SDL 92 definitions and diagrams and to serve as a front end to code generators You may perform full syntactic and nearly full semantic analysis of complete system definitions Analysis of separate units block process substructure service and procedure is also supported Syntactic analysis may be performed on a unit while restricted semantic analysis of a unit may only be performed if the context of the unit is provided The context is the enclosing units and their definitions for a detailed description see the section Sepa rate Analysis on page 2435 in chapter 55 The SDL Analyzer The Analyzer works in a number of passes SDL GR ASN 1 C header C header Conversion Q i eee 2
7. aged edited and printed by the graphical tools of the SDL suite just as if they were created using the SDL suite To convert an SDL PR file to SDL GR diagrams 1 From the Organizer Generate menu select Convert to GR A dialog is displayed Convert SDLPA to SDL GA amp Canvert TTCN MP ta TTEN GA Source PA flle name Writ reserved wardsin lowercase O E Expand Included PR files Oestnatian directary for generated SOL GR Momebalopriborg O OA emen oer Figure 487 The Convert PR to GR dialog 2 Specify the PR file to convert from You may either type the file specifier or click the folder button to issue a File Selection Dialog 3 Specify the destination directory where to store the results of the conversion You may either type the name of a directory or click the folder button to issue a directory selection dialog 4 You may specify other options Whether to capitalize SDL reserved words or not by selecting the corresponding option from the option menu Whether to expand any included PR files or not PR files are in cluded using a INCLUDE directive inside an SDL comment statement Telelogic Tau 4 5 User s Manual July 2003 July 2003 5 Using the Analyzer If required click the Analyze Options button to modify the Analyze options typically you may need to turn the Macro Expansion op tion on Close the Analyze Options dialog with the Set button see Figure 484 on page 2549
8. alternative input The default in put is the SDL structure designated by the object selected in the Telelogic Tau 4 5 User s Manual July 2003 Using the Analyzer Organizer To do this type in the name of a file into the PR file text field You may order the Analyzer to capitalize SDL reserved words or not select the appropriate option from the Write reserved words in option menu Ifthe SDL structure contains INCLUDE references to SDL PR files you may want to expand these and include them in the re sulting pretty printed PR file Turn the Expand included PR files button on to order expansion of included PR files 4 An output file where the resulting SDL PR code will be stored is suggested You may specify any other file to store the results on in the Destination PR file name text field 5 Ifthe input contains SDL macros you may want to expand these in the resulting SDL PR file Click the Analyze Options button to gain access to the Analyzer options dialog where you turn the Macro expansion button on and click the Set button 6 Click the Convert button to close the dialog and have the Analyzer start the conversion to SDL PR July 2003 Telelogic Tau 4 5 User s Manual 2557 Chapter 5 6 Analyzing a System 2558 Converting SDL PR to SDL GR You may convert SDL PR files to SDL GR diagrams storing them on files using the native format of the SDL suite Once converted these SDL descriptions may be man
9. ected is displayed in an SDL Editor window When the reference also contains a line and a column reference the text cursor is placed on the line and column of text where the error was detected 5 Ifyou need additional explanations to understand the error message select Help on Error from the Tools menu Telelogic Tau 4 5 User s Manual 2555 Chapter 5 6 Analyzing a System Producing a Pretty Printed SDL PR File You may produce a pretty printed PR file with the Analyzer with a sin gle command The layout used by this PR makes it easy to read by the human You may either submit SDL diagrams or SDL PR files as input to the pretty printer To be able to pretty print SDL PR the SDL suite requires that the input must be syntactically correct If the input does not fulfill this require ment the SDL suite will however produce a PR file with a raw layout This file is used by the SDL suite as a temporary file and it does not ad dress the human reader 1 In the Organizer select the root node of the SDL structure to be pretty printed From the Generate menu select Convert to PR MP The Convert to PR dialog is displayed Source gt System DemonGane PR fle Wrke reserved words in lowercase E Expand included PR files Destination PA Nie name honebalopribork demongane sd H ar Figure 486 The Convert to PR dialog 3 Adjust if required the conversion options 2556 You may specify a PR file as
10. ed PR file contains the original SDL specification formatted according to specific layout rules PR to GR conversion The input PR files are translated to SDL GR diagrams that you may open in the SDL Editor This pass allows you to for instance import PR files from other tools supporting SDL See also section The PR to GR Converter on page 2437 in chap ter 55 The SDL Analyzer Semantic analysis During this pass the Analyzer checks that your SDL diagrams obey the static semantic rules as defined in the Z 100 recommendation During this pass the Analyzer builds and uses a symbol table which can also be used later by the Code Generators The semantic analysis is likely to be the bottleneck when analyz ing a system See Optimizing a System to Reduce Analysis Time on page 2551 Telelogic Tau 4 5 User s Manual 2545 Chapter 5 6 Analyzing a System 2546 7 After the semantic analysis pass you may optionally generate cross references listings of SDL entities where they are defined inan SDL system and where they are used referred The result from this pass is a file which contents may be displayed graph ically in the Index Viewer See chapter 47 The SDL Index View er for more information instance tree information about the SDL system The result from this pass is an instance information file consisting of records that describe the SDL entities that are present in the sys tem after ins
11. ible iden tifiers Deeply nested expressions may cause a significant degradation of performance when performing the semantic analysis pass It is therefore recommended to break down complex expressions into multiple less complex expressions Checking for Deep Expressions see below can assist you doing this If it is an option to modify your system it might be worthwhile to go through all synonyms newtypes and syntypes at the system level and move them as far as possible down the system structure This makes the context visible to every expression smaller and reduces the time spent in resolution by context Doing the same thing at lower levels will also improve performance but not as much as on higher levels The Index Viewer might be useful in accomplishing this Checking Output Semantics The Check output semantics option controls whether to issue warnings when SDL signal sendings where the semantics is different in SDL 88 and in SDL 92 are detected These warnings are particularly valuable when the input consists of SDL diagram that were designed in SDL 88 for instance with SDT 2 X Detecting Not Used Definitions The Check unused definitions option when turned on orders the Ana lyzer to report definitions that are not used for instance variables that are declared but neither written or read Checking Optional Parameters The Check optional parameters option controls whether to issue warn ings when an optio
12. l July 2003 Using the Analyzer Analyze SDL x Analyze System DemonGame T Include hidden symbols Analyze J Macro expansion I Case sensitive SDL V Syntactic analysis X Full Analyze MV Semantic analysis Details Piave I ASN 1 encode decode parameter Octet string Set F ASN 1 keyword substitution file 2 Cancel Error limit aa ie gt Log expressions deeper than or equalto 0 4 gt Filter command Help I Echo Analyzer commands F Terminate Analyzer when done July 2003 Figure 484 The Analyzer dialog Adjust if required some of the Analyzer options to their required values These options govern what passes should be performed by the Analyzer see Figure 483 on page 2544 and what output should be produced by the Analyzer The code generation pass options are however not controlled from this dialog Click the Analyze button First the Organizer checks if there are any unsaved diagrams if any the Organizer will prompt you to save these before analyzing them since the Analyzer operates on the lat est saved copy of a diagram The Organizer determines what diagrams need to be analyzed and what passes need to be run by looking at the time the diagrams were saved on file and by monitoring the Analyzer s work To perform an analysis you may either touch the SDL dia gram files or force the Analyzer by clicking the Full Analyze button The Analyzer
13. nal parameter is omitted from a procedure call an output a create request or an input Note that in out parameters are not Telelogic Tau 4 5 User s Manual 2551 Chapter 5 6 Analyzing a System 2552 optional An omitted parameter is indicated by empty parenthesis or a comma See also Checking Trailing Parameters below Checking Trailing Parameters The Check trailing parameters option controls whether to issue warn ings when the number of actual parameters is not equal to the number of formal parameters in a procedure call an output a create request or an input See also Checking Optional Parameters above Checking Unique References When the Check references option is activated the Analyzer will check that each remote definition is referred only once Turn this button off to disable this check Checking Missing Else Answer The Check missing else answers option controls whether to issue warn ings when an else part is expected but does not exist among the branches in a decision or transition option statement Checking Missing Answer Values The Check missing answer values option controls whether to issue warnings when there are values not covered by any of the branches in a decision or transition option statement Allowing Implicit Type Conversions The option Allow implicit type conversion controls whether implicit type conversions of reference data types generators Own ORef and Ref are allowed For more informa
14. tantiation of all types The file is a plain text file with a simple format See File Syntax on page 2443 in chap ter 55 The SDL Analyzer for more information 8 If your configuration includes a Code Generator you may include AC Code Generation pass in order to generate a C description of your SDL system This C code is then compiled and linked to generate a simulator a validator or an application The SDL to C Compiler is available as a Cbasic and as a Cadvanced code generator A Cmicro Code Generation pass The generated C code is opti mized with respect to memory requirements making it suitable for generating applications for systems with limited resources Analyzer Input and Output The input to the Analyzer consists of SDL 92 specifications that is SDL GR diagrams that are stored using the storage format of the SDL suite or SDL PR files or a combination of both The output consists mainly of PR files error and warning messages These messages are presented on the screen in a log window and may be stored on file See Error and Warning Messages on page 2461 in chapter 55 The SDL Analyzer for a description of these messages It is also possible to obtain a pretty printed SDL PR file of the input and to transform SDL PR files into SDL GR diagrams 1 Although technically built into the Analyzer binary executable sdtsan the Code Generators are additional optional tools that are licensed
15. ting Analysis Errors The results of the Analyzer are appended to the Organizer Log Window You may save the window contents on any file at any time The results of the last run are also saved on a file with the predefined name analyzer err The SDL suite provides a nice feature for displaying the source of an analysis error 1 Locate the Organizer log select Organizer Log if required 2 Select the error or warning message by dragging the mouse Telelogic Tau 4 5 User s Manual July 2003 Using the Analyzer EF Organizer Log Biel Es File Edit Tools Help Gal I lt zag SDTREF SDL C TelelogicTau42 examp les courseenv sdlintro comp lete09 DoorControl sbk 1 221 ERROR 184 Signal OpenDoor must be included in the signal list of the inner paths connect DtotC and DCtotC SDTREF SDL C TelelogicTau42 examples courseenv sdlintro comp lete09 DoorController spr 1 1 ERROR 240 Signal OpenDoor in input cannot be received input OpenDoor Semantic analysis completed Number of errors 3 INFO 278 Analyzer command could not be fully performed Analysis completed Figure 485 Selecting an error message The selection must contain at least the line starting with the text SDTREF for more information on the format of references see chapter 19 SDT References E 3 Select the menu choice Show Error from the Tools menu July 2003 4 The symbol where the error has been det
16. tion see Implicit Type Conver sions on page 134 in chapter 3 Using SDL Extensions in the SDL Suite Methodology Guidelines Note Analyzing large expressions with this option on is slow Generating a Cross Reference File Turn the Generate a cross reference file option on to have the Analyzer generate a file with a list of definitions and references to SDL entities as an supplementary result from the semantic pass You may also want Telelogic Tau 4 5 User s Manual July 2003 July 2003 Using the Analyzer to specify another file name than the suggested one The contents of this file may be read and visualized graphically with the Index Viewer Generating a Complexity Measurement file Turn the Generate a complexity measurement file option on to have the Analyzer generate a file containing characteristics of the system You may change the file name in the field below See chapter 49 Complexity Measurements for more information Generating an Instance Information File Turn the Generate an instance information file on to have the Analyzer generate a file with instance information about the analyzed system The name of the file can be set in the field below The file is produced after the semantic pass Read more about the contents of an instance in formation file in SDL Instance Information on page 2442 in chapter 55 The SDL Analyzer Checking for Deep Expressions Adjust the Expression depth
17. with respect to the semantic rules 2548 Analyzing Using Default Options To analyze an SDL structure using default options 1 In the Organizer select the root node for the subtree that is the sub ject to be input to the Analyzer Click the quick button for Analyze The Organizer first checks if there are any unsaved diagrams if any the Organizer will prompt you to save these before analyzing them since the Analyzer oper ates on the latest saved copy of a diagram The Organizer determines what diagrams need to be analyzed and what passes need to be run by looking at the time the diagrams were saved on file and by monitoring the Analyzer s work To perform an analysis you may either touch the SDL dia gram files or force the Analyzer by clicking the Full Analyze button see Figure 484 The analysis job is submitted the to the Analyzer using the options as they are currently defined in the Analyzer options dialog see Figure 484 on page 2549 From now on the status bar reads Analyzer working When done the status bar will read Analyzer ready Analyzing Using Customized Options To analyze an SDL structure with customized options 1 In the Organizer select the root node for the subtree that is the sub ject to be input to the Analyzer From the Organizer s Generate menu select the Analyze command The Analyzer Options dialog is displayed Telelogic Tau 4 5 User s Manua

Download Pdf Manuals

image

Related Search

Related Contents

取扱説明書(JWWA B126水道用補修弁)  attrezzature - Zep Italia S.r.l.  Blanco 157-183 User's Manual  English manual  Operating instructions DRY AGER DX 1000  E-MU 02 PC  Patriot Memory 1GB PC3-10600  

Copyright © All rights reserved.
Failed to retrieve file