On Integrating Structure and Behavior Modeling with OCL [chapter]

Lars Hamann, Oliver Hofrichter, Martin Gogolla
2012 Lecture Notes in Computer Science  
Precise modeling with UML and OCL traditionally focuses on structural model features like class invariants. OCL also allows the developer to handle behavioral aspects in form of operation pre-and postconditions. However, behavioral UML models like statecharts have rarely been integrated into UML and OCL modeling tools. This paper discusses an approach that combines precise structure and behavior modeling: Class diagrams together with class invariants restrict the model structure and protocol
more » ... te machines constrain the model behavior. Protocol state machines can take advantage of OCL in form of OCL state invariants and OCL guards and postconditions for state transitions. Protocol state machines can cover complete object lifecycles in contrast to operation pre-and postconditions which only affect single operation calls. The paper reports on the chosen UML language features and their implementation in a UML and OCL validation and verification tool.
doi:10.1007/978-3-642-33666-9_16 fatcat:bxxjr54ggbf7lbzzadoug2tqca