HAL Id: tel-00484788
https://tel.archives-ouvertes.fr/tel-00484788v2
Submitted on 26 May 2010
HAL is a multi-disciplinary open access
archive for the deposit and dissemination of
sci-entific research documents, whether they are
pub-lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.
L’archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d’enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.
A Hierarchical Component Model with Interaction
Protocols
Sebastien Pavel
To cite this version:
Sebastien Pavel. A Hierarchical Component Model with Interaction Protocols. Software Engineering
[cs.SE]. Université de Nantes, 2008. English. �tel-00484788v2�
Implementation In te r a c ti o n P r o to co l Sy m b o li c T r a ns it io n Sy st e m In te r fa c e Component Type a b Service signatures Required Provided
0 1 !login() ?messageEvent(Message msg) !logout() !subscribe(Topic topic) [loggedIn()] !unsubscribe(Topic topic)
StatisticsEnabledServer server:Server a b d:D ?a !b statisticsReq reporter:StatisticsReporter statisticsReq statisticsReport statisticsReport server:Server subscribe unsubscribe messageEvent subscribe unsubscribe messageEvent Se r v e r P r o to c o l St a ti st ic sR e p o r te r P ro to co l Se r v e r Impl St a ti st ic sR e p o r te r Im p l 0 1 ?subscribe(Topic topic) [validTopic(topic)] ?unsubscribe(Topic topic) !messageEvent(Message msg)
0 1 ?subscribe(Topic topic) [validTopic(topic)] ?unsubscribe(Topic topic) !messageEvent(Message msg) 2 3 ?statisticsReq() !statisticsReport(Statistics stat) ?statisticsReq() !statisticsReport(Statistics stat) 0 1 !statisticsRequest() ?statisticsReport(Statistics stat)
0 1 ?login() ?messageEvent(Message msg) ?logout() !messageEvent(Message msg) subscribe/unsubscribe Client Server Statistics Reporter statisticsReport statisticsReq Adapter messageEvent messageEvent login/logout StatisticsEnabledServer
f ( T1 ) : R1
g ( T2 ) : R2
::= primitive_def | composite_def ::= component_type primitive_strct_def guards_def primitive_protocol ::= service_def+
::= service_type op_id formal_parameter_list? | op_id formal_parameter_list? ::= op_id formal_parameter_list? ::= 'required' | 'provided' ::= component_type subcomponent_decl+ composite_structural_def? connection_def+ ::= component_type subcomponent_id ::= service_def+
::= bind_exp | export_exp | import_exp
::= subcomponent_op_id 'to' subcomponent_op_id ::= subcomponent_op_id 'as' op_id
::= op_id 'to' subcomponent_op_id ::= subcomponent_id '.' op_id component_def primitive_def primitive_struct_def service_def guards_def service_type composite_def subcomponent_decl composite_struct_def connection_def bind_exp export_exp import_exp subcomponent_op_id specification process_def process_body choice process_inst special_process action receive_act send_act internal_act formal_param_list actual_param_list ::= process_def+
::= process_id formal_param_list process_body ::= choice+
::= action+ process_inst
::= process_id actual_param_list | special_process ::= STOP
::= receive_act | send_act | internal_act ::= action_id formal_param_list ::= action_id actual_param_list ::= action_id actual_param_list
::= param_type param_id | formal_param_list |ε ::= param_id | actual_param_list |ε
primitive component Client { interface
provided messageEvent(Message msg); required login();
required logout();
required subscribe(Topic topic); required unsubscribe();
guards loggedIn(); protocol
P=!login -> P | !logout[!loggedIn()] -> P | !subscribe[!loggedIn()] -> Q, Q= ?messageEvent -> Q | !unsubscribe() -> P.
Code Generation Process instrumentation instructions Implementation In te ra ct io n P ro to co l Sy m bo li c T r a n si ti o n Sy st e m in te rf a ce CwSTS Component component description business code implementation Scenario B
+
component description Scenario AProtocol Controller Business Logic Executor Primitive Component Ip Ip Ip IR IRE IP – Provided Interface IR – Required Interface
IRE – Required Enhanced Interface
Business Logic Executor Protocol Controller Primitive Component IC IC ILC ILC
ILC - Life Cycle Interface IC - Configuration Interface
C1 Composite Controller Composite Component C3 C2 Dispatcher IP IRE IP2 IRE2 IPE IR IP1 IRE1 IP3 IRE3 IP – Provided Interface IR – Required Interface
C1 Composite Controller Composite Component C3 C2 Dispatcher IC ILC ILC IC IC IC ILC ILC
ILC - Life Cycle Interface
a || b
b 0 1 a 3 2 b a!a ?b 0 1 2 ?a !b 0 1 2 Protocol A Protocol B a b 0 1 2 Synchronization Product of A and B