chapter 6 - modeling eduardo felipe zecca da cruz

29
Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Upload: jasmin-richards

Post on 31-Dec-2015

221 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Chapter 6 - Modeling

Eduardo Felipe Zecca da Cruz

Page 2: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Domain- and Style – Specific ADLs

• Some ADLs are domain-specific or style-specific, or at least optimized for describing architectures in a particular domain or style

• Importance• Scope is better tailored to stakeholder needs

• Unnecessary details could be left because there is little need for genericity

• Comprises• A reference architecture, which describes a general computational framework for a

significant domain of applications;

• A component library, which contains reusable chunks of domain expertise; and

• An application configuration method for selecting and configuring components within the architecture to meet particular application requirements.

Page 3: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Koala

• Developed by Philips Electronics

• Specially designed for modeling embedded software for consumer electronics

• Inherits from Darwin• Semantically and syntactically

• Uses Darwin’s structural concepts of input and output ports

• Expands them through the addition of constructs to support product-line architectures

• Multiple products can be described with a single model, with differences between the products encoded as variation points

Page 4: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Evaluation Rubric for KoalaScope and Purpose

Structures and interfaces of product lines of component-based systems

Basic Elements Components, interfaces, and constructs for variation points: diversify interfaces, switches, etc.

Style Product lines might be seen as very narrow stylesStatic and Dynamic Aspects

Static structure and interfaces

Dynamic Modeling

N/A

Non-Functional Aspects

N/A

Ambiguity Concrete and closely mapped to implementations. Ambiguity is limited

Accuracy Close mappings to implementations. It is easy to identify problems

Precision Configuration is well defined but other aspects are nor specifiedViewpoints Structural viewpoint with explicit points of variationView Consistency N/A

Page 5: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Weaves

• Architectural style and accompanying notation.

• Used for modeling systems of small-grain tool fragments that process objects of data

• Advantages• Extremely optimized notation

• Even simpler than Darwin diagrams

• Close mapping to implemented systems

• Disadvantages• Addresses structure and data flows only

Page 6: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Lunar Lander

• Components do not communicate by request-response procedure call. They communicate by streams of objects

• Basic flows of data are similar to the other models

• Explicit presence of return channels for data• A request that travels from a way does not

imply that a response comes back along the same way

• The response way must be specified

• Information about structural connections but does not capture aspects of how those connections are used• Could be included with an additional model

like natural language

Page 7: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Evaluation Rubric for WeavesScope and Purpose

Structures and configuration of components in the Weave style

Basic Elements Components, connectors (queues), and directed interconnections

Style Weaves style implicit

Static and Dynamic Aspects

Only static structure is modeled

Dynamic Modeling

N/A. Although there is a close correspondence between model and implementation components

Non-Functional Aspects

N/A

Ambiguity Well defined and not ambiguous

Accuracy Syntactic errors are easy to identify

Precision Components and connectors are well defined, but other aspects are not specified

Viewpoints Structural viewpoint

View Consistency N/A

Page 8: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

AADL

• It contains useful constructs and capabilities for modeling a wide variety of embedded and real-time systems such as automotive and medical systems.

• Can describe interfaces to components for both the flow of control and data

• Can capture non-functional aspects of components such as timing, safety, and reliability attributes

Page 9: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

AADL Components

• Components are defined in two parts• Component type

• Defines the interfaces to a component

• Component implementation

• An instance of a particular component type

• Component’s category (additional element that affects components)

• Can be hardware, software, or composite

Page 10: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

More AADL

• Advantages• Allows detailed specification of both hardware and software

aspects of a system

• Automated analysis tools check interesting end-to-end properties of system

• Disadvantages• Verbose; large amount of detail required to capture even simple

systems

Page 11: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Lunar Lander

• Just one part is modeling• The Calculation component and its connection to the Data Store

component.

• The components are connected by a physical Ethernet bus

• Real-time version

• Activities are done at regular intervals

Page 12: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Evaluation Rubric for AADL

Scope and Purpose

Multilevel models of interconnected hardware and software elements

Basic Elements Myriad hardware and software elements: networks, buses, ports, etc.

Style N/A

Static and Dynamic Aspects

Primarily static aspects, but properties can capture some dynamic aspects

Dynamic Modeling

N/A

Non-Functional Aspects

N/A

Ambiguity Much of elements have well-understood semantics.Properties add detail about behavior to reduce ambiguity

Accuracy Structural and properties can be automatically analyzed

Precision Properties specify characteristics of each element

Viewpoints Interconnected hardware and software viewpoints

View Consistency OSATE includes several plug-ins for various consistency checks

Page 13: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Extensible ADLs

• Can be used to combine the flexibility of generic languages with the analyzability and precision of semantically rich languages.

• Provide a basic set of constructs for describing certain common architectural concerns

• Include support

• Basic approach to employing an extensible ADL is as follows• Determine which concerns can be modeled using the existing (baseline) capabilities of the ADL

• For those concerns that cannot be modeled using the baseline capabilities, choose how to extend the ADL to support their modeling (or reuse an extension developed by another user)

• Extend the ADL and its supporting tools as necessary to support the modeling of the unique features

Page 14: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

ACME

• Has a base set of seven constructs• Components

• Connectors

• Ports

• Roles

• Attachments

• Systems

• Representations

• Properties

• Decorations that can be applied to any of the basic seven kinds of elements

Page 15: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

ACME

• Advantages• Structural specification capabilities similar to Darwin

• Simple property structure allows for arbitrary decoration of existing elements

• Tool support with AcmeStudio

• Disadvantages• No way to add new views

• Property specifications can become extremely complex and have entirely separate syntax/semantics of their own

Page 16: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Lunar Lander

• Largely structural and includes components, connectors, ports, roles and attachments

• Verbosity

• Use of properties

• Additional properties could be added using ACME to model Lunar Lander

Page 17: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Evaluation Rubric for ACMEScope and Purpose

Structural aspects of a software architecture, with the extensible properties

Basic Elements Components, connectors, ports and roles, attachments, representations and properties

Style Through type system

Static and Dynamic Aspects

Static structure is modeled natively, dynamic aspects in properties

Dynamic Modeling

AcmeLib allows models to be manipulated programmatically

Non-Functional Aspects

Through properties

Ambiguity Elements are well defined, but external mean is not definedProperties need being accompanied by tools or documentationOtherwise ambiguity could be introduced

Accuracy Typing can check elements and properties are checked by external tools

Precision Properties can increase precision but is not possible to define new elements

Viewpoints Structural viewpoint is native, properties can be used to provide additional viewpoints

View Consistency Via external tools that must be developed

Page 18: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

ADML

• XML-based architecture

• Syntax derived from ACME

• ADML is supported by meta-properties

• Advantages• XML parsers and tools readily available

• Added some ability to reason about types of properties with meta-properties

• Disadvantages• Properties are still name-value pairs

• Did not take advantage of XML extension mechanisms

Page 19: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Lunar Lander

• Similar to ACME

• Use of XML opens this specification up to a wider array of tools

• Verbose is denser than in ACME

Page 20: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

xADL

• XML-based language

• An attempt to provide a platform upon which common modeling features can be reused from domain to domain and new features can be created and added to the language as first-class entities

• On the other languages they are added as extensions to other entities

Page 21: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

xADL

• Advantages• Growing set of generically useful modules available already

• Tool support in ArchStudio environment

• Users can add their own modules via well-defined extensibility mechanisms

• Disadvantages• Extensibility mechanisms can be complex and increase learning

curve

• Heavy reliance on tools

Page 22: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

xADL Data Binding Library

• It is a software library that provides an API for parsing, reading, writing, and serializing documents in a particular language

• In xADL it is a set of Java classes that correspond to xADL data types

• Data Binding Library provides a simple interface to make these operations (read, write, query, manipulate)

Page 23: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Apigen

• It is a xADL’s data binding library generator

• Given a set of XML schemas, the Apigen can generate the complete data binding library with support for those schemas

• For any changes or adds, Apigen will generate a new data binding library by rerunning

Page 24: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Lunar Lander

• Similar to ADML and ACME

• Has an associated graphical visualization provided by an editor called Archipelago

• Application can be extended using new schemas and these schemas can be reused in another projects

Page 25: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Evaluation Rubric for xADLScope and Purpose Modeling different architectural concerns with support for extensibilityBasic Elements Components, connectors, interfaces, links, options, variants, versions, plus any

basic elements defined in extensionsStyle Through the use of types and type librariesStatic and Dynamic Aspects

Static structure is modeled natively, dynamic properties can be captured through extensions.

Dynamic Modeling xADL data binding library allows models to be manipulated programmaticallyNon-Functional Aspects

Through extensions

Ambiguity Base schemas are permissiveExtensions add rigor or formality if needed

Accuracy Tools check the correctness of xADL documentsUsers can add additional constraints into these tools to handle extensions

Precision Base schemas are abstract; Extensions can be used to add precision

Viewpoints Structural viewpoints are natively supportedExtensions can be used to provide additional viewpoints

View Consistency External tools can check the consistency

Page 26: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

When Systems Become too Complex to Model

• Certain applications cannot be modeled using the techniques that were used on the Lunar Lander example

• Gigantic and diverse applications like the Web or Gnutella

• Impossible to generate a model of these systems in the traditional components-connectors-and-configuration sense

• There are some strategies to consider to model these systems

Page 27: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Strategies

• Model Limited Aspects of the Architecture• Use Cases

• Interaction Patterns

• More limited and easier to be modeled

• Model an Instance• Consider if a complete model is needed

• Modeling only the relevant portion of the system

Page 28: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

Strategies

• Exploit Regularity• Large systems have low heterogeneity

• These large portions can be modeled once and repeated automatically

• Model the Style• Instead of modeling as an application, consider modeling the REST style instead

• WEB is based on the REST architecture

• Model the Protocol• Model protocol details

• HTTP example on the Web

Page 29: Chapter 6 - Modeling Eduardo Felipe Zecca da Cruz

References

• Taylor, R. N., & Medvidovic D́, N. (2010).Software architecture: foundations, theory, and practice. Hoboken, N.J.: Wiley.

• Modeling and Notations - http://www.softwarearchitecturebook.com/svn/main/slides/ppt/10_Modeling_and_Notations.ppt

• Domain-Specific Software Architecture and Product Lines – http://www.csse.usc.edu/classes/cs578_2013/DSSE.ppt