ObjectGEODE SDL Simulator FAQ






When I replay a complex scenario, how can I break if a certain event occurs ?
How to locate an element during batch (no GUI) simulation ?
How can I easily enter values for complex signal parameters in feed (or output) ?
In mode supertrace, what is the default size of the bits array used to store the presence of states (i.e. states_limit) ?
How can I access to SDL literals from an observer ?
How come a timer who has been set never times out ?
Which files can I remove to free disk space after an SDL simulation ?
How come gsmcomp reports 0 errors but does not generate the .sim file ?
If my SDL model contains Z.100 or Z.105 strings, lists and sets, how can I use the same C functions to implement SDL ADT operators for simulation and for C code generation ?
Can I write (and simulate with ObjectGEODE) two ADT operators with the same parameters and returning different types ?

Step by step simulation

Q. When I replay a complex scenario, how can I break if a certain event occurs ?
A. Simply enter a stop condition corresponding to the event. For example to detect the calls to a procedure P1 defined in process Pro3, enter the stop condition 'call Pro3!P1'. Then load your scenario and redo it (Button Redo all). When a call to Pro3!P1 occurs, the redo stops, and indicates why.

Q. How to locate an element during batch (no GUI) simulation ?
A. Enter 'locate name'. For example to locate variable x, type 'locate x', the simulator responds 'line 390 of file atsu.pr'. If several x exist in the model, type 'print x' to get the pathname, and use it in locate (example : 'locate b1!proc_a!x').

Q. How can I easily enter values for complex signal parameters in feed (or output) ?
A. Suppose you want to feed signal tx(buffer) - you see it in the Edit-Feed window of geodesim - you must normally search the NEWTYPE buffer in the SDL model, then search the type of every fields if buffer is a STUCT, etc. To avoid this, type the following geodesim command: dcl x buffer. This declares for the current simulation session a new variable x. Type 'print x' to see the contents of x. Now to change the value of x, create a watch, add x into it (push right mouse button in the watch to see pull-down menu), to select x and to use Change Value (right mouse button in the watch): then you get a window enabling you to enter easily values in the fields of x . After this, x is ready to be used in the feed window: in the field 'Signal:', enter '(x)' after the signal name.
But if you want save your feeds to reuse them later, you need to generate an MSC containing the value of x. For this, type 'trace x; msc my1'. Then display the file my1.msc with a text editor, search ACTION, you get for example ACTION 'x = (.1, 'ack' .)'. Copy the value: (.1, 'ack' .) and paste it into the feed window. Now you can save your feed definitions into a file ('list feed >>> model.startup' will add them to your startup). All this is easier to do than to explain !
(note : since V4.1, the feed ? command generates feed templates)

Exhaustive simulation

Q. In mode supertrace, what is the default size of the bits array used to store the presence of states (i.e. states_limit) ?
A. If you do not change states_limit, its default value is 20000003 (but geodesim displays 0). In the other modes (depth etc.), a value of 0 for states_limit means no limit in the number of explored (global) states (of course memory is the limit).

GOAL observers

Q. How can I access to SDL literals from an observer ?
A. Use a probe. Example : if r4800 is a literal, you must declare:

      -- probe on the block bts containing the declaration of r4800:
      probe pb2 gsm!bts  
      -- test if first parameter of signal sig1 is equal to r4800:
      when it:= output sig1 from pb1;
           provided it!sig1!p1= pb2!r4800; ...

Misc

Q. How come a timer who has been set never times out ?
A. To be consistent with Z.100, in OG Simulator transitions do not consume time. The only way to have the time progress after setting a timer is to have no transitions to fire. In other words, if your SDL system also contains a process which 'loops', for example which contains a transition like STATE st_1; PROVIDED TRUE; NEXTSTATE -;, then the time will never progress. To remedy to this, an option has been introduced in ObjectGEODE 1.2 SDL Simulator: if you want the time to progress in such situations, type in the Simulator: define loose_time 'true'. (the other possibility is to type wait(n), which FORCES the time to progress of n units. But of course this does not work in random or exhaustive modes)

Q. Which files can I remove to free disk space after an SDL simulation ?
A. The directory .geodesm can be deleted: it contains C files .c and .o generated by gsmcomp for simulation. The .sim and .sym files can also be removed.

Q. How come gsmcomp reports 0 errors but does not generate the .sim file ?
A. The license server is probably down.

Q. If my SDL model contains Z.100 or Z.105 strings, lists and sets, how can I use the same C functions to implement SDL ADT operators for simulation and for C code generation ?
A. Use the option static_string in gsmcomp. Thus gsmcomp will generate arrays for lists and sets. This also allows exhaustive simulation of such SDL models. Note that simulating a concatenation of two strings with this option will raise a dynamic error.

Q. Can I write (and simulate with ObjectGEODE) two ADT operators with the same parameters and returning different types ?
A. Yes, you can write like in this example:

	NEWTYPE codes
		LITERALS c1, c2;
		OPERATORS
			decode: INTEGER -> codes;
			decode: INTEGER -> INTEGER;
		OPERATOR decode;
			FPAR f INTEGER; RETURNS codes;
			START; /* etc. */
			RETURN c2;
		ENDOPERATOR;
		OPERATOR decode;
			FPAR f INTEGER; RETURNS INTEGER;
			START; /* etc. */
			RETURN f*3;
		ENDOPERATOR;
But such an operator must not be called in a decision, call it first to put the returning value in a variable then use this variable in the decision.

Copyright © TransMeth Sud-Ouest 1997-2003