Event Prioritization

MC-3020 provides prioritization through the marking of events. Events can be tagged to have priorities that accelerate the delivery of past events of lower priority that are currently outstanding. This provides the user with a degree of control over the sequencing of xtUML threads of control within the system. event.mark provides the means for specifying these event prioritizations.

Priority Events

To indicate to the model compiler than an event is to be given a priority, use the following invocation (one for each priority event):

MarkPriorityEvent(string "component",
 string "event_label",
 integer value);
 

Where the input parameters are:

"component"

is name of the component (domain) being marked

"event_label"

is the name of the event (with number appended)

value

is the relative priority of the event. Legal values are 0 to 255 inclusive. 0 is lowest and default.

Example 4.46. Marking a Priority Event

.invoke MarkPriorityEvent( "autosampler", "CAR1", 4 )
        


MC-3020 Extent Prediction and Marking

First pass translation collects statistics used to conservatively estimate the number of container nodes (containoids) required by the system.

There are three different uses for instance containoids: class extents, association extents and selection extents. Selection extents govern the total size of transient instance reference set variables in the actions. This represents values in the variable type inst_ref_set. The required number of containoids for each flavor is summed to provide the upper limit to total containers.

#define SYS_MAX_CONTAINERS \
    ( SYS_MAX_OBJECT_EXTENT + SYS_MAX_RELATIONSHIP_EXTENT + SYS_MAX_TRANSIENT_EXTENT )

SYS_MAX_OBJECT_EXTENT is a sum of all of the extent counts across all the domains of the system, which are sums of the class extents in each domain. Each class extent is allocated to be the system default for class extents, a marked value of the system default or the marked value for the specific class.

Selection extents are calculated by multiplying the largest number of selects that can occur in any action by the largest extent of any class. Thus allowing for the worst case action to select the largest class extent each time. This value is set in SYS_MAX_TRANSIENT_EXTENT.

transient containers = ( max selects ) * ( largest class extent )

Association extents are allowed to be as big as they would need to be if all instances on the MANY side were always participating. This value is set in SYS_MAX_RELATIONSHIP_EXTENT.

association containoids = ( number of MANYs ) * ( largest class extent )

The following marks govern these extent sizes:

  • MaxObjectExtentSize( "component", "key_letters", value )
  • MaxSystemObjectDefaultExtentSize( value )
  • TagMaximumRelationshipExtentSize( value )
  • TagMaximumSelectionExtentSize( value )

See the proper sections in the MC-3020 Users Guide for details on these marking parameters.

Association extents refer to the sets of instances participating in a association with multiplicity MANY. Sets built from linked lists are used to optimize traversal of associations with multiplicity MANY. For example, in the following model, A 1---R1---* B, class B does not need an extent set; it simply needs a single pointer reference to the A instance. The A instance however does need a set of instance references. Such a set uses "containoids" to collect the B instances related to the A instance. MC-3020 calculates the worst case (biggest possible) association extent.

The extent can be marked to be smaller than the worst case maximum using TagMaximumRelationshipExtentSize. MarkObjectExtentSize will also have an effect on the calculated total.

If no extent size marking is supplied, MC-3020 will calculate a worst case for a model of a higher number of containers. MC-3020 will see R1 and allow for all possible instances of B to participate with instances of A. (This is the most important point!)

Another way to understand how MC-3020 calculates this maximum is as follows:

  1. Count the number of MANYs (---*) on a class diagram.

  2. For each MANY (---*), add the maximum class extent on the MANY side (B above).

  3. There are adjustments to be considered in the case of associative classes.

This sum across all domains in the system will be the SYS_MAX_RELATIONSHIP_EXTENT.