160 likes | 260 Views
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 ….
E N D
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 ComputingSanta 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.
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.
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.
The UML Metamodel • The UML metamodel defines the complete semantics for representing object models using UML. • Abstract Syntax • Well-Formedness Rules • Semantics
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:
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.
UML Collaboration Diagram • UML collaboration diagrams, are used to explore the dynamic nature of your software. Source: http://www.agilemodeling.com/style/collaborationDiagram.htm
TRANSFORMATION OF THE COLLABORATION PACKAGE TO B • The Collaboration package is a sub-package of the Behavioral Elements package
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
TRANSFORMATION OF THE STATE MACHINE PACKAGE TO B • The State Machine package is a sub-package of the Behavioral Elements package.
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.
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.
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.
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.0Scott Ambler, Cambridge University Press, Paperback, 3rd edition, 2004