next up previous contents index
Next: 3.2 Deleting and changing Up: 3. Editor Previous: 3. Editor

3.1 Reading and writing

INA offers commands for reading and saving nets, places, transitions, and arcs:

<R> <F> Read a net from a File

If INA already has a net in the internal memory, the question Delete the old net? appears. Since only one net can be kept in the memory, entering <N> prevents reading the new net. Entering <Y> causes the old net to be deleted. All net files in the current directory are then displayed, and INA requests a file name. In chapter 2.2 on page [*], a description of how to enter a file name can be found. Afterwards, INA reads the specified file into the internal memory and returns to the editor menu. While the file is requested, it is possible to switch to the terminal mode by entering <esc> .

<R> <T> Read a net from the Terminal

With this command, it is possible to enter nets directly at the terminal. If INA already has a net in the internal memory, it reacts in a similar way to the command described above.

A description of the entering process can be found in chapter 2.3.3 on page [*]ff.

<R> <N> Read a Node from the terminal

With this command, you can enter nodes in a (possibly empty) net. First you are asked whether you would like to add a place or a transition. Then the entry syntax is displayed, which, in the case of a transition to be inserted, reads as follows:

Input syntax:
<nr>" "[ <prelist> ] [ "," <postlist> ] "<cr>"
 <prelist> ::= { <nr> [ ":"<mult> ]" " }
<postlist> ::= { <nr> [ ":"<mult> ]" " }
T>

For a place to be inserted, the syntax appears, which you can find in the description of a place input (see page [*] in chapter 2.3.3). There you find further notes on entering places.

A transition is entered in an analogous way; however, no initial marking is to be given, and instead of transitions lists, lists of places are requested.

If the specified node number already exists, the old definition is replaced. If, on the other hand, you enter a non-existent node number, a corresponding node will be inserted into the net without a name. The same applies to new nodes occuring in the definition of this node, which are automatically inserted by INA .

By entering <Y> upon the inquiry next, you can insert further transitions or places. In case you prefer a transition-oriented input, rather than selecting <R> <T> , you can use this function to enter the net from the view of transitions, and then later name the places and determine an initial marking, as well as possible capacities and initial clock settings, using the changing functions described below.

When inserting a node into a coloured net, you may proceed similar to the description in chapter 2.3.3 on page [*]ff. When inserting nodes into coloured nets please note the following: for a transition to be inserted, all adjacent places must exist. INA issues the following warning: Please, make sure that all places exist to which the new transition will be connected.

<R> <L> Add a loop

With this function, a loop can be added. A loop consists of a place which is marked with a token, and a transition which has this place as both pre- and post-place. The purpose of this construction is to indicate transient states (see page [*] in chapter 4.4.2) under the option of time allocation to transitions (see chapter 2.5.2 on page [*]).

INA assigns to ech of the inserted nodes the number 0, or other available numbers. The place is named loop-place with the initial clock setting 1, and the transition is named loop-transition with the initial clock setting 0.

<R> <A> Read an Arc from the terminal

With this command, you can enter a new arc, delete an old one, or change its multiplicity. Firstly, the adjacent transition and place are requested, then the multiplicity. Finally, you have to indicate the direction of the arc: Place to Transition? The answer <Y> produces an arc from the place to the transition, whereas the answer <N> produces an arc from the transition to the place. An existing arc will be overwritten; it can be deleted by setting its multiplicity to 0. In a coloured net, an arc is entered as described in the entering of coloured nets (see page [*] in chapter 2.3.3).

<R> <P> Insert a run-place

With this function, a run-place can be inserted into an existing net. A run-place is marked with a token and has loops around all transitions. The purpose of this construction is to guarantee single element steps, if transitions are clocked with a firing duration, and the firing strategy of maximal steps is used (see page [*]ff in chapter 2.5.2).

The inserted place receives the number following the highest existing place number, and the name run-place.

Please note, that after adding transitions, the original run-place is to be removed, and replaced by a new one.

Using the safe firing rule, the net is dead; INA issues the following warning during the pre-analysis: inconsistency: firing mode=safe, but net is not pure (see also page [*] in chapter 6.2.1).

<W> <F> Write the net to a File

With this command, you can save the net in the internal memory to a file. By entering <Y> to the question Select Places, you can select specific places which span a sub-net, that is to be saved. After entering a file name, the (sub-)net is written into this file.

By selecting a set of places, you later have the opportunity to analyze the corresponding sub-net separately.

<W> <T> Write the net to the Terminal

With this command, you can display various information about the net in the internal memory on the screen:

Information on the net ('N'), the places ('P'),
       the transitions ('T')  or quit    ('Q')?

Using net 2.1, the different outputs of these commands will be demonstrated.

The sub-command <N> displays the net number and name, and provides an overview of the amount of places and transitions used, as well as the intervals containing the node numbers:

Netnr:   1    Netname: 3_prog_2_term   
Places:                7   [0,6]
Transitions:           6   [1,6]
With the sub-command <P> , the places of the current net displayed. You have the option to select certain places. The following information is given: place number, place name, marking, name and number of pre-transitions with multiplicities, and likewise for post-transitions:

place nr.      0.terminal_free      load:  2
-------------------------------------------------------------------------
PREname                  nr: mlt               nr: mlt   POSTname
logout_prog1              4:   2                1:   2   login_prog1     
logout_prog2              5                     2        login_prog2     
logout_prog3              6                     3        login_prog3     

place nr.      1.prog1_at_term      load:  0
-------------------------------------------------------------------------
PREname                  nr: mlt               nr: mlt   POSTname
login_prog1               1                     4        logout_prog1    

place nr.      2.prog2_at_term      load:  0
-------------------------------------------------------------------------
PREname                  nr: mlt               nr: mlt   POSTname
login_prog2               2                     5        logout_prog2    

place nr.      3.prog3_at_term      load:  0
-------------------------------------------------------------------------
PREname                  nr: mlt               nr: mlt   POSTname
login_prog3               3                     6        logout_prog3    

place nr.      4.prog1_on_break     load:  1
-------------------------------------------------------------------------
PREname                  nr: mlt               nr: mlt   POSTname
logout_prog1              4                     1        login_prog1     

place nr.      5.prog2_on_break     load:  1
-------------------------------------------------------------------------
PREname                  nr: mlt               nr: mlt   POSTname
logout_prog2              5                     2        login_prog2     

place nr.      6.prog3_on_break     load:  1
-------------------------------------------------------------------------
PREname                  nr: mlt               nr: mlt   POSTname
logout_prog3              6                     3        login_prog3

With the subcommand <T> , the transitions are displayed in a way which is similar to the previous description:

transition nr.      1.login_prog1                       
-------------------------------------------------------------------------
PREname                  nr: mlt               nr: mlt   POSTname
terminal_free             0:   2                1        prog1_at_term   
prog1_on_break            4     

transition nr.      2.login_prog2                       
-------------------------------------------------------------------------
PREname                  nr: mlt               nr: mlt   POSTname
terminal_free             0                     2        prog2_at_term   
prog2_on_break            5     

transition nr.      3.login_prog3                       
-------------------------------------------------------------------------
PREname                  nr: mlt               nr: mlt   POSTname
terminal_free             0                     3        prog3_at_term   
prog3_on_break            6     

transition nr.      4.logout_prog1                      
-------------------------------------------------------------------------
PREname                  nr: mlt               nr: mlt   POSTname
prog1_at_term             1                     0:   2   terminal_free   
                                                4        prog1_on_break  

transition nr.      5.logout_prog2                      
-------------------------------------------------------------------------
PREname                  nr: mlt               nr: mlt   POSTname
prog2_at_term             2                     0        terminal_free   
                                                5        prog2_on_break  

transition nr.      6.logout_prog3                      
-------------------------------------------------------------------------
PREname                  nr: mlt               nr: mlt   POSTname
prog3_at_term             3                     0        terminal_free   
                                                6        prog3_on_break

With <Q> you can quit viewing the net.


next up previous contents index
Next: 3.2 Deleting and changing Up: 3. Editor Previous: 3. Editor

© 1996-99 Prof. Peter H. Starke (starke@informatik.hu-berlin.de) und Stephan Roch (roch@...)

INA Manual Version 2.2 (last changed 1999-04-19)