320 likes | 338 Views
Formalization of UML. Muhammad Zouhaib Zafar. Objectives. Analytical View of existing UML Formalization Techniques Utilization of UML in Rigorous Development of Safety Critical Systems. Formal Methods. Set of mathematical notations
E N D
Formalization of UML Muhammad Zouhaib Zafar Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Objectives • Analytical View of existing UML Formalization Techniques • Utilization of UML in Rigorous Development of Safety Critical Systems Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Formal Methods • Set of mathematical notations • Helps sorting out misconceptions, ambiguities, errors in analysis of system being developed • Precision in syntax and semantics Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Formal Methods • Have been in market for decades • Conceived by people as being complex and difficult • Industry always reluctant of mathematical notations • Industry welcomes pictorial and graphical notations Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Unified Modeling Language • UML: OO Analysis and Design Technique • Why UML? • UML is user friendly and is simple in constructs. • Provides a way of communication between developer and client. • Has become most widely accepted approach • Has a rich set of graphical and pictorial notations • Helpful in increasing the understandability of the system Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Why Formalize UML? • Easier for industry to extend its current development techniques to introduce formalization than to completely employ formal method notations • Basis of research • To find out the most effective solution of using formal methods, without the introduction of complex constructs, which would provide an abstraction from the intricate mathematical notations Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Why Formalize UML? • A lot of myths associated with Formal Methods • These myths have been proven wrong • In fact Formal methods are very useful in the development. • Still not used widely. • Reasons • lack of expertise • an unavailability of a lot of case studies • difficulty in learning and representation • the involvement of mathematical and logical notations • always difficult to translate the real word concepts to mathematical expressions. • Fortunately UML has none of the above stated problems; therefore it is a natural choice to use formal methods in pair with UML to form an absolute blend. Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Benefits of such a technique • Ensure the use of formalization in development • Pave the way for industry acceptance of formal techniques of development • Increase the quality of the software being developed. • Help avoid faults, and avoid errors in specifications or design in system being developed Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Existing Formalization Techniques • Supplemental • OO Extended Formal Language • Methods Integration or Semantic Integration Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Supplemental • Replaces informal constructs of modeling technique with formal ones • Mostly work on substituting natural language portions with formal language • This approach allows much of the formal complexity to be hidden from user. An example of such an approach is Syntropy, OCL. Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
OO Extended Formal Language • Confined to the extension of general formal languages to object oriented formal language. • Example: • Extension of Z formal specification language to Object-Z and Z++ , VDM to VDM++ • Promoted the development of object oriented systems with the use of formal methods • Draw Back: • non user friendliness • complexity • extra time consumption • A large set of complex notations Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Method Integration • Semantic Integration or Model Integration • Most widely worked upon • a formal mapping is introduced between the object oriented modeling notations a formal specification language • Example: • Converting OO Model to Z, Object-Z etc Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Method Integration for UML • For Unified Modeling language, work has been performed on integration with formal specification languages like Z, B[28] and PVS[2]. • For each of the approach, a mapping is provided from the UML constructs to the formal language. • [9] has also put forward the idea to use theories for representation of classes. It also provides methodology to translate association and inheritance concept Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Problems With Current Formalization Techniques • Difficult constructs: • no easier than learning and using the formal methods themselves. • A large gap between formal and informal models: • knowledge of analyst required during conversion • Implies a lot of human intervention • Requires a person expert in formal and informal techniques • Automation still a far cry Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Problems with formalization techniques • A large number of defined mappings. • This result has diminished any hopes of theoretical conversion technique to become a reality. • After the conversion the resultant is set of mathematical notations in a formal language, but one of our basic aims was to avoid the use of discrete mathematic notations which are complex and difficult in understanding Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Problems with formalization Techniques • Effort involve in method integration is almost equal to the effort involve in using formal methods • With use of the method integration approach we uncovered errors, but it was too late • After which whole design or analysis effort has to be revised Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Solution • Conversion rules to be defined for each UML artifact • a combination of those conversions should be performed throughout the development process. • The idea is appealing, but if we were to convert each artifact to its corresponding formal language then why shouldn’t we adopt for formal methods as whole. • So the solution is again not practical. Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Problems with formalization Techniques • If at all the approaches were as useful as advocated, they should not had been facing the same response from software industry as that to formal methods themselves. • The basic reason behind this all is the complexity and involvement of discrete mathematics notations in the formal methods from which the developers are mostly introverted. Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Convergence Approach • Meta-model integration technique • Aim of this approach is to extend the Unified Modeling Language to include formalism in it • The approach considers the options to develop UML as a formal language itself Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
pUML Group • pUML group is working on the idea of making UML semantics precise enough so that UML would itself be treated as a formal language • The group's emphasis is on formal definition of the semantics of each UML construct into a formal language. Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Other convergent proposals • Research has provided meanings of different UML constructs in Object-Z in an effort to define UML meta model formally and precisely • A formal semantics for UML construct of collaboration between classes, use-cases and generalization of collaborations, to achieve soundness and completeness in system specification Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Convergent Approach • Convergent approach is the approach closest to the ideal formalization of UML. • The idea is at its infancy and needs much more work by the researchers to be a workable technique. • UML semantics have been modified in the UML version 2.0 in light of the proposals by the pUML group Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Verification of Formalized UML • a very little has been put forward on performing one of the basic aims of using formal methods: the verification process through UML • formal specification languages can apply the theorem proving and other verification techniques, • when the UML is claimed to be a formal language, it must have a precise way of applying verification techniques. Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Verification of formalized UML • After use of Method Integration Approach.. • Model has been converted to a formal language • Formal verification can be performed on the specification language Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Verification of formalized UML –Convergent Approach • Not a lot of formal verification techniques • [20] presents a transformation form one Class Diagram in a UML Model to another class diagram, where the latter diagram includes certain proof of the earlier • A set of rules of inference, along with the rules of promotion and demotion of association are followed during each transformation. Through continuous transformations a complete proof of class diagram is achieved. Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Formalizing UML • UML must always remain free from complex structures or mathematical notations • OCL can be used along with the formalized UML to include constraints in the models. • OCL is not mathematical • This point should be considered as positive rather than negative. • The UML models should only have constraints applied in a logical form rather than mathematical form. • Proposals for formalizing OCL as a constraint language have also been provided in [27]. Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Future Directions • We are planning to work on the following issues: • Provide a framework for the verification strategy proposed • To work on formalizing the extensions of current notations, stereo types, and inclusion of time constraints in the formalized UML for its use in safety critical systems Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
Questions ? Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
References • [1] Claudia Pons, Gabriel Baum, Formal foundations of Object Oriented Modeling Notations • [2] Demissie B. Aredo, Issa Traore, Ketil Stolen, Towards a Formalization of UML Class Constructs in PVS • [3]K. Lano, and H. Haughton: The Z++ Manual, Technical Report, Imperial College, 1994. • [4] E.H. Durr, N. Plat, VDM++ Language Reference Manual, Afrodite (ESPRIT-III project number 6500) document AFRO/CG/ED/LRM/V10, cap Volmac, February 1995. • [5] G. Booch, J. Rambaugh and I. Jacobson, The Unified Modeling Language User Guide, Addison-Wesley, October 1998 • [6] P. Moura, R. Borges, A. Mota, Experimenting Formal Methods through UML • [7] Ali Hamie, John Howse, Stuart Kent, Richard Mitchell, Franco Civello. A Formal Semantics for Checking and Analysing UML Models Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
References • [8] R. Duarte, J. Junior, A.Mota, Precise Modelling with UML: Why OCL? • [9] A. Evans, Rigorous Development in UML • [10] Soon-Kyeong Kim, David Carrington, A Formal Mapping between UML Models and Object-Z Specifications • [11] A. Evans, J.M Bruel, R. France, K. Lano, B. Rumpe, Making UML Precise • [12] A. Evans, R. France, K. Lano, B. Rumpe, Developing the UML as a Formal Modelling Notation • [13] Robert B. France, Jean Michel Bruel, Integrated Informal Object- Oriented and Formal Modelling Techniques • [14] Jean Michel Bruel, Robert B France, Transforming UML Models to Formal Spcifications Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
References • [15] R. France, A. Evans, K. Lano, B. Rumpe The UML as a Formal Modeling Notation • [16] R.B. France, J.M. Bruel, A. Evans, Towards a framework for the Development of Precise Semantics for the UML • [17] Jan Jurjens, Developing Safety-Critical Systems with UML • [18] Colin J. Neil, Minimizing the Impact of adding a Formal Method to the UML • [19] Wolfgang Ahrendt, Thomas Baar, Bernhard Beckert, Martin Giese, Reiner Hahnle, Wolfram Menzel, Wojciech Nostowskim and Peter H. Schmitt, The Key System: Integrating Object Oriented Design and Formal Methods • [20] Andy Evans, Robert B. France, and Emanuel S. Grant, Towards formal reasoning with UML Models • [21] Gunnar Overgaard, A Formal Approach to Collaborations in the Unified Modeling Language Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus
References • [22] Edjard Mota, Edmund Clarke, Alex Groce, Waleska Oliveira, Marcia Falcao, Jorge Kanda, VeriAgent: an Approach to Integrating UML and Formal Verification Tools • [23] M. Dal Cin, Extending UML towards a useful OO-language for Modeling Dependability Features • [24] Jonathan Bowen, Victoria Stavridou, Safety-Critical System, Formal Methods and Standards • [25] Nicolas Guelfo, Olivier Biberstein, Didier Buchs, Ercument Canver, Marie- Claude Gaudel, Friedrich von Henke, and Detlef Shwier; Comparison of Object-Oriented Formal Methods • [26] Sabin Kuske, Martin Gogolla, Ralf Kollman, Hans-Jorg Krewoski , An Integrated Semantics for UML Class, Object and State Diagrams based on Graph Transformations • [27] Mark Richters, Martin Gogolla, On Formalizing the UML Object Constraint Language OCL • [28] Regin Laleau and Fiona Polack, Coming and going from UML to B: a proposal to support traceability in rigorous IS Development Center for Software Dependability, Mohammad Ali Jinnah University, Islamabad Campus