type package =
{ pack_id: Ident.t;
pack_public: aadl_declaration list;
pack_public_prop: property list;
pack_private: aadl_declaration list;
pack_private_prop: property list;
}
and aadl_declaration =
| Component of component
| Port_group of port_group
and component =
{ comp_id: Ident.t;
comp_kind: component_kind;
comp_cate: category;
comp_extd: Ident.t option;
comp_feat: feature list;
comp_fref: feature_refinement list;
comp_subc: subcomponent list;
comp_call: call_sequence list;
comp_conn: connection list;
comp_flow: flow list;
comp_mode: mode list;
comp_prop: property list;
comp_annx: annex list;
comp_normalize: bool;
}
and port_group =
{ portgrp_id: Ident.t;
portgrp_extd: Ident.t option;
portgrp_feat: feature list;
portgrp_fref: feature_refinement list;
portgrp_inve: Ident.t option;
portgrp_prop: property list;
portgrp_annx: annex list;
portgrp_normalize: bool;
}
and component_kind = Type | Implementation
and category =
| Data | Subprogram | Thread | Thread_group | Process
| Processor | Memory | Bus | Device
| System
and feature =
Ident.t * feature_kind * property_association list
and feature_kind =
| Feat_data_port of in_out_flag * classifier_reference option
| Feat_event_data_port of in_out_flag * classifier_reference option
| Feat_event_port of in_out_flag
| Feat_port_group of unique_port_group_type_reference option
| Feat_server_subprogram_spec of unique_subprogram_reference option
| Feat_data_subprogram_spec of classifier_reference option
| Feat_subcomponent_access of access_kind * category * Ident.t option
| Feat_parameter of in_out_flag * classifier_reference option
and in_out_flag = In | Out | In_Out
and unique_port_group_type_reference = Ident.t
and classifier_reference = Ident.t
and unique_subprogram_reference = Ident.t
and access_kind = Provided | Required
and feature_refinement
and subcomponent =
Ident.t *
category *
classifier_reference option *
property_association list
and call_sequence =
Ident.t option
* (Ident.t * Ident.t * property_association list) list
and connection =
Ident.t option * connection_kind *
Ident.t * connection_arrow * Ident.t *
property_association list
and connection_kind =
| Conn_data_port
| Conn_event_port
| Conn_event_data_port
| Conn_port_group
| Conn_parameter
| Conn_bus_access
| Conn_data_access
and connection_arrow =
| Conn_arrow
| Conn_delayed_arrow
and flow =
FlowSpec of Ident.t * flow_kind * property_association list
| FlowImpl of Ident.t * flow_impl_kind
and flow_kind =
| Flow_source of Ident.t
| Flow_sink of Ident.t
| Flow_path of Ident.t * Ident.t
| Flow_refined_source
| Flow_refined_sink
| Flow_refined_path
and flow_impl_kind =
| FlowImpl_source of Ident.t list * Ident.t
| FlowImpl_sink of Ident.t * Ident.t list
| FlowImpl_path of Ident.t list * Ident.t * Ident.t * Ident.t list
| FlowImpl_refined_source
| FlowImpl_refined_sink
| FlowImpl_refined_path
and mode
and property = property_association
and property_association =
Ident.t * property_arrow
* property_value *
(Ident.t )
option
and property_arrow = Prop_arrow | Prop_plus_arrow
and property_value = property_expression list
and property_expression =
| Prop_expr_immediate of immediate_expression
| Prop_expr_integer_range of
aadl_intger_or_constant * aadl_intger_or_constant * int option
| Prop_expr_real_range of
aadl_real_or_constant * aadl_real_or_constant * float option
| Prop_expr_enumeration of Ident.t
| Prop_expr_property_term of Ident.t
| Prop_expr_component_classifier_term of category * Ident.t
| Prop_expr_reference_term of Ident.t
and immediate =
| Imm_bool of bool
| Imm_int of aadl_intger_or_constant
| Imm_real of aadl_real_or_constant
| Imm_string of string
and immediate_expression =
| Imm_const of immediate
| Imm_op1 of string * immediate_expression
| Imm_op2 of string * immediate_expression * immediate_expression
and aadl_intger_or_constant =
| Int of int * Ident.t option
| Int_const of Ident.t
and aadl_real_or_constant =
| Real of float * Ident.t option
| Real_const of Ident.t
and annex
let category_to_string = function
| Data -> "Data"
| Subprogram -> "Subprogram"
| Thread -> "Thread"
| Thread_group -> "Thread_group"
| Process -> "Process"
| Processor -> "Processor"
| Memory -> "Memory"
| Bus -> "Bus"
| Device -> "Device"
| System -> "System"