To change the current value of a condition or a data-item, or to change the current status of an event, use one of the following three forms of the SET command:
Pdb > SET DATA_ITEM data_item_name := data_expression
Pdb > SET EVENT event_name := event_expression
Note that the command is applicable only to primitive objects; you cannot change the value or the status of a compound object.
On the right-hand side of an assignment, you can put any legal Rational Statemate expression whose type corresponds to that of the object on the left-hand side. The value on the right-hand side of the assignment is evaluated, and assigned to the object whose value is being set.
To generate event e independently of other elements’ statuses, type:
To turn off or, reset event e, type:
The SET command does not impose the redefinition of the system’s object. In the example above that sets
event e1
, the current statuses ofe2
ande3
are examined immediately, and if either event is generated, thene1
becomes generated this time only. Later in the run, havinge2
ore3
generated does not cause e1 to be generated. Thus,e1
remains primitive and is not redefined by the command as a compound event.The SET OBJECT command is a very powerful command to use in debugging sessions when you discover an error in the specification, and you want to continue debugging, without first correcting the specification. This command can be combined with the breakpoint operations to temporarily correct mistakes in the specification.
Suppose, for example, that there is a static reaction on entering state S which refers to condition C defined as:
and the correct definition should have been:
You can then enter the following:
The prototype then behaves as if the error is fixed, allowing you to concentrate on looking for other problems. Later you should correct the definition of C using the Properties Editor.