cs 5381 juan c. gonzález authors: paola inverardi and alexander l. wolf

23
Formal Specification and Analysis of Software Architectures Using the Chemical Abstract Machine Model CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

Upload: oleg-garcia

Post on 03-Jan-2016

29 views

Category:

Documents


3 download

DESCRIPTION

Formal Specification and Analysis of Software Architectures Using the Chemical Abstract Machine Model. CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf. Outline. Introduction A model of Architectural Description The Chemical Abstract Machine Model - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

Formal Specification and Analysis of Software Architectures Using the Chemical Abstract Machine Model

CS 5381Juan C. González

Authors: Paola Inverardi and Alexander L. Wolf

Page 2: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

Outline

Introduction A model of Architectural Description The Chemical Abstract Machine Model Specifying Architectures using

CHAM’S Conclusion

Page 3: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

Introduction

Importance of studying the architectures of large and complex systems Improved education Increased reuse Reduced development cost Enhanced quality

Page 4: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

Formal specification of software architecture

Motivations of using a formal framework Semantic precision Uniform description Common basis for formal comparison Susceptibility to formal analysis

Page 5: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

Challenges of choosing a framework

A general and flexible formalism in which it is possible to describe very different kinds of architectures

The description has to be understandable to the widely varying consumers of the specification

Page 6: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

Operational semantic formalism as the more appropriate choice

In the belief that can be more easily understood by a broader range of practitioners than other, abstract mathematical formalism

Operational semantics reflects the familiar idea of specifying the computational behavior of a more abstract and precisely defined system.

Page 7: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

Ideal approach

To use an operational semantic formalism that is based on a more flexible, relatively neutral computational model.

Page 8: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

Chemical Abstract Machine (CHAM) model

Proposed by Berry and Boudol in the domain of theoretical computer science

The abstract machine is fashioned after chemical and chemical reactions

Page 9: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

Metaphor of the CHAM

The states of the machine are chemical solutions

Molecules can only interact according to a set of reaction rules

The CHAM formalism has already been used to describe several different and important computational paradigms.

Page 10: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

A Model of architectural descriptionExample: Multiphase compiler

Page 11: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

The model identifies three basic kind of architectural elements

Processing elements Data elements Connecting elements

Page 12: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

The Chemical Abstract Machine Model

It is built upon the chemical metaphor first proposed by Banatre and Le Metayer to illustrate their Gamma formalism or parallel computing.

Page 13: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

Gamma computation

Set of transformations or reactions that consume elements of the multiset and produce new ones according to the rules that constitute the program.

Page 14: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

The CHAM formalism

Extends the Gamma language by specifying a syntax for molecules and by providing a classification scheme for reaction rules.

It also introduces the membrane construct.

Page 15: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

Basics

A CHAM is specified by defining molecules m,m’, … and solutions S,S’,… of molecules.

Also contains transformation rules T, T’,… that define a transformation relation S S’ General laws Specific rules

Page 16: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

More…

Any solution can be considered as a single molecule with respect to other solutions by means of an encapsulation construct called a membrane.

A reversible operator called an airlock is used to selectively extract molecules form a solution within a membrane.

Page 17: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

Molecules, Solutions and Membranes

Solutions S, S’, … are finite multisets of molecules, each denoted as a comma – separated list of molecules m1, m2, …, mn

Solutions can be built form other solutions by combining them through the multiset union operator. S=m1, …, mn and S’=m’1,…,m’k then

S U S’ = m1,…,mn,m’1,…,m’k

Page 18: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

More…

A solution enclosed in {| . |} denotes a membrane.

The reversible airlock operator applied to solution S = m1, …, mn to extract mi from S is denoted S’ = mi ◄ {|m1, …, mi-1, mi+1, …, mn|}

The model provides a context abstraction, denoted as C[.], derived from λ-calculus.

Page 19: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

General Laws

CHAM’s obey four general laws: The reaction law

The chemical law

Page 20: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

More…

The membrane law

The airlock law

Page 21: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

Rules

Heating rules Is heating if it decomposes a molecule into its

constituents. A solution is said to be hot if no heating rule is applicable.

Cooling rules Is a cooling if it composes a compound molecule. A solution is said to be frozen if no cooling rule is

applicable. Reaction rules

Is reaction if it actually changes the nature of the solutions.

Page 22: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

Example

Sequential Multiphase Compiler

Page 23: CS 5381 Juan C. González Authors: Paola Inverardi and Alexander L. Wolf

Conclusion

The CHAM is a reasonably simple model, yet very expressive.

The CHAM model might be one useful tool in the software architect’s chest of useful tools.