[Previous] [Next] [Contents] [Index]


    Using the SDL Editor

This chapter describes the functionality, menus, dialogs and windows of the SDL Editor. You can also find information about how to use the editor for creating and drawing SDL (Specification and Description Language) diagrams.

Table of Contents 

General

Editor Information

The editor described in this chapter handles SDL diagrams.

Another editor is capable of handling four different types of diagrams, namely the Object Model (OM) diagrams, State Chart (SC) diagrams, Message Sequence Chart (MSC) diagrams, and High-level MSC (HMSC). That editor is described in Using the ORCA Diagram Editors.

SDL Diagrams

The SDL Editor can handle any number of SDL diagrams of any type. Virtually all of the Z.100 recommendation is supported.

The SDL Editor supports three kinds of SDL diagrams:

The editing functionality that is available depends on what type of diagram the SDL Editor is handling.

This chapter describes the functionality the SDL Editor provides when you edit interaction and flow diagrams.

In Figure 335-- Figure 337, you can find an example of interaction diagrams (in the example there is one system diagram and two block diagrams) and the resulting overview diagram.

Figure 335  : System diagram

Extracted pic [16]

Figure 336  : Block diagrams

Extracted pic [17]

Figure 337  : Resulting overview diagram

Extracted pic [18]

Interaction and Flow Diagrams

The SDL Editor works with SDL diagrams in graphical form, SDL-GR, and allows graphical editing of symbols, lines and text.

You may open multiple windows in an SDL Editor to be shown at the same time; each window will hold an SDL page. This can be useful if you want to edit different diagrams and pages and refer between them, or if you want to see the interface between two processes on different hierarchical levels. This is the normal mode in which diagrams are edited.

Interaction diagrams are: system, system type, block, block type, substructure, package diagrams.

Flow diagrams are:process, process type, service, service type, procedure, operator, macro diagrams.

Overview Diagrams

You can also use the SDL Editor to view SDL overview diagrams. An SDL overview diagram consists of a number of diagrams that are built up into a diagram subtree in which the symbols are drawn in a nested fashion, giving a more comprehensive overview of a required set of diagrams. You may have multiple SDL overview pages associated to one SDL system, at different SDL levels, and thus presenting different views of the system. You generate overview diagrams in the Organizer (using the SDL Overview command), and you can open the overview diagrams for display in the SDL Editor. Various parameters allow you to generate overview diagrams to meet your requirements.

Once an SDL overview diagram is generated, you cannot modify it in the same way that you would normally edit interaction and flow diagrams (unless you regenerate it). However, you can do limited editing on the text of overview diagrams in the SDL Editor.

Essentially, the editor works in read-only mode with regard to graphical operations. General restrictions in editing Overview diagrams are:

SDL Pages

The pages that the SDL Editor displays are always contained within an SDL diagram. An SDL diagram can contain any number of pages, but, must contain at least one page, and can be any of the following types.

Relationship between Diagrams and Pages

Pages and diagrams must be associated with each other according to the rules of SDL. There follows a list of what type of pages can be added to different diagrams and what type of pages can be pasted into those diagrams.

Diagram type Page types that can be added to the diagram Page types that can be pasted to the diagram

system

block interaction

block interaction
package

block

block interaction
process interaction

block interaction
process interaction
package

substructure

block interaction

block interaction
package

service

service

service
graph
procedure
macro
operator

process

graph
service interaction

graph
service interaction
service
procedure
macro
operator

procedure

procedure

procedure
service
graph
macro
operator

system type

block interaction

block interaction
package

block type

block interaction
process interaction

block interaction
process interaction
package

service type

service

graph
procedure
macro
operator

process type

graph
service interaction

graph
service interaction
service
procedure
macro
operator

macro

macro

macro
service
graph
procedure
operator

operator

operator

operator
service
graph
procedure
macro

package

package

package
block interaction

overview

overview (one page only)

-

SDL Page Order

The SDL pages that are contained in an SDL diagram are listed and handled according to the order they were added when they were created.

This order is reflected in some of the menu choices that are related to SDL pages. Also, the structure displayed by the Organizer will adopt the same order. See Chapters.

SDL pages can be renamed and rearranged by the Edit menu choice in the Pages menu.

Tracing Simulations (Graphical Trace)

Graphical trace, GR trace, is a method to follow the execution of transitions in SDL-GR source diagrams. It is mainly intended to be utilized together with the simulator's Step-Symbol command and should normally only be used for a small number of processes to limit the amount of information displayed. The GR trace facility will always show the next SDL symbol within the transition to be executed. After a nextstate or stop operation (e.g. between two transitions), the nextstate or stop symbol is still selected.

The GR tracing is activated from the SDT Simulator. The SDL Editor selects the symbol currently being executed. The Simulator automatically highlights the symbol and displays it. You can use either SDL to see what is being traced, or MSC to see the interaction between processes.

If you use an MSC to trace the simulation, the instances concept of MSC is mapped to the instances concept of SDL processes. The mapping rules which govern how SDL events are transformed into MSC symbols, lines and textual elements are described in Mapping Between SDL and MSC.

GR trace will take place in an SDL Editor window containing the appropriate diagram. If the SDL Editor does not hold the current page, but if the diagram can be found in the Organizer, then the page will be opened by the SDL Editor.

If the Organizer cannot find the diagram, or the SDL Editor cannot find an appropriate symbol to select, due to, for example, modifying the diagrams after the generation of the simulator, error messages will be issued by the Organizer or SDL Editor, but the simulation program will continue to execute without tracing graphically.

Setting Breakpoints in Simulations

During simulations, the SDL Editor can show all breakpoints that have been set in the Simulator. It is also possible to set and remove breakpoints directly in the SDL Editor by using the special Breakpoints menu that will be shown while this function is operating. The functionality is activated by the Connect-To-Editor command in the Simulator.

Compliance with ITU Z.100

The SDL Editor complies with the SDL rules as defined in the ITU Z.100 recommendation. Virtually all parts of the recommendation are supported by the SDL Editor. More information on the SDL support compared to Z.100, see Compatibility with ITU SDL.

Syntax Rules when Editing

Some of the SDL syntax rules are enforced during editing when you create diagrams, add pages to these diagrams, add symbols and lines to your pages and edit the text inside the symbols and lines.

Next follow the syntax checks that are performed by the SDL Editor:

Turning Syntax Checking On and Off

The syntax checking for entered texts, for what symbols you are allowed to use, and how you can interconnect symbols can be disabled and enabled again.

To disable or enable syntax checking:

  1. The operation applies on one diagram at the time. Therefore, make sure you are editing the correct diagram.
  2. Select the Diagram Options menu choice from the View menu. In the dialog which is issued, toggle the Syntax Check button on or off and click OK.

Note:  No Retroactive Syntax Checking

Turning the switch from off to on will not perform a retroactive syntax check for not allowed interconnection of symbols. Only the objects that you insert while syntax checking is enabled are checked. However, the syntax check on texts will be performed on all the texts when syntax check is set to on.

Syntax checking in Kernel Heading and Reference symbol

The syntax check for texts in the kernel heading or any reference symbol is always on independent of the diagram options setting.

Pasting and Syntax Checking

Only symbols that are valid according to what is displayed within the symbol menu may be pasted into a page. Non-valid symbols will be omitted whether or not syntax checking is enabled.

Identical Symbols -- Different Syntax


Extracted pic [19]

SDL contains some symbols which appear identical, but are distinguished by their syntax. The symbols are:

  • The in connector and the out connector
  • The continuous signal and the enabling condition.

When syntax checking is on, the SDL Editor automatically determines from the context what kind of symbol it is. If syntax checking is off, the symbols are always treated as in connector and enabling condition, respectively.

SDL Grammar Help

The SDL Editor provides a versatile context-sensitive support function -- the Grammar Help window. The grammar help window is available to assist you when entering and editing the syntax of SDL text elements that are correct according to Z.100 definition. It simplifies writing statements with the correct SDL syntax.

The SDL Grammar Help facility is described in Using Grammar Help.

Signal Dictionary Support

The SDL Editor also provides a means of access to a signal dictionary where the signals that are already defined can be accessed. The Signal Dictionary window provides functions for listing SDL signals that are available when looking up or down in the SDL hierarchy or by looking at the current diagram. Also, you can ask the tool to list signals that are used in the current diagram or defined and visible according to the SDL scope rules.

Furthermore, the signal dictionary has the ability to import messages from a Message Sequence Chart (each MSC message will be mapped to an SDL signal) and to import an external signal dictionary.

For more information on this topic, see Using the Signal Dictionary.

The SDL Editor User Interface and Basic Operations

The SDL Editor User Interface

The SDL Editor consists of a main window and three auxiliary windows:

The SDL Editor also contains the symbol menu, where you select the symbols (objects) that are to be inserted into the page, and the text window, where you may edit textual objects.

The general Telelogic Tau user interface is described in User Interface and Basic Operations.

Figure 339 : The SDL Editor window (on UNIX)

Extracted pic [20]

Drawing Area

Figure 340  : The Drawing Area

Extracted pic [4]

The drawing area (see Figure 340) is the part of the window that displays the symbols, lines and text that constitute an SDL page (an SDL diagram can contain multiple pages). Most of the graphical notation that is used in the SDL Editor is inherited from the Z.100 definition. In addition, some tool specific notations have been added to facilitate the work with the SDT tool set in general, and the SDL Editor in particular.

The Drawing Area Boundaries

The drawing area is delimited by its boundaries, which correspond to the size of the SDL page. Within a diagram, each page has an individual size. No objects are allowed to be placed outside these boundaries. The drawing area uses a light background color, while the area outside the drawing area uses a grey pattern.

The Frame

You can select and resize the frame. All objects, except the package reference symbol, gates and printout page number must reside entirely within the frame.

The Kernel Heading

The kernel heading identifies the diagram type and its name. Alternatively, an SDL qualifier expression can be used. You can edit but not move the kernel heading. The SDL Editor performs a textual syntax check based on the grammar used in this heading.

SDT supports the following syntaxes for the kernel heading:

Case Syntax
  1.  
SYSTEM <name> [: <type expression>]
  1.  
BLOCK <identifier>
  1.  
PROCESS <identifier> [<number of instances>]
  1.  
SERVICE <identifier>
  1.  
<procedure preamble> PROCEDURE <identifier>
  1.  
SUBSTRUCTURE <identifier>
  1.  
MACRODEFINITION <name>
  1.  
SYSTEM TYPE <identifier>
  1.  
[<virtuality>] BLOCK TYPE
  1.  
[<virtuality>] PROCESS TYPE
  1.  
[<virtuality>] SERVICE TYPE
  1.  
OPERATOR <operator identifier>
  1.  
PACKAGE <name>

For an explanation and reference to the notation used in the table above, see the Z.100 recommendation.

The kernel heading is repeated trough all pages contained in an SDL diagram.

The Page Name

The page name identifies the name of the SDL page and, within parentheses, the total number of SDL pages contained in the current SDL diagram.

The contents of the page name are assigned by the tool. You can not select, move, or edit the page name.

Printout Page Number

This object is created by the SDL Editor to inform you about the physical page numbering that will be the result of an SDL page which is larger than the paper format that is defined. You can neither select nor edit it. Page numbering follows a "down first, then right" fashion.

Figure 341 : The page numbering in the SDL Editor

Extracted pic [1]

Grids

The SDL Editor uses two grids for an easy positioning of symbols, lines and textual elements.

Default Size of Symbols

The symbols are assigned default sizes when added to the drawing area:

You can set the sizes by the SDL Editor preferences.

Color on Symbols

For each symbol type there is a preference for setting the color of the symbol. It is only the graphical part of the symbol and not the associated text(s) that will use the color setting. On UNIX, the setting is only valid on screen and all symbols will use the black color when printed on paper. In Windows, when using MSW Print the colors will be sent to the printer as well. For more information, see ORCA and SDT Specific Preferences.

Keyboard Accelerators

In addition to the standard keyboard accelerators, described in Keyboard Accelerators, the SDL Editor features the following:

Accelerator Reference to corresponding command

Ctrl+D

Opens the next page in the diagram, similar to <Page Name>

Ctrl+I

Insert Paste

Ctrl+U

Opens the previous page in the diagram, similar to <Page Name>

<Delete>

Clear (i.e. remove, delete)

Ctrl+1

Show Organizer

Ctrl+2

Connect to Text Editor

Quick-Buttons

In addition to the generic quick-buttons described in General Quick-Buttons, the SDL Editor tool bar contains the following quick-buttons:


Extracted pic [10]
Text window on / off

Toggle the text window between visible and hidden, as described in Window Options.


Extracted pic [11]
Symbol menu on / off

Toggle the symbol menu between visible and hidden, as described in Window Options.


Extracted pic [12]
Reference page

Open the page where this diagram is referenced, similar to Edit Reference Page.


Extracted pic [13]
Previous page

Open the previous page in the diagram, similar to <Page Name>.


Extracted pic [14]
Next page

Open the next page in the diagram, similar to <Page Name>.


Extracted pic [15]
Scale Overview

Set the scale such that the page will fit in the window, similar to Set Scale.

Scrolling and Scaling

You can scroll the view vertically and horizontally by using the scrollbars. The view may also be scrolled automatically when you move the cursor beyond the current view, for example when you move an object or add a symbol.

If you move the cursor close to the edge of the current view, the automatic scrolling is slow. If you move it further beyond, the scrolling is quicker.

You can scale the view by specifying a scale or by zooming in and out.

To specify a scale:

  1. Select Set Scale from the View menu.
  2. In the dialog that will be opened, you can either:


Extracted pic [27]
    • Click the Overview button to adjust the drawing area to the size of the window. (This has the same effect as the Scale Overview quick-button.) The smallest scale is 20%.

To zoom in or out:


Extracted pic [28]

  • Click the quick-button for zoom in or zoom out.

Symbol Menu

The symbol menu contains the SDL symbols that you can place into the drawing area.

On UNIX, the symbol menu is a fixed-sized, non-moveable auxiliary window, associated with the drawing area and placed to the right of it. Each editor window has its own symbol menu.

In Windows, the symbol menu is a fixed-sized, moveable window that can be placed anywhere on the screen, not necessary within the limits of the editor window. A single symbol menu is shared by all instances of the editor currently running.


Extracted pic [3]

The symbol menu can be made invisible and visible again with a menu choice, Window Options, or a quick-button In Windows: When visible, the symbol menu will always be placed on top of the editor window.

Basically, when you select a symbol in the symbol menu and click it into the drawing area it is added to the diagram. How to work with symbols is described in Working with Symbols.

The contents of the symbol menu depends upon the type of diagram that is displayed in the SDL Editor window and the settings of the SDL Editor preferences depends upon whether the symbols should be used or not.

For a reference to these symbols, see Symbols on Interaction Pages and Symbols on Flow Pages.

Figure 342  : The Symbol menu

Extracted pic [8]

Syntax Checking on SDL Symbols

If syntax checking is enabled, some of the symbols displayed in the symbol menu may be dimmed. This indicates that those symbols are not valid within the current context, and that you cannot select them.


Type of page Unusable symbols (dimmed)

System /
System type

process reference
service reference
block substructure reference
system type reference
gate


Block diagram /
Block interaction page

process reference
service reference
block substructure reference
system type reference
gate


Block diagram /
Process interaction page

block reference
service reference
system type reference
gate


Service

procedure start
procedure return
macro inlet
macro outlet
gate


Process diagram /
Graph page

procedure start
procedure return
macro inlet
macro outlet
gate


Process diagram /
Service interaction page

block reference
process reference
block substructure reference
system type reference
block type reference
process type reference
gate


Procedure

start
stop
macro inlet
macro outlet
gate


Block type diagram /
Block interaction page

process reference
service reference
block substructure reference
system type reference


Block type diagram /
Process interaction page

block reference
service reference
system type reference


Macro

gate


Service type

procedure start
procedure return
macro inlet
macro outlet


Process type diagram /
Graph page

procedure start
procedure return
macro inlet
macro outlet


Process type diagram /
Service interaction page

block reference
process reference
block substructure reference
system type reference
block type reference
process type reference


Operator

state
input
save
output
procedure call
enabling condition / continuous signal
create request
priority input
procedure reference
start
stop
macro inlet
macro outlet
gate


Package

block reference
process reference
block substructure reference
service reference
gate


Working with Diagrams

This section describes the methods you use when performing the following tasks on SDL diagrams:

Creating a Diagram

You can create diagrams from within other diagrams. When created, they form part of the current active system in the SDL Editor, and their presence is instantly reflected in the Organizer. This is achieved by inserting SDL diagram reference symbols.

You can also create diagrams as separate unrelated new entities. They will however not be incorporated in the Organizer.

Creating a Related Diagram from Another Diagram

  1. Open the SDL diagram from where to start.
  2. Insert the SDL reference symbol.
  3. Assign the symbol a name.
  4. Deselect the reference symbol. The Organizer's diagram structure is updated accordingly.
  5. Double-click the newly added reference symbol. You should specify what action to perform, either:
  6. Select an option and click OK.

    The SDL Editor will now create a new diagram, possibly a new window, and display the newly created diagram.
  7. Save both the parent and the child diagram later on in your editing session, to make changes permanent.
Example in an Organizer Structure

As an example, in the Organizer structure in Figure 343, a system is shown with only one block diagram.

Figure 343  : A basic system shown in the Organizer

Extracted pic [21]

Suppose the system diagram is being edited. We now add a new block reference symbol, name it Block_B and deselect it. The Organizer diagram structure becomes:

Figure 344 : Having added a reference symbol

Extracted pic [22]

SDT shows, with the [unconnected] identifier, that the newly added reference symbol is not yet connected to any physical file.

Now, double-click the Block_B symbol. Specify whether you want to create a new file or to connect the newly created block to an existing file.

Figure 345 : Creating a new diagram

Extracted pic [23]

Make sure the Show in Editor radio button is on and click OK. In some cases a new dialog appears, where you are to specify the name and type of the first SDL page to add to the diagram (an SDL diagram must contain at least one SDL page).

Assign a page name (see Adding a Page) and click OK.

A new block diagram with the name Block_B is created. The SDL Editor responds by issuing a window showing this diagram. Also, the Organizer's diagram structure is updated, showing the new diagram icon, inserted at the corresponding place in the SDL hierarchy.

Figure 346 shows the result:

Figure 346  : The newly created diagram and the resulting diagram structure

Extracted pic [24]

Creating an Unrelated New Diagram

  1. Select New from the File menu of the SDL Editor. A dialog will be opend.

Figure 347 : Creating a new diagram

Extracted pic [25]

  1. Enter the name of the new diagram in the Diagram Name field. The name should be in keeping with SDL naming conventions.
  2. Choose the type of diagram from the diagram type menu.
  3. Click New. In some cases a new dialog box is shown where you can add a page, as each diagram must have at least one page. See the section Adding a Page for this.

  4. A window on the newly created diagram is opened.

Including a Diagram

Including a Diagram into the SDL Hierarchy

When you have created a diagram, it needs to be brought into the SDL hierarchy to be available for future selection in the Organizer. Otherwise, you will only be able to open it from the SDL Editor.

  1. Create the diagram using the New command from the SDL Editor. Save the diagram on file.
  2. Open the diagram that will have a reference to the newly created diagram.
  3. In the diagram you just opened, add a diagram reference symbol with a type and name that matches the newly created diagram. A new icon appears in the Organizer structure.
  4. With the Organizer Connect command, connect the new icon with the file on which the diagram is stored. See Connect.

Once a reference symbol is placed in the newly created page of the new diagram in the SDL Editor, the SDT Organizer is updated to reflect this. This indicates that the SDL hierarchy is updated.

Including a Diagram into the Organizer

If a diagram is not managed by the Organizer (i.e. not contained in the Organizer structure) you must first include it into the Organizer, before you can start the SDL Editor.

  1. Select the place in the Organizer where you want to add the SDL diagram. It will be added as a new root diagram after a selected document or chapter, or at the top level of a selected module.
  2. Select the Organizer's Add Existing command from the Edit menu. A file selection dialog will be opened.
  3. Select a SDL diagram file.

  4. The SDL diagram is added to the Organizer structure, and opened in the SDL Editor.

Opening a Diagram

There are several ways you can open a diagram for editing, depending on where you are and what you need to access.

Lock Files and Read-Only Mode

When you open a diagram or document file, i.e. a.ssy, a lock file a.ssy.lck is created. If another user tries to open the same diagram or document file before you close it, a dialog will appear informing the other user that the file is in use. There are two choices in the dialog:

The read-write mode is the normal editing mode. In read-only mode, you are not allowed to make any changes to the diagram.

You will also enter read-only mode if you open a diagram file that you do not have write permission for. The read-only mode is indicated by the words read-only in the window title.

If you want to edit a diagram that is in read-only mode, here are two alternative actions:

Opening a Diagram File from the SDL Editor

  1. Select Open from the File menu or click the quick-button for Open. A file selection dialog is opened.
  2. Select a file in the files list and click OK. If the file is already opened by the SDL Editor, a message is issued.

Note: 

The status bar at the bottom the SDL Editor provides information about the diagram type and name stored on the file which is selected in the file list.

Opening a Diagram from the Organizer

You can open a diagram in different ways:

Opening a Diagram -- via Organizer -- to Show Analyzer Reports

When analysis has been performed, you can show the source of Analyzer error reports in an SDL Editor.

Opening a Diagram via a Reference Symbol

You can open a diagram from the SDL Editor by double-clicking on a reference symbol, or by using the Navigate command.

  1. Locate the SDL reference symbol referring to the diagram you want to open.
  2. Double-click the symbol or select it and choose the Navigate command from the Tools menu. The diagram is opened.

Opening a Diagram from the Simulator

If you have performed a GR trace in the SDT Simulator, invoking the Show-Next-Symbol or Show-Previous-Symbol simulator commands will display either the next symbol to be executed or the previously executed symbol in a diagram in an SDL Editor window.

Opening a New (Nonexisting) SDL Diagram

To open a new SDL diagram, you either use an unconnected SDL diagram icon or add a new SDL diagram icon.

Opening an Unconnected SDL Diagram Icon

To open an existing but unconnected SDL diagram icon:

  1. Select an unconnected SDL diagram icon in the Organizer.
  2. Double-click the SDL diagram icon. A dialog is opened.

Figure 348  : The Edit dialog

Extracted pic [5]

  1. Make sure the Show in editor option is set. Click OK. A new, empty diagram is opened.
Opening a New SDL Diagram Icon

To add a new SDL diagram icon to the Organizer and opening that icon:

  1. Select the place in the Organizer where you want to add the SDL diagram. The diagram will be added as a new root diagram after a selected document or chapter, or at the top level of a selected module.
  2. From the Organizer's Tools menu, select the Editors > SDL Editor command. A new SDL diagram icon is added to the Organizer structure, and the new diagram is opened in the SDL Editor.

Opening an Existing SDL Page

To open a specific page, the SDL pages must be visible in the Organizer diagram structure.

  1. To display page icons in the Organizer, select the Organizer's View Options command from the View menu. In the dialog, make sure Page symbols is highlighted and click Apply.
  2. Select the icon representing the SDL page in the Organizer.
  3. Double-click the SDL page icon. The SDL diagram page is displayed.

Saving a Diagram

There are several ways to save a diagram. The effect is saving any changes made to either one specific diagram, or all diagrams modified during the current session.

Saving a Diagram in the SDL Editor

Saving All Diagrams in the SDL Editor

You can make a global save of all the diagrams that are open in the current session and have been modified.

Saving a Copy of an SDL Diagram

You can save the diagram being edited into another file. You may either continue working with the original file or with the newly created copy.

Continue Working with the New Copy

  1. Select Save As from the File menu. A file selection dialog is issued.
  2. Click OK. The SDL diagram is copied to the specified file, the file containing the original is closed, and the window where you made the save remains open for editing the newly created file.

Continue Working with the Original

  1. Select Save a Copy As from the File menu. A file selection dialog is issued.
  2. Click OK. The SDL diagram is saved on the specified file, and the window where you made the save remains open for editing.

Closing a Diagram

Closing a diagram also means closing all instances of all windows displaying any page contained in that diagram.

Printing a Diagram

You can print an entire SDL diagram or a selection of pages or objects contained in the diagram. You print multiple SDL diagrams from the Organizer.

See The Print Dialogs in ORCA, SDT and the Organizer.

Displaying an Opened Diagram

You can open the diagram that is currently read by the SDL Editor. (The diagram that you would like to see may reside in a window which is not on top of the screen.)

The Diagrams menu shows all SDL diagrams and pages (up to a maximum of the last nine to have been used). If more than nine pages are open, a tenth menu choice, List All, provides access to a list dialog where all diagrams and pages are listed.

Reorganizing a Diagram

The SDL Editor can reorganize the layout of an SDL diagram, for instance if you run out of space on any of the pages that build up the diagram.

To reorganize an SDL diagram:

  1. Display the diagram you want to reorganize.
  2. Select Tidy Up from the Tools menu. A dialog is opened.

Figure 349 : The Confirm Tidy Up dialog

Extracted pic [26]

  1. Click Tidy Up. The SDL Editor reorganizes the diagram (this may take some time, depending on how complex your diagram is).
  2. Check the diagram before continuing working with it (you can undo the operation from the Edit menu).

Transforming the Type of a Diagram

A useful operation when e.g. transforming to a more object-oriented version of the SDL system is to change the SDL88 diagrams into type diagrams and make instantiations of these types. The following shows some examples how to perform such an operation and similar ones where you want to change the type of a diagram or want to work with an SDL structure that is almost a copy of an already existing hierarchy.

Example 1

Assume that the system S consists of block B, which contains process P. The exercise to solve is to transform the block into a block type BT and put this into a package P and instantiate the block B from BT.

There is no direct command to accomplish this task in SDT; instead there are many solutions, more or less complicated and time consuming. The proposed one is easy to use and will take advantage of the possibility to cut and paste complete sub-hierarchies, thereby eliminating loosing file connections and the need for making manual connections to existing files.

Solution: Open the system S, add a new block type symbol and name it BT. Open the block B and change the kernel heading from "block B" to "block type BT". Note that the sub-hierarchy in the Organizer, previously below B, has now been moved to BT. In system S, change the text in the block symbol to "B:BT" to make it an instance of BT and cut the block type symbol to the clipboard. Create a package diagram named P and paste the block type into this diagram.

Figure 350 : The Organizer view

Extracted pic [6]

To make the new system complete you need to add the text "use P;" in the package reference symbol in system S, define the gates inside the block type BT and use these gates to connect the existing channels for the block B. If needed, you can change the filename of the block type with the Save As command in the SDL Editor to use a filename that resembles the block type name and also use the file suffix that conforms to the SDT conventions.

Example 2

This is a variant of example 1. Assume we want to keep the original diagram but want to have a new block type BT in package P that is a copy of the existing B.

Solution: In package P place a new block type symbol and name it BT. Double click on it and in the appearing SDT Edit dialog tick the Copy existing file option and use the file connected to the existing block diagram B. Click Continue in the warning about recommended file suffix. In the opened diagram, change the kernel heading to "block type BT".

For all diagram references in BT (in the example there is only one), use the Connect command in the Organizer to connect them to the existing files. In the Connect dialog be sure to use the Expand Substructure option to get automatic connections for possible sub-hierarchies.

As an alternative to connecting the diagram references you can copy the reference symbols from block B and paste them into block type BT, then you will get automatically all the connections for sub-hierarchies below the pasted references.

Note that in either case you will use the same file connection for process P in our example for both the original process and also for the process P referenced in the block type, meaning that if you change the contents of this file you will change both the behavior of the block B and the block type BT, which might lead to unexpected results. If you want unique file connections you should take a copy of the existing file, for example copy P.spr to P1.spr, and reconnect one of the processes to this new file instead.

Example 3

The SDL system consists of system S, block B, process P and procedure subPr inside P. You want to transform most of the process including its procedure subPr into a new procedure Pr defined in the system S.

Figure 351 : The Organizer view

Extracted pic [7]

Solution: This solution is similar to the solution to example 2. Open the system diagram S and place a procedure reference symbol named Pr. Double click it and open a copy of the existing file connected to process P. Edit the kernel heading to contain the text "procedure Pr". Save the procedure as a new file. Connect all referenced procedures inside Pr or copy the procedure references from the process P to get all the sub-hierarchy file connections. Finally edit process P and procedure Pr to make them useful in their new context.

The symbol is dashed and the change is immediately reflected in the SDT Diagram Structure (this is only true if the Dashed Diagram option is on in the Organizer's View Options).

Figure 352 : Removing substructure by dashing

Extracted pic [9]


[Previous] [Next] [Contents] [Index]