EBNF OF COSEML Version 1.0







is defined to be




end of production


0 or 1 instance of X


0 or more  instances of X


a grouping: either X or Y


the terminal symbol XYZ


Alphabetic order



         ascii_string ::==  Any_String_of_ASCII_Characters.

              comment ::==  ";" ascii_string.

         Component ::==  “COMPONENT” id

                                       “INTERFACES” id_list

                                       ["COMPONENTS" module_id_list].

    condition_exp ::==  ascii_string.

            connector ::==  "CONNECTOR" id

                                       ["PORT-1" id]

                                       ["PORT-2" id]

                                       ["COMPONENTS" module_id_list].

connector_desc ::==  ascii_string.

constraint_desc ::==  ascii_string.

control_abstraction ::== "CONTROL-ABSTRACTION" id

                                       "INITIAL-STATE" id

                                       ["STATES" id_list]

                                       ["CONTROL-DESC" desc]

                                       ["EXCEPTIONS" id_list]

                                       ["CONNECTORS" id_list]

                                       [“REPRESENTS” module_id_list].

data_abstraction ::==  "DATA-ABSTRACTION" id

                                       "FORMAT" format_desc

                                       ["CONSTRAINT" desc]

                                       ["STORAGE" storage_desc]


                                       ["METHODS" id_list]

                                       ["UNIT" desc]

                                       ["ACCURACY" desc]

                                       ["CONNECTORS" id_list]

                                       ["COMPONENTS" module_id_list]

                                       [“REPRESENTS” module_id_list].

    data_similarity ::==  similarity.

                     desc ::==  ascii_string.

                      digit ::==  0|1|2|3|4|5|6|7|8|9.

event_cond_exp ::==  "IF" expression "THEN" event_term

                                       ["ELSE" event_cond_exp]| event_term.

           event_exp ::==  event_exp "OR" event_term

                                       |event_term "XOR" event_term


                    event ::==  "EVENT" id

                                       ["ORIGIN" id "FEATURE" feature_desc]

                                       ["FORMAT" format_desc]

                                       ["CONSTRAINT" constraint_desc]

                                       ["ACCURACY" accuracy_desc].

          event_term ::==  event_term "AND" id|id.

             exception ::==  "EXCEPTION" id



                                       "PRECONDITION" except_condition

                                       ["ACTIVE" state_term]

                                       ["MESSAGE" event_cond_exp["("id","id")"]].

except_condition ::== condition_exp |(simple_event_exp | event_term) ["PREEMPT"].

  exception_desc ::==  ascii_string.

except_similarity_spec ::==  [similarity_desc] except_similarity.

           expression ::==  ascii_string.

       feature_desc ::==  "PERIODIC" [frequency] | "SPORADIC".

        format_desc ::==  ascii_string.

            frequency ::==  "CONTINUOUS" [time_spec] | "PULSE" [time_spec].

function_abstraction ::==     "FUNCTION-ABSTRACTION" id

                                       "INPUT" id_list

                                       "OUTPUT" id_list

                                       ["PRECONDITION" condition_exp]

                                       ["EFFECT" expression]

                                       ["SPEC" function_desc]


                                       ["EXCEPTIONS" id_list]

                                       ["CONNECTORS" id_list]

                                       ["COMPONENTS" module_id_list]

                                       [“REPRESENTS” module_id_list].

    function_desc ::==  ascii_string.

   func_similarity ::==  similarity.

func_similarity_spec ::==     [similarity_desc] func_similarity.

                          id ::==  letter{("_"|letter_or_digit)}.

                   id_list ::==  id{ id}.

                 integer ::==  digit{digit}.

              interface ::==  “INTERFACE” id

                                       [“PROPERTIES” property_list]

                                    “METHODS-IN” method_list

                                    [“METHODS-OUT” method_list]

                                    [“EVENTS-IN” event_list]

                                    [“EVENTS-OUT” event_list].

                     letter ::==  A|...|Z|a|...|z.

    letter_or_digit ::==  letter|digit.

                method ::==  "METHOD" id

                                       "RETURN" data_cond_exp

                                       ["OPERAND" id_list]

                                       ["PRECONDITION" condition_exp]

                                       ["EFFECT" expression]

                                       ["OPERATION" op_desc]


                                       ["EXCEPTIONS" id_list].

                 module ::==  non_primitive|primitive.

           module_id ::==  id.

   module_id_list ::==  module_id{ module_id}.

     non_primitive ::==  package|data_abstraction|function_abstraction|control_abstraction|connector.

                number ::==  integer|real_number.

              op_desc ::==  ascii_string.

       op_similarity ::==  similarity.

op_similarity_spec ::==  [similarity_desc] op_similarity.

               package ::==  "PACKAGE" id

                                       "COMPONENTS" module_id_list


                                       [“CONNECTORS” id_list]

                                       [“REPRESENTS” module_id_list].

package_similarity ::==   similarity.

              primitive ::==  component |interface.

        real_number ::==  Any_String_of_Digit_With_a_Single_Embedded_Period.

              similarity ::==  "SAME-AS" id | "INSTANCE-OF" id | "INHERITS-FROM" id.

   similarity_desc ::==  desc.

simple_event_exp ::==    simple_event_exp "OR" id | id.

                     state ::==  "STATE" id

                                       ["TRANSACTIONS" id_list].

             state_exp ::==  "IF" expression "THEN" id ["ELSE" state_exp | id].

           state_term ::==  id | "SELF" | "CONTINUE".

      storage_desc ::==  "STREAM"|"BLOCK" integer|"SINGLE"|"SEQUENCE"|"LINKED".

            time_spec ::==  ["MAX-TIME"] number.

          transaction ::==  "TRANSACTION" id

                                       ["EVENTS" event_exp]

                                       ["SERVICE" id]

                                       "SERVICE-TIME" time_spec

                                       ["INITIAL" id_list "INITIAL-TIME" time_spec]

                                       ["MESSAGE" event_cond_exp ["("id"," id")"] "MESSAGE-TIME" time_spec]

                                       "NEXT-STATE" state_exp.

;----end of COSEML -----      

__________________________________  notes  _______________________________

Comments are transparent, they can appear anywhere.

Blanks are not transparent.