ohara by xiagong0815

VIEWS: 2 PAGES: 16

									Verification of
behavioural elements
of UML models using B
Truong, Ninh-Thuan and Souquieres, Jeanine. 2005.
In Proceedings of the 2005 ACM Symposium on
Applied Computing
Santa Fe, New Mexico, March 13 - 17, 2005

Presented by: James T. O’Hara
SE 510, Fall 2005
A Tale of Two Tools …
   The application of formal methods allows the
    rigorous definition and analysis of the
    functionality and the behavior of a system.
      It is capable of showing that the system is
       correct.
      B is a method for specifying, designing and
       coding software systems.

   UML is a widely accepted modeling language
    that can be used to visualize, specify,
    construct and document the artifacts of a
    software system.
                                                     1
Combining UML with B

   The derivation from UML specification into
    the B formal method is considered as an
    appropriate way to jointly use UML and B in
    practical, unified and rigorous software
    development.

   The aim of the study was to use B support
    tools to analyze UML model properties.


                                                  2
THE B METHOD

   B is a formal software development method,
    originally developed by J.R. Abrial.

   The B notation is based on set theory, the
    language of generalized substitutions and
    first order logic.

   Specifications are composed of abstract
    machines that are similar to modules or
    classes.

                                                 3
The UML Metamodel

   The UML metamodel defines the
    complete semantics for representing
    object models using UML.
     Abstract Syntax
     Well-Formedness Rules
     Semantics




                                          4
TRANSFORMATION OF
UML TO B
   The transformation of an attribute of a
    UML class to a variable of a B abstract
    machine can be performed as follows:




                                              5
What is a UML
Collaboration Diagram
   A collaboration diagram describes
    interactions among objects in terms of
    sequenced messages. Collaboration
    diagrams represent a combination of
    information taken from class,
    sequence, and use case diagrams
    describing both the static structure
    and dynamic behavior of a system.

                                         6
UML Collaboration Diagram




   UML collaboration diagrams, are used to
    explore the dynamic nature of your
    software.
Source: http://www.agilemodeling.com/style/collaborationDiagram.htm
                                                                      7
    TRANSFORMATION OF THE
    COLLABORATION PACKAGE TO B
   The Collaboration package is a sub-package
    of the Behavioral Elements package




                                                 8
   What is a UML State Diagram
Figure 1. A seminar during registration.




      UML state machine diagrams depict the
       various states that an object may be in and
       the transitions between those states.
Source: http://www.agilemodeling.com/artifacts/stateMachineDiagram.htm   9
TRANSFORMATION OF THE
STATE MACHINE PACKAGE TO B

   The State Machine package is a sub-
    package of the Behavioral Elements
    package.




                                          10
A CASE STUDY
   Modeling of a printing system.
       This system can be described as follows:
        the printing system is a system to print a file from a
        computer.
       The use gives a command to print a file, and the
        system will respond according to its messages.




    Figure 3. Collaboration diagram of the printing system.

                                                                 11
Interaction B Abstract Machine




                                 12
Verification of UML Model
Properties
   The well-formedness rules of the
    Messages class applied on the
    Collaboration package and their B
    machines counterparts can be
    evaluated for completeness and
    consistency.
       UML well-formedness rules can be
        represented by system invariants.

                                            13
    CONCLUSION
 In this paper, the author’s have presented a
  technique to transform the UML behavioral
  diagrams to a B specification.
 With the contribution of the transformation
  of UML metamodel and their well-
  formedness rules into B, the semantics of
  the UML models can be translated into B
  properties.
 Formal methods can then be used to
  specify and verify object-oriented systems.
                                           14
Additional References

 The B-Book: Assigning Programs to
  Meanings, Cambridge University
  Press 1996. ISBN 0-521-49619-5
 The Object Primer: Agile Model-
  Driven Development with UML 2.0
  Scott Ambler, Cambridge University
  Press, Paperback, 3rd edition, 2004


                                        15

								
To top