-
Key: UCM11-5
-
Status: closed
-
Source: THALES ( Thomas Vergnaud)
-
Summary:
Component ports in UCM are specified by 3 parameters:
- a name
- a définition
- bindings to actual types if need be
UCM defines a set of nested classes in the meta-model, which makes the XML syntax verbose. See for example:
<compType name="Compare"> <port name="in1"> <typeSpec type="::core::messages::msg_rcvr_pt"> <binding abstract="::core::messages::api::message_type_t" actual="::complex_types::image_t"/> </typeSpec> </port> <port name="in2"> <typeSpec type="::core::messages::msg_rcvr_pt"> <binding abstract="::core::messages::api::message_type_t" actual="::complex_types::image_t"/> </typeSpec> </port> </compType>
Three nested XML tags are necessary: port, typeSpec and binding.
The specification of data binding is nested in the port declaration. Although it is a clean way to specify bindings, it brings two issues:
- users have to write the binding specification for each port; a binding cannot be written once and used for several ports, which would be simpler
- it is difficult to implement efficient code generators: a naive generator will generate specific code for each port instead of for each unique binding; this leads to redundant code.
It would be better to write something like this:
<bindingSet name="binding1"> <binding abstract="::core::messages::api::message_type_t" actual="::complex_types::image_t"/> </bindingSet> <compType name="Compare"> <port name="in1" def="::core::messages::msg_rcvr_pt" binding="binding1"/> <port name="in2" def="::core::messages::msg_rcvr_pt" binding="binding1"/></compType>
Also, when refining a component type, ports can be refined. By “refined”, one must understand “redefined”: UCM actually allows a complete port redefinition; no shared data or semantics is required between the original port and its refinement.
-
Reported: UCM 1.0b2 — Mon, 23 Oct 2017 13:53 GMT
-
Disposition: Resolved — UCM 1.1
-
Disposition Summary:
Improve component port declaration
introduce the notion of PortRole to restrict component port refinement: a component port can only be refined by a component port the port type of which references the same port role. For example, a message emitter port can refine a data producer port, but not a service client port.
Also remove the notion of IPortSpec, PortTypeSpec and PortRoleSpec, and instead have a reference to the port type and binding in the port declaration. -
Updated: Wed, 3 Oct 2018 14:18 GMT
-
Attachments:
- ucm_binding_sets.SVG 12 kB ()
- ucm_component_package.SVG 34 kB ()
- ucm_component_ports.SVG 13 kB ()
- ucm_component_technical_policies.SVG 17 kB ()
- ucm_composite_component_implementations.SVG 50 kB ()
- ucm_interactions.SVG 40 kB ()
- ucm_port_types.SVG 15 kB ()