A Study on Architecture Description Languages
Trang 1VIETNAM NATIONAL UNIVERSITY, HANOI
UNIVERSITY OF ENGINEERING AND TECHNOLOGY
======
STUDENT SCIENTIFIC RESEARCH CONTEST
Year: 2012
Research name: A Study on Architecture Description Languages
Student name: Pham Van Quy Gender: Male
Class: QH-2008-I/CQ-CA Faculty: Computer Science
Supervisor: Dr.Vo Dinh Hieu
Trang 2PROJECT SUMMARY
Architecture Description Languages (ADLs) are formal languages that widely used to describe and represent architectures of software systems During a grand development process, many ADLs have been born, such as Wright, xADL, ACME, Aesop, Rapide, UML, etc Almost these ADLs are developed in famous universities all over the world, and they are still under researching to improve to become better and more popular
My study on this subject includes researching on ADLs, a deeper studying into one language, and a demonstration on modeling a system architecture In this report, I
am going to summary my researches on ADLs, which include ADLs definition, ADLs properties and introducing some popular languages Next part is presenting my deeper researches on one languages I have chosen ACME – an architecture description language developed by Carnegie Mellon University – to study its semantic, structure, and syntax Besides studying its theories, I also use ACME to model a system and demonstrate results with support of ACME complier tool - ACME Studio
Trang 3TABLE OF CONTENTS
I INTRODUCTION 4
1 Introduction 4
2 Research purpose 4
3 Report structure 4
II ARCHITECTURE DESCIPTION LANGUAGES 5
1 Definition 5
2 ADLs in describe system architecture 6
3 Introduce some common language of ADLs 7
III ACME 8
1 Definition 8
2 ACME design element types 8
3 ACME syntax and visualization 10
3.1 Syntax 10
3.2 Visualization 11
4 Some evaluation of ACME 12
IV MODELING WITH ACME 13
1 Student-Course System 14
1.1 Problem definition 14
1.2 Architecture source code 15
2 Building ADL model in ACME 18
2.1 Defining Family 18
2.2 Modeling top-level architecture 18
2.3 Modeling second-level architecture 20
2.4 Final model 21
V CONCLUSION AND FUTURE WORKS 23
VI REFERENCES 23
Trang 4LIST OF FIGURES
Figure 1: Elements of an ACME description 9
Figure 2: Representations and Properties of a Component 10
Figure 3: Simple Client-Server system in ACME 10
Figure 4: Example illustrate ACME supports hierarchy Hierarchical 11
Figure 5: ACME visualization – ACME Studio 12
Figure 6: Top-level architecture for Student-Course System 14
Figure 7: Student-Course System with ownership domain annotations 16
Figure 8: Ownership Object Graph for Student-Course System 17
Figure 9: Starting new project with Tiered Family type 18
Figure 10: Top-level model of Student-Course System 19
Figure 11: Source code editor of ACME Studio 19
Figure 12: Call-return connection 19
Figure 13: Representation of Logic component 20
Figure 14: Two representation of lock and log component 20
Figure 15: Representation of Data component 21
Figure 16: Student-Course System represented in ACME ADL model 22
Trang 5I INTRODUCTION
1 Introduction
Architecture Description Languages (ADLs) are formal languages that widely used to describe and represent architectures of software systems An architecture plays several roles in project development, all of them are important, and all of them facilitated by a formal representation of the architecture, such as with an ADL A formal architecture representation is more likely to be maintained and followed than
an informal one, can more readily be consulted and treated as authoritative, and can more easily be transferred to other projects as a core asset
My study on this subject includes researching on ADLs, a deeper studying into one language, and a demonstration on modeling a system architecture In fact, many ADLs have been developed by the academic and industrial communities, and each of them is varied color in the big picture of ADLs For a deeper research, I have chosen ACME – an architecture description language developed by Carnegie Mellon University – to study its semantic, structure, syntax, and use ACME to model a software system with support of its complier tool - ACME Studio[2]
2 Research purposes
For long years development of ADLs, there has been researching from many universities on this field However, almost grand universities works on this subject have developed new languages on their own As a result, there are many languages born but they all have limited number of papers and tutorials, especially ACME
By researching on this subject, on one hand I want to expand my knowledge on
a very interesting field of software engineering; on the other hand, in case my researches have good results, I can go on with publishing my researches This can help increasing resources for ADLs and ACME somehow
3 Report structure
The rest of the report has following structure:
II ARCHITECTURE DESCRIPTION LANGUAGES
1 Definition
2 ADLs in describe system architecture
Trang 63 Introduce some common language of ADLs III ACME
1 Definition
2 ACME design element types
3 ACME syntax and visualization 3.1 Syntax
3.2 Visualization
4 Some evaluation of ACME
IV MODELING WITH ACME
1 Student-Course System 1.1 Problem definition 1.2 Architecture source code
2 Building ADL model in ACME 2.1 Defining Family
2.2 Modeling top-level architecture 2.3 Modeling second-level architecture 2.4 Final model
V CONCLUSION AND FUTURE WORKS
In the software engineering community, an Architecture Description Language (ADL)
is a specialized computer languages for explicit modeling and analysis of software architecture
ADL play an important role in software development ADL can be viewed as a platform designed for formal specification of software components It is well-suited
Trang 7for many purposes, such as design, document, implement and test software components
2 ADLs in describe system architecture
Architecture description languages (ADLs) are widely used to describe system architectures The output of the architecture description process is the system architecture documents This consists of a number of graphical representations of the system model along with associated descriptive text It should describe how the system is structured into sub-system and how each sub-system is structured into components Each component is described based on many properties such as behavior
As others architecture model languages, ADLs have their own positive and negative elements:
Positive elements of ADL
ADLs represent a formal way of representing architecture
ADLs are intended to be both human and machine readable
ADLs support describing a system at a higher level than previously possible
ADLs permit analysis of architectures – completeness, consistency, ambiguity, and performance
ADLs can support automatic generation of simulations / software systems Negative elements of ADL
There is not universal agreement on what ADLs should represent, particularly as regards the behavior of the architecture
Representations currently in use are relatively difficult to parse and are not supported by commercial tools
Most ADLs tend to be very vertically optimized toward a particular kind of analysis
Most ADL work today has been undertaken with academic rather than commercial goals in mind
In fact, most of ADLs is developed under academic researches; as a result, ADLs has many restrictions in real project working In case of UML, it has been
Trang 8developed under commercial purpose and has become a famous language in software designing
3 Introduce some common language of ADLs
ACME
The Acme project began in early 1995, by Carnegie Mellon University, with the goal of providing a common language that could be used to support the interchange of architectural descriptions between a variety of architectural design tools Recently, Acme started back as an ADL interchange language but has evolved to an ADL itself
ACME has advantages of general notation, readable by both human and machine, and a strong support of ACME Studio – an well editor and visualization tool
xADL
xADL 2.0 is a software architecture description language (ADL) developed by the University of California, Irvine for modeling the architecture
of software systems Unlike many other ADLs, xADL 2.0 is defined as a set
of XML schemas This gives xADL 2.0 high extensibility and flexibility, as well as basic support from the many available commercial XML tools
xADL is based on xArch - standard, extensible XML-based representation for software architectures
The UML has well defined formal syntax and semantics and can be machine checked and processed UML includes a set of graphical notation techniques to create abstract models of specific systems
Wright
Trang 9Wright is an architecture description language developed at Carnegie Mellon University Wright language focuses on modeling and analysis (specifically, deadlock analysis) of the dynamic behavior of concurrent systems
Rapide
Rapide (developed by Stanford University) is designed to support component-based development of large, multi-language systems by utilizing architecture definitions as the development framework
There is no best or suggested language Different architectural description languages represent different features and concept of the overall component architectural design problem Therefore, specification a system with varied evaluation concept by single ADL still is a unsolved problem
2 ACME design element types
ACME is built on a core ontology of seven types of entities for architectural
representation: components, connectors, systems, ports, roles, representations and
rep-maps Of the seven types, the most basic elements of architectural description are
component, connector and system
- Components:
Components are the basic building blocks in an Acme description of a system They represent centers of computation: the elements of a system responsible for doing the "work" in a system Components may be used to model both hardware and software or provide an abstraction that may be
Trang 10mapped to either hardware, software or a combination Intuitively, components correspond to the "boxes" in box and line diagrams Typical examples of components include such things as clients, servers, filters, objects, blackboards, and databases
- Connectors:
Connectors represent interactions among components Informally they provide the ''glue'' for architectural designs, and intuitively, they correspond to the lines in box-and-line descriptions Examples include simple forms of interaction, such as pipes, procedure call, and event broadcast But connectors may also represent more complex interactions, such as a client-server protocol
or a SQL link between a database and an application
Figure 1: Elements of an ACME description
Besides core elements, Properties is also an important element of ACME To
accommodate the wide variety of addition information ACME supports annotation of architectural structure with list of properties Each property has a name, an optional
Trang 11type, and a value Any elements in ACME can have properties belong with it Here is
an example illustrate diagram of Properties and Representations:
Figure 2: Representations and Properties of a Component
3 ACME syntax and visualization
Since ACME has developed its own library and tool support, ACME can be viewed in both source code and visual model diagram ACME source code has a simple and easy to understand syntaxes; meanwhile, ACME visualization is supported
by a strong tool: ACME Studio – newest version is 3.5.3 for Eclipse 3.7.1[2]
3.1 Syntax
Here is an example of ACME source code which corresponding to model in Figure 2:
Figure 3: Simple Client-Server system in ACME
Trang 12Explaining:
- As we can see in the example code above, System is declared first and it
contain Components, Connectors and their configuration (Attachments)
- Component: “client” is declared with one port named “send-request”
- Component: “server” is declared with one port named “receive-request”
- An connector “rpc” (stands for remote procedure call) has two roles: caller and
callee These two roles must be plugged into two ports; otherwise, there will be complier error
- Attachments command is configurations of the system that declares which port
is correspond to role of defined connectors
ACME also supports the hierarchical description of architectures It means any component or connector can be represented by one or more detailed, lower-level descriptions
Figure 4: Example illustrate ACME supports hierarchy Hierarchical
Client-Server System
3.2 Visualization
ACME has the advantage that with the introduction of ACME studio, which is
an extension to Eclipse, it provides explicit visualization support to model specific patterns The ACME studio editor provides three views: overview of the files in the project, textual source of the architecture and architecture diagrams with visibility of
Trang 13modeled patterns To model specific patterns, ACME studio allows one to directly associate pattern elements with their corresponding architecture elements In addition, ACME studio provides visualization support to view pattern elements at both abstract and detail level
Figure 5: ACME visualization – ACME Studio
4 Some evaluation of ACME
Evaluating on four concepts - syntax, visualization, variability, extensibility; architectural description language ACME shows both of its strengths and weaknesses
Evaluation on syntax (expressing pattern elements, topology, constraints and configuration of components and connectors):
Trang 14Besides the core ontology of seven basic architecture design elements, ACME provides a template mechanism, which can be used for abstracting common reusable architectural idioms and patterns This can
be a positive element of ACME Using templates and styles help ACME reduces redundant code and increases reusable abilities
Evaluation on visualization (graphical representation for modeling patterns):
ACME has the advantage that with the introduction of ACME studio, which is an extension to Eclipse, it provides explicit visualization support to model specific patterns It’s the truth that ACME Studio is a strong visualization tool, comparing to other current visualization tool of others ADLs ACME Studio has a good user interface, fast processing and be easy to use
In addition, ACME studio provides visualization support to view pattern elements at both abstract and detail level For instance, a selected component can be easily expanded to view its internal structure by one mouse click
Evaluation on variability (the ability to express not only individual solutions but the entire space of solution variants):
One weakness of ACME is lack of data types support Currently, ACME, by default, support only Integer, Boolean, and String Although
on purpose of developing an generalized standard for integrating with others ADLs; this flexibility in ACME has a negative impact on analyzing and checking variable error
Evaluation on extensibility (capability to model new patterns):
In the problem of defining new patterns or resources for system, ACME works quite well Defining new connectors, components, ports, roles…, is an easy step; moreover, ACME also support re-defining the visualization of these elements However, a disadvantage is ACME has not support new connections that require new data types as mentioned above
IV MODELING WITH ACME