Download presentation
Presentation is loading. Please wait.
Published byRoberta O’Neal’ Modified over 9 years ago
1
2015-09-23Séverine Sentilles1 Advanced Component-Based Software Engineering Overview of several component models
2
2015-09-23Séverine Sentilles2 Agenda Unified Modelling Language (UML) Picolo Fractal BIP Autosar
3
2015-09-23Séverine Sentilles3 Unified Modelling Language (UML)
4
2015-09-23Séverine Sentilles4 Component diagram Three representations for a component But access points are required Utilisation of interfaces Utilisation of port C > C > C
5
2015-09-23Séverine Sentilles5 Interfaces Role: Specification of the access point Required functionalities Provided functionalities 2 existing representation The most descriptive The compact > ProvidedItf > C > RequiredItf > C ProvidedItf RequiredItf
6
2015-09-23Séverine Sentilles6 Ports Role: Access point to the internal structure of the component Can have 0 or several interfaces Representation: > C
7
2015-09-23Séverine Sentilles7 Relationship between components Use the notion of connector Roughly a way to link components together & make them ”communicate” via a request of services Generalisation of the means of communication Example: Client-server Pipe&filter Message exchange Can also be called horizontal composition > Client > Server IdenticalItf
8
2015-09-23Séverine Sentilles8 Vertical composition Can also be called hierarchical composition Role To increase the component granularity To expose the content of the component Use the notion of delegation connector (between two ports) > C > A > B
9
2015-09-23Séverine Sentilles9 Profile UML Extension of the UML model in order to adapt it to the particular requirements of a context Uses Stereotypes Tagged values OCL Constraints Examples: Profile for EJB components Profile for a software architecture
10
2015-09-23Séverine Sentilles10 EJB Profile
11
2015-09-23Séverine Sentilles11 Modeling tools UML 2.0 compliant Objecteering Standard UML tool from SOFTEAM All UML models can be designed Allow to define and use personalized UML profiles Can generate the structure of Java files corresponding to a model www.objecteering.com/ Rational Rose Buy by IBM http://www.rational.com ArgoUML Open Source http://argouml.tigris.org Visio Microsoft tools http://office.microsoft.com/visio http://office.microsoft.com/visio
12
2015-09-23Séverine Sentilles12 Agenda Unified Modelling Language (UML) Picolo Fractal BIP Autosar
13
2015-09-23Séverine Sentilles13 Picolo
14
2015-09-23Séverine Sentilles14 Characteristics A simple component model to understand how components work Not suited for building real applications Programing language: Python Developed by: LIFL (FRANCE) From “Picolo: A Simple Python Framework for Introducing Components Principles, 2005”
15
2015-09-23Séverine Sentilles15 The component model From “Picolo: A Simple Python Framework for Introducing Components Principles, 2005”
16
2015-09-23Séverine Sentilles16 Picolo Implementation Core module Main mechanisms of components About 350 lines of code Extension modules Description, life cycle, trace Extension framework : write your own ones From “Picolo: A Simple Python Framework for Introducing Components Principles, 2005”
17
2015-09-23Séverine Sentilles17 Example: Defining Component >>> import picolo.core as picolo >>> vm = picolo.Component (’vending_machine’) >>> vm.get_ports () {} >>> vm.get_properties () {}
18
2015-09-23Séverine Sentilles18 Example: Defining Input Port >>> cport = picolo.Input () >>> cport.get_operations () {} >>> vm.bind_port (’customer’, cport) >>> vm.get_ports () {’customer’: }
19
2015-09-23Séverine Sentilles19 Example: Defining Connection >>> water.get_ports () {’tape’: } >>> ptape = water.get_port (’tape’) >>> cnx = picolo.Connection (vm.get_port (’water’), ptape) >>> cnx.connect ()
20
2015-09-23Séverine Sentilles20 Picolo and the main principles of CBSE Reusability ? Substituability ? Extensibility ? Composability: ?
21
2015-09-23Séverine Sentilles21 Agenda Unified Modelling Language (UML) Picolo Fractal BIP Autosar
22
2015-09-23Séverine Sentilles22 The Fractal component model
23
2015-09-23Séverine Sentilles23 Characteristics Hierarchical, Reflexive, Open Allow the sharing of components Extensible Several implementation Julia (Java) Think (C) FracTalk (smalltalk) FracNet (.NET) Developed by France Telecom R&D (FRANCE) INRIA (FRANCE)
24
2015-09-23Séverine Sentilles24 Components Existence at compile-time and run-time “3” types Primitive Composite (Shared) Divided in 2 parts Membrane Management of the extra-functional properties (Controllers) Ex: Binding, Life-cycle, state, etc. Extensible (open set of control capabilities) Content (management of the functional properties) Reflexive capabilities execution and internal structure of component can be made explicit through well-defined interfaces Extendable/adaptable (to fit the programmer’s constraints and objectives)
25
2015-09-23Séverine Sentilles25 Interfaces Access point to the components Characteristics: Client (required)/Server (provided) Mandatory/optional Simple/multiple Some predetermined interface (used in the membrane) Binding-controller-itf Lifecycle-controller-itf Name-controller-itf …
26
2015-09-23Séverine Sentilles26 Communication 2 types: Primitive binding: link a server interface to a client interface within a component Composite binding: Communication path between an arbitrary number of component interfaces primitives bindings and/or binding components (stub, skeleton, adapters, etc.)
27
2015-09-23Séverine Sentilles27 Julia Small, efficient, extensible run-time framework Programming language: Java Relies on a combination of interceptors and mixins (for the programming of the reflective features)
28
2015-09-23Séverine Sentilles28 Example The Serveur Component: @FractalComponent(controllerDesc="primitive") @Provides( interfaces= @Interface(name="s",signature=Service.class) ) public class ServeurImpl implements Service { public void print( String msg ) { System.out.println(msg); }
29
2015-09-23Séverine Sentilles29 Example The Client Component: @FractalComponent(controllerDesc="primitive") @Provides( interfaces= @Interface(name="r",signature=Runnable.class) ) public class ClientImpl implements Runnable { @Requires(name="s") private Service service; public void run() { service.print("Hello world!"); }
30
2015-09-23Séverine Sentilles30 Example Assembling the components : <interface name="r" role="server" signature="java.lang.Runnable" />
31
2015-09-23Séverine Sentilles31 Fractal and the main principles of the CBSE Reusability Utilisation of type system, communication semantic, component semantic => risk to have a conflict/incompatibility between component developed independently Substituability Possible ? Extensibility At design-time: ok At run-time: with the introspection mechanism ? Composability: Behaviour superimposed by the ”parent-component” to the subcomponents (extra-functional properties)
32
2015-09-23Séverine Sentilles32 Agenda Unified Modelling Language (UML) Picolo Fractal BIP Autosar
33
2015-09-23Séverine Sentilles33 BIP
34
2015-09-23Séverine Sentilles34 Characteristics Framework for modelling heterogeneous real-time components Developed by Verimag (FRANCE) Hierarchical Structured in 3 layers : B: Behavior I: Interaction (a set of connectors describing the interactions between transition of the behavior) P: Priority rules (set of constraints describing scheduling policy for interaction) Behavior Interaction Priority A BIP component Structure
35
2015-09-23Séverine Sentilles35 Components A component consists of: A set of ports : action names used for synchronization with other components. A set of control states: synchronization points. A set of variables used to store (local) data. A set of transitions modeling atomic computation steps. Ports States Transitions Variables
36
2015-09-23Séverine Sentilles36 component Compound component: new components from existing components
37
2015-09-23Séverine Sentilles37 Communication styles Interactions Synchronous Rendez-vous Broadcast Utilisation of connectors Set of ports from different components that can be involved in an interaction Ex: p1, p2, p3 ports of 3 distincts components, then the connector {p1,p2,p3} has => 7 interactions: p1, p2, p3, {p1,p2}, {p1,p3}, {p2,p3}, {p1,p2,p3}. Synchronization
38
2015-09-23Séverine Sentilles38 Priorities used to filter interactions among the feasible ones depending on given conditions
39
2015-09-23Séverine Sentilles39 BIP and the main principles of CBSE Reusability existing components can be combined to generate complex components using platform glue Substituability ? Extensibility ? Composability: Utilization of parameterized binary composition operator The product of two components consists in composition layer by layer
40
2015-09-23Séverine Sentilles40 Example Defining a component component Reactive port in, out data int x, y behavior state empty on in provided 0 < x do y:=f(x) to full state full on out to empty end
41
2015-09-23Séverine Sentilles41 Example Defining an interaction connector C1 = p1|p2|p3 behavior on p1|p2|p3 provided ¬(x1 = x2 = x3) do x1, x2, x3 := MAX(x1, x2, x3) end
42
2015-09-23Séverine Sentilles42 Agenda Unified Modelling Language (UML) Picolo Fractal BIP Autosar
43
2015-09-23Séverine Sentilles43 Autosar
44
2015-09-23Séverine Sentilles44 Chacteristics Automotive Open System Architecture Goal: Separation of concerns Software components deals with application logic and can be developed independently of the underlying hardware and os Middleware-layer handles aspects of remote communication, component lifecycle, scheduling, timing as well as OS abstraction. configurable/customizable run-time environment Adding new functions product variants, platforms
45
2015-09-23Séverine Sentilles45 Developed by
46
2015-09-23Séverine Sentilles46 View
47
2015-09-23Séverine Sentilles47 Layered architecture Components
48
2015-09-23Séverine Sentilles48 Components Independent of the infrastructure Ports and connectors No imposed size Reusable piece of functionality (filter) An entire automotive functionality Sensors/actuators Particular components Encapsulate the dependencies of the application on specific sensors/actuators crossing module boundaries (function distribution) one function: several SW components one/several ECUs one ECU: several SW Components from different functions / vendors
49
2015-09-23Séverine Sentilles49 Component (cont) Owns a description (SW-C Description) Operations and datas provided/required Requirements on the infrastructure Resources needed (CPU-time, memory) Information regarding the specific implementation of the component
50
2015-09-23Séverine Sentilles50 Component connexion
51
2015-09-23Séverine Sentilles51 Communication style Client/server Synchronous communication pattern (The client can be blocked) Sender/Receiver Asynchronous communication pattern (the sender is not blocked) Event is considered as a subcategory of sender/receiver
52
2015-09-23Séverine Sentilles52 Autosar and the main principles of CBSE Reusability ok Substituability At run-time: No (the desired system is static after design time) Extensibility: ? Composability: ?
53
2015-09-23Séverine Sentilles53 Literature Unified Modelling Language (UML) Picolo Picolo: A Simple Python Framework for Introducing Components Principles http://www.win.tue.nl/~mchaudro/cbse2006/PicoloTalk.pdf http://www.win.tue.nl/~mchaudro/cbse2006/Picolo%20Introducing%20Components%20using%20Pyth on.pdf http://www.win.tue.nl/~mchaudro/cbse2006/Picolo%20Introducing%20Components%20using%20Pyth on.pdf Fractal The Fractal Component Model and Its Support in Java http://fractal.objectweb.org/doc/pub/SPE06.pdf Fractal tutorial at ICAR 2006 (in French) http://sardes.inrialpes.fr/ecole/2006/cours-fractal.pdf BIP Modeling Heterogeneous Real-time Components in BIP http://www-verimag.imag.fr/%7Easync/BIP/publications/BIP-invited-paperSEFM06.pdf A Methodology and Supporting Tools for the Development of Low-Footprint and Safe Embedded Systems http://www-verimag.imag.fr/%7Easync/BIP/publications/BIP2THINK.pdf AUTOSAR AUTOSAR: Technical Overview http://www.autosar.org/download/AUTOSAR_TechnicalOverview.pdf AUTOSAR: Standardization of software architecture in automotive industry http://symposium.itea2.org/symposium2006/main/presentations/day_2/AUTOSAR_Sta ndardization_of_software_architecture_in_automotive_industry.pdf?PHPSESSID=433 abcfec16c19b0dbb2554976 http://symposium.itea2.org/symposium2006/main/presentations/day_2/AUTOSAR_Sta ndardization_of_software_architecture_in_automotive_industry.pdf?PHPSESSID=433 abcfec16c19b0dbb2554976
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.