Function type:
LIST OF ELEMENT
Extracts elements of the specified type from the given list of Statemate elements.
Input/Outputelement_type
is one of the possible values of the enumerated typestm_element_type
. The values of this type usually take the formstm_element_type
(for example,stm_state
,stm_event
, and so on). Suppose you want to extract a list of all the activities appearing in a list of Statemate elements. The input list is assigned to the variableelmnt_list
. Your template should contain the following statements:VARIABLE
ACTIVITY act;
LIST OF ACTIVITY act_list;
LIST OF ELEMENT elmnt_list;
INTEGER status;
.
.
.
act_list := stm_list_extraction_by_type (stm_activity,
elmnt_list, status);
WRITE (’\n The activities in the list are:’);
FOR act IN act_list LOOP
WRITE (’\n’, stm_r_ac_name (act, status));
END LOOP;
.
.
.The names of all the activities inelmnt_list
are written to your document.