SCHEMA Simulations; TYPE Simulation_Type = ENUMERATION OF ( Simulation_Boolean, Simulation_Integer, Simulation_Double, Simulation_Random, Simulation_String, Simulation_clock, Simulation_Array_Boolean, Simulation_Array_Integer, Simulation_Array_Double, Simulation_Array_Random, Simulation_Array_String, Simulation_array_clock, Simulation_Time_Unit_Array_Boolean, Simulation_Time_Unit_Array_Integer, Simulation_Time_Unit_Array_Double, Simulation_Time_Unit_Array_String ); END_TYPE; ENTITY Simulation_Value; END_ENTITY; END_SCHEMA; SCHEMA Expressions; USE FROM Objects; USE FROM Simulations; TYPE Operator_Type = ENUMERATION OF ( Plus_Type, Minus_Type, Divide_Type, Multiply_Type, Exponential_Type, Modulo_Type, Equal_Type, Not_Equal_Type, Equal_Less_Type, Equal_Greater_Type, Inferior_Type, Superior_Type, Logic_And_Type, Logic_Or_Type, Logic_Not_Type, Min_Operator_Type, Max_Operator_type, Min_To_Index_Type, Max_To_Index_Type, Lcm_Type, Abs_Type, To_Integer_Type, To_Double_Type, Get_Resource_Index_Type, Get_Task_Index_Type, Get_Message_Index_Type, Get_Buffer_Index_Type, Concatenate_Type ); END_TYPE; TYPE Expressions_Type = ENUMERATION OF ( Constant_Type, Variable_Type, Array_Variable_Type, Binary_Type, Unary_Type, Random_Type ); END_TYPE; ENTITY Generic_Expression SUBTYPE OF ( Named_Object ); expression_type : Expressions_Type; DERIVE SELF\Generic_Object.object_type : Objects_Type := Expression_Object_Type; END_ENTITY; ENTITY Constant_Expression SUBTYPE OF ( Generic_Expression ); VALUE : Simulation_Value; DERIVE SELF\Generic_Expression.expression_type : Expressions_Type := Constant_Type; END_ENTITY; ENTITY Variable_Expression SUBTYPE OF ( Generic_Expression ); identifier : STRING; variable_type : Simulation_Type; DERIVE SELF\Generic_Expression.expression_type : Expressions_Type := Variable_Type; END_ENTITY; ENTITY Array_Variable_Expression SUBTYPE OF ( Variable_Expression ); array_index : Generic_Expression; DERIVE SELF\Variable_Expression.expression_type : Expressions_Type := Array_Variable_Type; END_ENTITY; ENTITY Binary_Expression SUBTYPE OF ( Variable_Expression ); rvalue : Generic_Expression; lvalue : Generic_Expression; operator : Operator_Type; DERIVE SELF\Variable_Expression.expression_type : Expressions_Type := Binary_Type; END_ENTITY; ENTITY Unary_Expression SUBTYPE OF ( Variable_Expression ); operator : Operator_Type; VALUE : Generic_Expression; DERIVE SELF\Variable_Expression.expression_type : Expressions_Type := Unary_Type; END_ENTITY; END_SCHEMA; SCHEMA Statements; USE FROM basic_types; USE FROM objects; USE FROM Laws; USE FROM Expressions; TYPE Statements_Type = ENUMERATION OF ( Put_Statement_Type, Nop_Statement_Type, Exit_Statement_Type, If_Statement_Type, Assign_Statement_Type, For_Statement_Type, Return_Statement_Type, While_Statement_Type, Add_Precedence_Statement_Type, Delete_Precedence_Statement_Type, Set_Statement_Type, Clock_Statement_Type, Subprogram_Statement_Type, Subprogram_Call_Statement_Type, Random_Initialize_Statement_Type ); END_TYPE; TYPE Table_Types = ENUMERATION OF ( Task_Table_Type, Message_Table_Type, Processor_Table_Type, Buffer_Table_Type, Time_Unit_Table_Type, Resource_Table_Type ); END_TYPE; ENTITY Generic_Statement SUBTYPE OF ( Generic_Object ); statement_type : Statements_Type; line_number : Natural; file_name : STRING; next_statement : Generic_Statement; DERIVE SELF\Generic_Object.object_type : Objects_Type := Statement_Object_Type; END_ENTITY; ENTITY Nop_Statement SUBTYPE OF ( Generic_Statement ); DERIVE SELF\Generic_Statement.statement_type : Statements_Type := Nop_Statement_Type; END_ENTITY; ENTITY Exit_Statement SUBTYPE OF ( Generic_Statement ); DERIVE SELF\Generic_Statement.statement_type : Statements_Type := Exit_Statement_Type; END_ENTITY; ENTITY Put_Statement SUBTYPE OF ( Generic_Statement ); put_from : Generic_Expression; put_to : Generic_Expression; expression_to_be_displayed : Generic_Expression; DERIVE SELF\Generic_Statement.statement_type : Statements_Type := Put_Statement_Type; END_ENTITY; ENTITY If_Statement SUBTYPE OF ( Generic_Statement ); bool_expression : Generic_Expression; else_statement : Generic_Statement; then_statement : Generic_Statement; DERIVE SELF\Generic_Statement.statement_type : Statements_Type := If_Statement_Type; END_ENTITY; ENTITY Assign_Statement SUBTYPE OF ( Generic_Statement ); lvalue : Generic_Expression; rvalue : Generic_Expression; DERIVE SELF\Clock_Statement.statement_type : Statements_Type := Assign_Statement_Type; END_ENTITY; ENTITY Clock_Statement SUBTYPE OF ( Assign_Statement ); DERIVE SELF\Generic_Statement.statement_type : Statements_Type := Clock_Statement_Type; END_ENTITY; ENTITY Delete_Precedence_Statement SUBTYPE OF ( Generic_Statement ); Delete_Source : STRING; Delete_Sink : STRING; DERIVE SELF\Generic_Statement.statement_type : Statements_Type := Delete_Precedence_Statement_Type; END_ENTITY; ENTITY Add_Precedence_Statement SUBTYPE OF ( Generic_Statement ); Add_Source : STRING; Add_Sink : STRING; DERIVE SELF\Generic_Statement.statement_type : Statements_Type := Add_Precedence_Statement_Type; END_ENTITY; ENTITY For_Statement SUBTYPE OF ( Generic_Statement ); for_type : Table_Types; included_statement : Generic_Statement; for_index : Variable_Expression; DERIVE SELF\Generic_Statement.statement_type : Statements_Type := For_Statement_Type; END_ENTITY; ENTITY Return_Statement SUBTYPE OF ( Generic_Statement ); return_value : Generic_Expression; DERIVE SELF\Generic_Statement.statement_type : Statements_Type := Return_Statement_Type; END_ENTITY; ENTITY While_Statement SUBTYPE OF ( Generic_Statement ); included_statement : Generic_Statement; condition : Generic_Expression; DERIVE SELF\Generic_Statement.statement_type : Statements_Type := While_Statement_Type; END_ENTITY; ENTITY Random_Initialize_Statement SUBTYPE OF ( Generic_Statement ); lvalue : STRING; law : Laws_Type; parameter1 : Generic_Expression; parameter2 : Generic_Expression; DERIVE SELF\Generic_Statement.statement_type : Statements_Type := Random_Initialize_Statement_Type; END_ENTITY; ENTITY Set_Statement SUBTYPE OF ( Generic_Statement ); set_id : STRING; set_value : Generic_Expression; DERIVE SELF\Generic_Statement.statement_type : Statements_Type := Set_Statement_Type; END_ENTITY; ENTITY Subprogram_Statement SUBTYPE OF ( Generic_Statement ); included_statement : Generic_Statement; is_a_function : BOOLEAN; subprogram_name : STRING; DERIVE SELF\Generic_Statement.statement_type : Statements_Type := Subprogram_Statement_Type; END_ENTITY; ENTITY Subprogram_Call_Statement SUBTYPE OF ( Generic_Statement ); is_a_function : BOOLEAN; called_subprogram : Generic_Statement; return_value : Generic_Expression; DERIVE SELF\Generic_Statement.statement_type : Statements_Type := Subprogram_Call_Statement_Type; END_ENTITY; END_SCHEMA; SCHEMA Interpreter; USE FROM Basic_Types; USE FROM Statements; TYPE Section_Table = LIST OF Generic_Statement; END_TYPE; TYPE Sets_Table_Type = LIST OF Set_Statement; END_TYPE; TYPE Sets_Range = Range; END_TYPE; ENTITY Sets_Type_Package; table_range : Sets_Range; table : Sets_Table_Type; END_ENTITY; END_SCHEMA; SCHEMA Automaton; USE FROM basic_types; USE FROM objects; USE FROM Statements; USE FROM Expressions; TYPE State_Lists = LIST OF State; END_TYPE; TYPE State_Lists_Iterator = Iterator; END_TYPE; TYPE Synchronizations_Type = ENUMERATION OF ( Send, Receive ); END_TYPE; TYPE Transition_Lists = LIST OF Transition; END_TYPE; TYPE Transition_Lists_Iterator = Iterator; END_TYPE; (*"Status_Type" * Stores the state of a transition : * Ready - the transition can be fired ; * pended - the transition is delayed due to a clock synchronization ; * guarded - the transition is blocked due to a guard * rendezvous - the transition waits for a rendezvous ; * unreachable - no automaton is ready to fire the automaton *) TYPE Status_Type = ENUMERATION OF ( Ready, Pended, Rendezvous, Guarded, Unreachable ); END_TYPE; TYPE Automaton_Status_Table = LIST OF Automaton_Status; END_TYPE; TYPE Automaton_Status_Range = Range; END_TYPE; TYPE Transition_Status_Table = LIST OF Transition_Status; END_TYPE; TYPE Transition_Status_Range = Range; END_TYPE; ENTITY State SUBTYPE OF ( Named_Object ); is_initial : BOOLEAN; DERIVE SELF\Generic_Object.object_type : Objects_Type := State_Object_Type; END_ENTITY; ENTITY State_Lists_Package; list_ : State_Lists; iterator : State_Lists_Iterator; END_ENTITY; ENTITY Synchronization SUBTYPE OF ( Named_Object ); synchronization_type : Synchronizations_Type; DERIVE SELF\Generic_Object.object_type : Objects_Type := Synchronization_Object_Type; END_ENTITY; ENTITY Transition SUBTYPE OF ( Named_Object ); from_state : State; to_state : State; guards : Generic_Expression; clocks : Generic_Statement; synchronization : Synchronization; DERIVE SELF\Generic_Object.object_type : Objects_Type := Transition_Object_Type; END_ENTITY; ENTITY Transition_Lists_Package; list_ : Transition_Lists; iterator : Transition_Lists_Iterator; END_ENTITY; ENTITY Automaton_Status; current_state : State; END_ENTITY; ENTITY Package_Automaton_Status; indexed_table : Automaton_Status_Table; indexed_table_range : Automaton_Status_Range; END_ENTITY; ENTITY Transition_Status; code : Transition; status : Status_Type; wakeup_time : Natural; END_ENTITY; ENTITY Package_Transition_Status; indexed_table : Transition_Status_Table; indexed_table_range : Transition_Status_Range; END_ENTITY; END_SCHEMA; SCHEMA Sections; USE FROM objects; USE FROM Statements; USE FROM Automaton; TYPE Sections_Type = ENUMERATION OF ( Automaton_Type, Start_Type, Priority_Type, Election_Type, Activation_Type, Check_Resource_Type, Allocate_Resource_Type, Release_Resource_Type, Gather_Event_Analyzer_Type, Display_Event_Analyzer_Type ); END_TYPE; ENTITY Generic_Section SUBTYPE OF ( Named_Object ); section_type : Sections_Type; file_name : STRING; DERIVE SELF\Generic_Object.object_type : Objects_Type := Section_Object_Type; END_ENTITY; ENTITY Computation_Section SUBTYPE OF ( Generic_Section ); first_statement : Generic_Statement; END_ENTITY; ENTITY Synchronization_Section SUBTYPE OF ( Generic_Section ); state_list : State_Lists; transition_list : Transition_Lists; END_ENTITY; END_SCHEMA;