Abstract
We present an approach to generate behavioral class interfaces in the form of class contracts from UML 2.0 protocol state machines. A generated class contract defines a pre- and post-condition for each operation that triggers a transition in the state machine. We consider the following protocol SM elements: state and state invariants, simple transitions, compound transitions, high-level transitions, complete transitions, self transitions also deal with the case of firing priorities. The generated contracts can be used as a behavioral interface, for documentation, run-time checking and test case generation.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Evans, A., France, R., Lano, K., Rumpe, B.: Developing the UML as a formal modelling notation. In: Bézivin, J., Muller, P.-A. (eds.) UML 1998. LNCS, vol. 1618, pp. 9–20. Springer, Heidelberg (1999)
UML Revision Task Force. OMG UML Specification 2.2 (2009), http://www.omg.org/spec/UML/2.2/
Cheon, Y.: Automated Random Testing to Detect Specification-Code Inconsistencies. In: Proceedings of the International Conference on Software Engineering Theory and Practice, Orlando, Florida, U.S.A, July 9-12 (2007)
Cheon, Y., Leavens, G.T.: The JML and JUnit Way of Unit Testing and its Implementation. Technical Report 04-02, Department of Computer Science, Iowa State University, Ames, IA (February 2004)
Leitner, A., Ciupa, I., Manuel, O., Meyer, B., Fiva, A.: Contract driven development = test driven development-writing test cases. In: ESEC-FSE 2007: Proceedings of the ACM Symposium on The Foundations of Software Engineering, New York, NY, USA, pp. 425–434 (2007)
Gery, E., Harel, D., Palachi, E.: Rhapsody: A Complete Lifecycle Model-Based Development System. In: Butler, M., Petre, L., Sere, K. (eds.) IFM 2002. LNCS, vol. 2335, pp. 1–10. Springer, Heidelberg (2002)
Mens, T., Gorp, P.V.: A Taxonomy of Model Transformation. In: Proceedings of the International Workshop on Graph and Model Transformation (2005)
Ciupa, I., Leitner, A.: Automatic testing based on Design by Contract. In: Proceedings of Net. ObjectDays 2005, 6th Annual International Conference on Object-Oriented and Internet-based Technologies, Concepts and Applications for a Networked World, pp. 545–557 (2005)
Snook, C., Butler, M.: UML-B: Formal modelling and design aided by UML. ACM Transactions on Software Engineering and Methodology 15(1), 92–122 (2006)
Kim, Y., Honh, H., Cho, S., Bae, D., Cha, S.: Test Cases Generation from UML State Diagrams. IEE Proceedings Software 146, 187–192 (1999)
Sekerinski, E., Zurob, R.: iState: A statechart translator. In: Gogolla, M., Kobryn, C. (eds.) UML 2001. LNCS, vol. 2185, pp. 376–390. Springer, Heidelberg (2001)
Latella, D., Majzik, I., Massink, M.: Automatic Verification of a Behavioural Subset of UML Statechart Diagrams Using the SPIN Model-Checker. Formal Aspects of Computing 11, 637–664 (1999)
Lilius, J., Porres, I.: Formalising UML State Machines for Model Checking. In: France, R.B., Rumpe, B. (eds.) UML 1999. LNCS, vol. 1723, pp. 430–444. Springer, Heidelberg (1999)
Knapp, A., Merz, S., Rauh, C.: Model Checking Timed UML State Machines and Collaborations. In: Damm, W., Olderog, E.-R. (eds.) FTRTFT 2002. LNCS, vol. 2469, pp. 395–414. Springer, Heidelberg (2002)
Briand, L.C., Labiche, Y., Sun, H.: Investigating the Use of Analysis Contracts to Support Fault Isolation in Object Oriented Code. In: ISSTA 2002: Proceedings of the 2002 ACM SIGSOFT International Symposium on Software testing and analysis, pp. 70–80 (2002)
Sekerinski, E.: Graphical design of reactive systems. In: Bert, D. (ed.) B 1998. LNCS, vol. 1393, p. 182. Springer, Heidelberg (1998)
Sekerinski, E.: Verifying Statecharts with State Invariants. In: The Proceedings of the 13th IEEE International Conference on Engineering of Complex Computer Systems, pp. 7–14 (2008)
Meyer, B.: Applying Design by Contract, Computer. IEEE Computer 25, 40–51 (1992)
Ali, S., Briand, L.C., Jaffar-ur Rehman, M., Asghar, H., Iqbal, M.Z., Nadeem, A.: A State-based Approach to Integration Testing for Object-Oriented Programs. Information and Software Technology 49(11-12), 1087–1106 (2007)
Kansomkeat, S., Rivepiboon, W.: Automated-Generating Test Case Using Statechart Diagrams. In: Proceedings of the 2003 annual research conference of the South African institute of computer scientists and information technologists on Enablement through technology, vol. 47, pp. 296–300 (2003)
Van Der Straeten, R.: Inconsistency Management in Model-driven Engineering- An Approach using Description Logics. PhD thesis, Department of Computer Science, Vrije Universiteit Brussel, Belgium (2005)
Benowitz, E., Clark, K., Watney, G.: Auto-coding UML statecharts for flight software. In: SMC-IT 2006: Proceedings of the 2nd IEEE International Conference on Space Mission Challenges for Information Technology, pp. 413–417 (2006)
Leavens, G.T., Baker, A.L., Ruby, C.: JML: a Java modeling language. In: Formal Underpinnings of Java Workshop at OOPSLA 1998 (October 1998)
Niaz, I.A., Tanaka, J.: Mapping Uml Statecharts To Java Code. In: Proceedings of IASTED International Conference on Software Engineering (2004)
Lampinen, J.: Interface specification methods for software components, Publications in the Laboratory for Theoretical Computer Science, Helsinki University of Technology, Department of Information and Computer Science (June 2008)
Flanagan, C., Leino, K.R.M., Lillibridge, M., Nelson, G., Saxe, J.B., Stata, R.: Extended static checking for Java. In: ACM SIGPLAN 2002: Proceedings of the Conference on Programming language design and implementation, Berlin, Germany, June 17-19 (2002)
Abdurazik, A., Offutt, J.: Using UML collaboration diagrams for static checking and test generation. In: Evans, A., Kent, S., Selic, B. (eds.) UML 2000. LNCS, vol. 1939, pp. 383–395. Springer, Heidelberg (2000)
Lohmann, M., Sauer, S., Engels, G.: Executable Visual Contracts. In: VLHCC 2005: Proceedings of the IEEE Symposium on Visual Languages and Human-Centric Computing, pp. 63–70 (2005)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Porres, I., Rauf, I. (2010). Generating Class Contracts from Deterministic UML Protocol Statemachines. In: Ghosh, S. (eds) Models in Software Engineering. MODELS 2009. Lecture Notes in Computer Science, vol 6002. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-12261-3_17
Download citation
DOI: https://doi.org/10.1007/978-3-642-12261-3_17
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-12260-6
Online ISBN: 978-3-642-12261-3
eBook Packages: Computer ScienceComputer Science (R0)