The various charts of the model are saved as text files in the chart directory of the databank.
The format of the chart-file is as described:
First 2 lines are :
chart-file format version 4.6
-- Statemate version 4.6.1
● Chart file records format - This section decribes the exact format of all kinds of records that may be found in a chart file. The following conventions are used in this section:
Optional fields are enclosed in square brackets [..].
● Multiple fields (fields that may appear more than once in a record) are enclosed in {..}. These fields are always optional.
● An item enclosed in <..> describes the type of the information that appears at that place. The values of these items appear at the end of the document in a dictionary.The following record describes the subject chart:
created : <time> -- <ASCII_time>
modified : <time> -- <ASCII_time>
{parameter : <parameter_name> <parameter_type> <parameter_mode>} -- for
data_structure : <data_structure>
end local_data} -- Procedural Statecharts only
[short description: <short_des>]
[external_file : <external_file_path>]
end design_attribute resources}
[scope : <activitychart_name>] -- For Sequence Diagrams
Note: Only one such record should appear in a chart file.
The following record describes an activity or a data-store defined in the
name : <STM_formatted_name> | ACTIVITY#<id_number>
-- used only for unnamed boxes
[is : <chart_name> <instance_type>] -- for instance boxes only
{binding : <parameter_name> <parameter_type> <parameter_expression>}
[parent : <activity_name>] -- missing only when diagram or error-hook
[short description: <short_des>]
[external_file : <external_file_path>]
[external_desc : <external_desc_name>]
[external_desc_version : <version> <time>]
[termination : <termination_type>]
[is activity : <box_name>] -- activity or data-store name,
-- used also for "is data-store"
[implemented by : <unique_name>] -- module name, used also
assignment: <combinatorial_assignement_expression>
assignment position: <position>
end design_attribute resources}
<position>] -- position is in the activity borders
[graphics coordinates : -- missing in ERROR-HOOK, ENVIRONMENT,EXTERNAL
<position> -- ordered in circle,
<position> -- must create right angles
{<position>}] -- when polygon has more than 4 edges
[callback bindings : <enable_disable>
[user-code bindings : <enable_disable>
selected implementation : <activity_selected_implementation>
{<activitychart_name>:<activity_name> | <activitychart_name>}
{<statechart_name>:<state_name> | <statechart_name>}
Notes: o The data-store is considered as a type of an activity.
o This record appears only in an activity-chart file.
o Two activity records are mandatory in an activity-chart file:
(a) Activity named ACTIVITY#0 of type DIAGRAM. The relevant fields
in this case are name, type, and graphic coordinates that
(b) Activity named ACTIVITY#1 of type ERROR_HOOK. The relevant
fields in this case are name and type. This box is used by
the AGE to deal with erroneous graphical elements.
o The parent of top-level activities and external activities is:
"<chart_name>:" (see dictionary below).
The following record describes a state defined in the subject chart:
name : <STM_formatted_name> | STATE#<id_number>
-- used only for unnamed boxes
[is : <chart_name> <instance_type>] -- for instance boxes only
{binding : <parameter_name> <parameter_type> <parameter_expression>}
[parent : <state_name>] -- missing only when DIAGRAM or ERROR-HOOK
[short description: <short_des>]
[external_file : <external_file_path>]
{active : <activity_name> [<active_type>]} -- activity_name = STM_name
assignment: <combinatorial_assignement_expression>
assignment position: <position>
end design_attribute resources}
<position>] -- position is in the activity borders
[graphics coordinates : -- missing when error-hook
<position> -- ordered in circle,
<position> -- must create right angles
{<position>}] -- when polygon has more than 4 edges
<position> -- must start and end on state borders
<position> -- must create 90-degree angles
[callback bindings : <enable_disable>
Notes: o Two state records are mandatory in a statechart file:
(a) State named STATE#0 of type DIAGRAM. The relevant fields in
this case are name, type, and graphic coordinates that
(b) State named STATE#1 of type ERROR_HOOK. The relevant fields in
this case are name and type. This box is used by the SGE to
deal with erroneous graphical elements.
o The parent of top level state is "<chart_name>:" (see dictionary
The following record describes a module defined in the subject chart:
name : <STM_formatted_name> | MODULE#<id_number>
-- used only for unnamed boxes
[is : <chart_name> <instance_type>] -- for instance boxes only
{binding : <parameter_name> <parameter_type> <parameter_expression>}
[described by: <chart_name>] -- describing activity-chart
[parent : <module_name>] -- missing only when DIAGRAM or ERROR-HOOK
[short description: <short_des>]
[external_file : <external_file_path>]
[purpose type : <module_purpose_type>]
end design_attribute resources}
[graphics coordinates : -- missing in ERROR-HOOK, ENVIRONMENT, EXTERNAL
<position> -- ordered in circle
<position> -- must create 90-degree angles
{<position>}] -- when polygon has more than 4 edges
Notes: o Two module records are mandatory in a module-chart file:
(a) Module named MODULE#0 of type DIAGRAM. The relevant fields in
this case are name, type, and graphic coordinates that
(b) Module named MODULE#1 of type ERROR_HOOK. The relevant fields in
this case are name and type. This box is used by the MGE to deal
with erroneous graphical elements.
o Environment module is treated as module occurrence of a module
without graphics of type ENVIRONMENT. All environment modules that
have the same name are considered as occurrences of the same
module, which has a unique form.
Therefore, for each group of environment modules with the same name
there is one module record of type ENVIRONMENT, that has no
graphical description and contains all the information appearing
o The parent of top level regular module and environment module is:
"<chart_name>:" (see dictionary below).
The following record describes a module occurrence which is relevant only
in module-chart files. Such record must appear for each module occurrence
of an environmentor or external module appearing in the module-chart.
name : MODULE_OCCURRENCE#<id_number>
module : <module_name> -- the name of the "source" module
name position : <position> -- must be inside the module borders
<position> -- ordered in circle
<position> -- must create 90-degree angles
{<position>} -- when polygon has more than 4 edges
The following record describes a activity occurrence which is relevant only
in activity-chart files. Such record must appear for each activity
occurrence of an environmentor or external activity appearing in the
name : ACTIVITY_OCCURRENCE#<id_number>
activity : <activity_name> -- the name of the "source" activity
name position : <position> -- must be inside the activity borders
<position> -- ordered in circle
<position> -- must create 90-degree angles
{<position>} -- when polygon has more than 4 edges
The following record describes a data-item defined in the subject chart:
usage_type : <data_item_usage>
[short description: <short_des>]
[external_file : <external_file_path>]
[definition : -- mandatory for compound/alias/constant
end design_attribute resources}
[callback bindings : <enable_disable>
8. Data-type (user defined type)
The following record describes a data-type (user defined type) defined
[short description: <short_des>]
[external_file : <external_file_path>]
[definition : -- for enumerated types only.
end design_attribute resources}
The following record describes an event defined in the subject chart:
end lindex] -- relevant only for arrays
end rindex] -- relevant only for arrays
[short description: <short_des>]
[external_file : <external_file_path>]
end design_attribute resources}
[callback bindings : <enable_disable>
The following record describes a condition defined in the subject chart:
usage_type : <data_item_usage>
[data_type : <condition_type>]
end lindex] -- relevant only for arrays
end rindex] -- relevant only for arrays
[short description: <short_des>]
[external_file : <external_file_path>]
end design_attribute resources}
[callback bindings : <enable_disable>
The following record describes an information-flow defined in the subject
[short description: <short_des>]
[external_file : <external_file_path>]
{consists : <information_flow_name> | <data_item_name> |
<condition_name> | <event_name>}
end design_attribute resources}
The following record describes an action defined in the subject chart:
[short description: <short_des>]
[external_file : <external_file_path>]
selected implementation : <action_selected_implementation>
The following record describes an arrow drawn in the subject chart
(using the corresponding graphics editor). This record is used for
the three types of arrows: transitions in statechart, a-flow-lines
(data-flow and control-flow ) in activity-chart and m-flow-lines
source : <source_target> <source_type> [<src_tgt_port>]
target : <source_target> <target_type> [<src_tgt_port>]
label font : <font-definition>
graphics coordinates : -- the control points of the arrow
<position> -- they must be consistent with the source
<position> -- and target information above
angles : <cos> <sin> -- of the arrow angle in its target
<cos> <sin> -- of the arrow angle in its source
The following record describes a connector drawn in the subject chart
(using the corresponding graphics editor). This record is used for
connectors in three types of charts.
type : <connector_type> ['<connector_label>'] -- label when DIAGRAM
parent : <connector_parent> -- the box in which the connector resides
The following record describes a note drawn in the subject chart :
[graphics coordinates : -- missing when no attached arrow
{<position>}] -- any number of points are allowed
The following record describes a block defined in the subject block-diagram
name : <STM_formatted_name> | BLOCK#<id_number>
-- used only for unnamed boxes
[is : <chart_name> <instance_type>] -- for instance boxes only
{binding : <parameter_name> <parameter_type> <parameter_expression>}
[parent : <block_name>] -- missing only when diagram or error-hook
[short description: <short_des>]
[external_file : <external_file_path>]
[termination : <termination_type>]
assignment: <combinatorial_assignement_expression>
assignment position: <position>
end design_attribute resources}
<position>] -- position is in the activity borders
[graphics coordinates : -- missing in ERROR-HOOK, ENVIRONMENT,EXTERNAL
<position> -- ordered in circle,
<position> -- must create right angles
{<position>}] -- when polygon has more than 4 edges
[user-code bindings : <enable_disable>
Notes: o This record appears only in a block-diagram chart file.
o Two block records are mandatory in a block-diagram chart file:
(a) Block named BLOCK#0 of type DIAGRAM. The relevant fields
in this case are name, type, and graphic coordinates that
(b) Block named BLOCK#1 of type ERROR_HOOK. The relevant
fields in this case are name and type. This box is used by
the BGE to deal with erroneous graphical elements.
o The parent of top-level blocks and external blocks is:
"<chart_name>:" (see dictionary below).
The following record describes a subroutine defined in the subject chart:
usage_type : <subroutine_usage>
[return_type : <data_basic_type>]
[short description: <short_des>]
[external_file : <external_file_path>]
end design_attribute resources}
data_structure : <data_structure>
data_structure : <data_structure>
{global_data : <name> <port-mode>}
selected implementation : <selected_implementation>
The following record describes a Truth-table defined in the subject chart:
dimensions : (<integer>,<integer>,<integer>,<integer>)
-- # of rows, # of columns, # of inputs, # of outputs
execution mode : <execution_mode>
[factorized : <cell_factorization>]
This section describes each identifier used in the above section. When there
are several values for the identifier we list these values are separated
by "|". Optional parts are surrounded by square brackets "[]".
Curled parenthesis "{}" denote zero or more iterations of their contents.
<ASCII_time> => String with the time represented by <time>
<action_expression_body> => unlimited number of lines (each at most 2000
characters long) denoting an action (see STATEMATE syntax)
<activity_name> => <box_name> | ACTIVITY#<id_number>
The second option is used only for unnamed activities defined in the
chart by using their ID number
<activity_type> => DIAGRAM | ERROR_HOOK | INTERNAL | EXTERNAL | ENVIRONMENT |
CONTROL | DATA_STORE | ROUTER | EXTERNAL_ROUTER
<a_flow_line_source_target> => <activity_name> | <connector_name>
<a_flow_line_type> => DATA_FLOW | CONTROL_FLOW
<alignment> => <x_alignment> <y_alignment>
<arrow_type> => TRANSITION | M_FLOW_LINE | <b_flow_line_type> |
<a_flow_line_type> | <relation_type> | <seq_diagram_type>
<arrow_style> => SPLINE | STRAIGHT | RECTILINEAR | ROUNDED
<b_flow_line_type> => SIGNAL | BUS
<relation_type> => ASSOCIATION | EXTEND_RELATION | INCLUDE_RELATION | GENERELIZE_RELATION
seq_diagram_type> => SIMPLE_MESSAGE | TIMING_CONSTRAINT | ORDER_INSIGNIFICANT | PARTITION_LINE
bg-color-name> => <color-name>
<block_name> => <box_name> | BLOCK#<id_number>
The second option is used only for unnamed blocks defined in the
chart by using their ID number
<block_type> => DIAGRAM | ERROR_HOOK | INTERNAL | EXTERNAL | ENVIRONMENT |
<box_name> => [.]{<STM_name>.}<STM_name>
It is used when a unique name of a box within the chart is required.
It optionally contains the ancestors names of the box. The leading dot
"." is used only before the top level box name.
<callback_binding_expression> => unlimited number of lines (each at most 2000
characters long) denoting callback bindings. (see STATEMATE syntax)
<chart_name> => <STM_name> appears in the file as the name of a chart
<chart_type> => ACTIVITY_CHART | STATECHART | MODULE_CHART | DICTIONARY |
FLOWCHART | SEQUENCE_DIAGRAM | USE_CASE_DIAGRAM
<chart_usage_type> => REGULAR | GENERIC | PROCEDURAL | COMPONENT | PRIVATE
<code_binding_expression> => unlimited number of lines (each at most 2000
characters long) denoting code bindings. (see STATEMATE syntax)
<color> => <color-name> <bg-color-name> <on_off>
<combinatorial_assignement_expression> => unlimited number of lines
(each at most 2000 characters long) denoting combinational assignment
<condition_expression_body> => unlimited number of lines (each at most 2000
characters long) denoting condition (see STATEMATE syntax)
<condition_name> => <STM_name> appears in the file as the name of a condition
<condition_type> => ARRAY - appears only for array of conditions
<connector_name> => CONNECTOR#<id_number>
<connector_parent> => <activity_name> | <module_name> | <state_name>
The option depends on the subject chart type.
<connector_type> => DIAGRAM | DEFAULT | HISTORY | DEEP_HISTORY | CONDITION |
SELECTION | JUNCTION | JOINT | TERMINATION | CONTROL | COMPOSITION
<constant_identifier> => <STM_name> -- data-item defined somewhere as constant
<coordinate> => real number with precision up to 12 decimal digits,
principally there is no lower or upper bound. In STATEMATE graphics
editors the default initial dimensions of a chart are 25 X 19.2
where (0,0) is the lower left corner.
<cos> => Cosine of an angle, real number with precision up to 12 decimal
<data_item_expression_body> => unlimited number of lines (each at most 2000
characters long) denoting a numeric expression (see STATEMATE syntax)
<data_item_name> => <STM_name> appears in the file as the name of a data_item
<data_type_name> => <STM_name> appears in the file as the name of a data_type
<data_item_usage> => PRIMITIVE | CONSTANT | COMPOUND | ALIAS
<data_basic_type> => INTEGER | REAL | STRING | BIT | BIT-ARRAY | CONDITION |
<data_structure> => SINGLE | ARRAY | QUEUE
<dt_basic_type> => <data_basic_type> | ENUMERATED_TYPE
<enable_disable> => ENABLE | DISABLE
<enumerated_type_definition> => unlimited number of lines (each at most 2000
characters long) denoting a definition of enumerated type. (see STATEMATE
<event_expression_body> => unlimited number of lines (each at most 2000
characters long) denoting event (see STATEMATE syntax)
<event_name> => <STM_name> appears in the file as the name of an event
<event_type> => ARRAY - appears only for array of events
<explicit-port> => PORT: <port-name>
<font-definition> => <font-family> <font-size> [BOLD] [ITALIC]
<font-family> => Fixed | Courier | Helvetica | Times | LucidaTypewriter
<flow_line_label> => <information_flow_name> | <event_name> |
<condition_name> | <data_item_name>
<free_text> => Free text spanning multiple lines
<gds_names> => GDS names and/or "<All-Public-GDS>"
<information_flow_name> => <STM_name> appears in the file as the name of an
<implicit-port> => IMPLICIT PORT: <port-mode>
<instance_type> => OFFPAGE | GENERIC | COMPONENT
<integer> => <integer_value> | <constant_identifier>
<integer_value> => integer number (negative, zero, or positive)
<is_activity_box_name> => <box_name> | <chart_name> > <box_name>
<label> => <transition_label> | <flow_line_label>
<m_flow_line_type> => DATA_FLOW | CONTROL_FLOW
<m_flow_line_source_target> => <module_name> | <module_occurrence_name> |
<mini_spec_body> => unlimited number of lines of in the format of labels
(i.e. trigger/action) or action (i.e action) . Any of the trigger or
action parts may span several lines.
<module_name> => <box_name> | MODULE#<id_number>
The second option is used only for unnamed modules defined in the chart
<module_occurrence_name> => MODULE_OCCURRENCE#<id_number>
<module_purpose_type> => REGULAR | STORAGE | CONTROLLER | LIBRARY | BUS
<module_type> => DIAGRAM | ERROR_HOOK | SUBSYSTEM | ENVIRONMENT | EXTERNAL
<note_type> => TEXTUAL | GRAPHICAL | SEPARATOR | MESSAGE | TM_CONSTRAINT | TR_PRIORITY
<parameter_expression> => constant literal | <STM_name> |
<specific_array_element> | <specific_array_slice>
<parameter_name> => <STM_name>
<parameter_mode> => IN | OUT | IN/OUT | CONSTANT |
IN_SIGNAL | IN_VARIABLE | IN_CONSTANT |
OUT_SIGNAL | OUT_VARIABLE | BUFFER |
IN/OUT_SIGNAL | IN/OUT_VARIABLE
<parameter_type> => DATA_ITEM | EVENT | CONDITION | ACTIVITY
<port-mode> => IN | OUT | INOUT
<position> => <coordinate> <coordinate> -- x position, y position
<selected_implementation> => BEST_MATCH | ACTION_LANGUAGE |
GRAPHICAL_PROCEDURE | TRUTH_TABLE |
C_CODE | ANSI_C_CODE | ADA_CODE |
VHDL_CODE | VERILOG_CODE | LOOKUP_TABLE |
<short_des> => String of at most 80 characters enclosed in ' '.
Notice that no new-line symbol is allowed in string, therefore the field
of description in the file must be included in one line.
<sin> => Sine of an angle, real number with precision up to 12 decimal digits
<source_target> => <transition_source_target> | <a_flow_line_source_target> |
The option depends on the subject chart type.
<source_type> => from | within
"from" is when the arrow starts at the box border.
"within" is when it exits from within the box and is not connected to
<specific_array_element> => <STM_name>(<integer>)
<specific_array_slice> => <STM_name>(<integer>..<integer>)
<src_tgt_port> => <implicit-port> | <explicit-port>
<state_name> => <box_name> | STATE#<id_number>
The second option is used only for unnamed states defined in the chart
<state_type> => DIAGRAM | ERROR_HOOK | AND | OR
<static_reaction_body> => unlimited number of lines of in the format of labels
(i.e. trigger/action). Any of the trigger or action parts may span
<STM_formatted_name> => This is a (simple) name of STATEMATE box elements.
It consists of at most 64 characters : A-Z, 0-9, _ , starting with a
letter, but in addition, a newline (2 characters - "\n") may appers
between any letter or a number of letters. The newlines define the
format of the multi-line names displayed in the graphics editors.
<STM_name> => This is a (simple) name of STATEMATE elements. It consists of
at most 64 characters : A-Z, 0-9, _ , starting with a letter.
<STM_short_name> => This is an identifier used for synonyms and attribue
names. It consist of at most 16 characters: A-Z, 0-9, starting with
<subroutine_expression_body> => unlimited number of lines (each at most 2000
characters long) denoting a procedure / function (see STATEMATE syntax)
<subroutine_usage> => TASK | PROCEDURE | FUNCTION
"to" is when the arrow ends at the box border.
"into" is when it enters into the box and is not connected to any box
<termination_type> => SELF_TERMINATION | CONTROLLED_TERMINATION
<transition_label> => [<event_expression>][/ <action_expression>]
<transition_source_target> => <state_name> | <connector_name>
<time> => Integer number representing a time of last update of any field
of the requirement. The time integer is according to the internal system
data_structure: <data_structure>
[data_type: <data_basic_type> | <dt_basic_type>] -- relevant for udt.
end lindex] -- relevant only for arrays
end rindex] -- relevant only for arrays
[length : <integer>] -- relevant only for integers, strings
[left bit : <integer>] -- relevant only for bit-arrays
[right bit : <integer>] -- relevant only for bit-arrays
end min value] -- relevant only for integers/real
end max value] -- relevant only for integers/real
{field: <STM_name> -- relevant only for record/union
data_structure: <data_structure>
end lindex] -- relevant only for arrays
end rindex] -- relevant only for arrays
[length : <integer>] -- relevant only for integers, strings
[left bit : <integer>] -- relevant only for bit-arrays
[right bit : <integer>] -- relevant only for bit-arrays
end min value] -- relevant only for integers/real
end max value] -- relevant only for integers/real
[initial {value | definition} : <initial_value>]
[short description: <short_des>]
[external_file : <external_file_path>]
end design_attribute resources}
<unique_name> => [<chart_name>:]<box_name>
This name is used to reference boxes in other charts.
<user_name> => System user identifier
<x_alignment> => Left | Center | Right
<y_alignment> => ExtremeBottom | Bottom | Center | Top | ExtremeTop
<matrix_resources_body> => <free_text>
<cell_type> => REGULAR | EMPTY | DONT_CARE | GENERATE_EVENT |
<cell_expression_body> => unlimited number of lines (each at most 2000
characters long) denoting an expression (see STATEMATE syntax)
<cell_factorization> => UP | DOWN | UP_DOWN
<activity_selected_implementation> => MINI_SPEC | SUBROUTINE_BINDING |
TRUTH_TABLE | BEST_MATCH | NONE
<action_selected_implementation> => DEFINITION | TRUTH_TABLE
<execution_mode> => EVERY_STEP | INPUT_CHANGES | NONE
<box_mode> => ACTION | INSTANCE | DECISION | SWITCH | EXTERNAL | INTERNAL |
TRANSPARENT | NON_TRANSPARENT | NONE