Skip to main content
Log in

Polymorphic scenario-based specification models: semantics and applications

  • Special Section Paper
  • Published:
Software & Systems Modeling Aims and scope Submit manuscript

Abstract

We present polymorphic scenarios, a generalization of a UML2-compliant variant of Damm and Harel’s live sequence charts (LSC) in the context of object-orientation. Polymorphic scenarios are visualized using (modal) sequence diagrams where lifelines may represent classes and interfaces rather than concrete objects. Their semantics takes advantage of inheritance and interface realization to allow the specification of most expressive, succinct, and reusable universal and existential inter-object scenarios for object-oriented system models. We motivate the use of polymorphic scenarios, formally define their trace-based semantics, and present their application for scenario-based testing and execution, as implemented in the S2A compiler developed at the Weizmann Institute of Science. We further discuss advanced semantic issues arising from the use of scenarios in a polymorphic setting, suggest possible extensions, present a UML profile to support polymorphic scenarios, consider the application of the polymorphic semantics to other variants of scenario-based specification languages, and position our work in the broader context of behavioral subtyping.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. AspectJ. http://www.eclipse.org/aspectj/

  2. Tracer Website. http://www.wisdom.weizmann.ac.il/~maozs/tracer/

  3. Atir, Y., Harel, D., Kleinbort, A., Maoz, S.: Object composition in scenario-based programming. In: Fiadeiro, J.L., Inverardi, P. (eds.) Proceedings of the 11th International Conference on Fundamental Approaches to Software Engineering (FASE’08). Lecture Notes in Computer Science, vol. 4961, pp. 301–316. Springer, Berlin (2008)

  4. Baker P., Dai Z., Grabowski J., Haugen Ø., Schieferdecker I., Williams C.: Model-Driven Testing: Using the UML Testing Profile. Springer, Berlin (2008)

    Google Scholar 

  5. Cengarle M.V., Knapp A., Mühlberger H.: Interactions. In: Lano, K. (eds) UML 2 Semantics and Applications, pp. 205–248. Wiley, New York (2009)

    Google Scholar 

  6. Damm W., Harel D.: LSCs: breathing life into message sequence charts. J. Formal Methods Syst. Des. 19(1), 45–80 (2001)

    Article  MATH  Google Scholar 

  7. Ebert, J., Engels, G.: Observable or invocable behaviour—you have to choose! Tech. rep., Universitat Koblenz, Koblenz, Germany (1994)

  8. Ebert, J., Engels, G.: Structural and behavioural views on OMT-classes. In: Bertino, E., Urban, S.D. (eds.) Proceedings of the International Symposium on Object-Oriented Methodologies and Systems (ISOOMS’94). Lecture Notes in Computer Science, vol. 858, pp. 142–157. Springer, Berlin (1994)

  9. Ebert, J., Engels, G.: Specialization of object life cycle definitions. Tech. Rep. 19–95, Koblenz University (1997)

  10. France R.B., Kim D.K., Ghosh S., Song E.: A UML-based pattern specification technique. IEEE Trans. Softw. Eng. 30(3), 193–206 (2004)

    Article  Google Scholar 

  11. Harel D.: From play-in scenarios to code: an achievable dream. IEEE Comput. 34(1), 53–60 (2001)

    Article  MathSciNet  Google Scholar 

  12. Harel, D., Kleinbort, A., Maoz, S.: S2A: a compiler for multi-modal UML sequence diagrams. In: Dwyer, M.B., Lopes, A. (eds.) Proceedings of the 10th International Conference on Fundamental Approaches to Software Engineering (FASE’07). Lecture Notes in Computer Science, vol. 4422, pp. 121–124. Springer, Berlin (2007)

  13. Harel D., Kugler H.: Synthesizing state-based object systems from lsc specifications. Int. J. Found. Comput. Sci. 13(1), 5–51 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  14. Harel D., Kupferman O.: On object systems and behavioral inheritance. IEEE Trans. Softw. Eng. 28(9), 889–903 (2002)

    Article  Google Scholar 

  15. Harel D., Maoz S.: Assert and negate revisited: modal semantics for UML sequence diagrams. Softw. Syst. Modeling (SoSyM) 7(2), 237–252 (2008)

    Article  Google Scholar 

  16. Harel D., Marelly R.: Come, Let’s Play: Scenario-Based Programming Using LSCs and the Play-Engine. Springer, Berlin (2003)

    Google Scholar 

  17. Haugen Ø., Husa K.E., Runde R.K., Stølen K.: STAIRS towards formal design with sequence diagrams. Softw. Syst. Modeling (SoSyM) 4(4), 355–367 (2005)

    Article  Google Scholar 

  18. Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An overview of AspectJ. In: Knudsen, J.L. (ed.) Proceedings of the 15th European Conf. on Object-Oriented Programming (ECOOP’01). Lecture Notes in Computer Science, vol. 2072, pp. 327–353. Springer, Berlin (2001)

  19. Klose, J., Toben, T., Westphal, B., Wittke, H.: Check it out: on the efficient formal verification of live sequence charts. In: Ball, T., Jones, R.B. (eds.) Proceedings of the 18th International Conference on Computer Aided Verification (CAV’06). Lecture Notes in Computer Science, vol. 4144, pp. 219–233. Springer, Berlin (2006)

  20. Klose, J., Wittke, H.: An automata based interpretation of live sequence charts. In: Margaria, T., Yi, W. (eds.) Proceedings of the 7th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS’01). Lecture Notes in Computer Science, vol. 2031, pp. 512–527. Springer, Berlin (2001)

  21. Knapp, A.: A formal semantics for UML interactions. In: France, R.B., Rumpe, B. (eds.) Proceedings of the 2nd International Conference on the Unified Modeling Language (UML’99). Lecture Notes in Computer Science, vol. 1723, pp. 116–130. Springer, Berlin (1999)

  22. Knapp, A., Wuttke, J.: Model checking of UML 2.0 interactions. In: Kühne, T. (ed.) Models in Software Engineering, Workshops and Symposia at MoDELS 2006, Reports and Revised Selected Papers. Lecture Notes in Computer Science, vol. 4364, pp. 42–51. Springer, Berlin (2007)

  23. Krüger, I.: Capturing overlapping, triggered, and preemptive collaborations using MSCs. In: Pezzè, M. (ed.) Proceedings of the 6th International Conference on Fundamental Approaches to Software Engineering. Lecture Notes in Computer Science, vol. 2621, pp.~387–402. Springer, Berlin (2003)

  24. Krüger, I., Grosu, R., Scholz, P., Broy, M.: From MSCs to Statecharts. In: Rammig, F.J. (ed.) International Workshop on Distributed and Parallel Embedded Systems (DIPES’98), IFIP Conf. Proc., vol. 155, pp. 61–72. Kluwer, Dordrecht (1998)

  25. Kugler, H., Harel, D., Pnueli, A., Lu, Y., Bontemps, Y.: Temporal logic for scenario-based specifications. In: Halbwachs, N., Zuck, L.D. (eds.) Proceedings of the 11th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS’05). Lecture Notes in Computer Science, vol. 3440, pp. 445–460. Springer, Berlin (2005)

  26. Kupferman O., Vardi M.Y.: Weak alternating automata are not that weak. ACM Trans. Comput. Log. 2(3), 408–429 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  27. Liskov B., Wing J.M.: A behavioral notion of subtyping. ACM Trans. Program. Lang. Syst. 16(6), 1811–1841 (1994)

    Article  Google Scholar 

  28. Lund, M.S., Stølen, K.: A fully general operational semantics for UML 2.0 sequence diagrams with potential and mandatory choice. In: Misra, J., Nipkow, T., Sekerinski, E. (eds.) Proceedings of the 14th International Symposium on Formal Methods (FM’06). Lecture Notes in Computer Science, vol. 4085, pp. 380–395. Springer, Berlin (2006)

  29. Maoz, S.: Model-based traces. In: Chaudron, M.R.V. (ed.) Models in Software Engineering, Workshops and Symposia at MoDELS 2008, Reports and Revised Selected Papers. Lecture Notes in Computer Science, vol. 5421, pp. 109–119. Springer, Berlin (2009)

  30. Maoz, S.: Polymorphic scenario-based specification models: Semantics and applications. In: Schürr, A., Selic, B. (eds.) Proceedings of the 12th International Conference on Model Driven Engineering Languages and Systems (MoDELS’09). Lecture Notes in Computer Science, vol. 5795, pp. 499–513. Springer, Berlin (2009)

  31. Maoz, S., Harel, D.: From multi-modal scenarios to code: Compiling LSCs into AspectJ. In: Young, M., Devanbu, P.T. (eds.) Proceedings of the 14th International ACM SIGSOFT Symposium on Foundations of Software Engineering (FSE’06), pp. 219–230. ACM, New York (2006)

  32. Maoz, S., Harel, D.: On tracing reactive systems. Softw. Syst. Modeling (SoSyM) (2010). doi:10.1007/s10270-010-0151-2

  33. Maoz, S., Harel, D., Kleinbort, A.: A compiler for multi-modal scenarios: transforming LSCs into AspectJ. ACM Trans. Softw. Eng. Methodol. (2009, accepted)

  34. Maoz, S., Kleinbort, A., Harel, D.: Towards trace visualization and exploration for reactive systems. In: Cox, P., Hosking, J. (eds.) Proceedings of the IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC’07), pp. 153–156. IEEE Computer Society, USA (2007)

  35. Marelly, R., Harel, D., Kugler, H.: Multiple instances and symbolic variables in executable sequence charts. In: Proceedings of the 17th ACM Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA’02), pp. 83–100. ACM, New York (2002)

  36. Meyer B.: Applying “Design by Contract”. IEEE Comput. 25(10), 40–51 (1992)

    Article  Google Scholar 

  37. OMG: UML Testing Profile. http://www.omg.org/docs/formal/05-07-07.pdf (2005)

  38. Roychoudhury, A., Goel, A., Sengupta, B.: Symbolic message sequence charts. In: Crnkovic, I., Bertolino, A. (eds.) Proceedings of the ACM SIGSOFT Symposium on Foundations of Software Engineering (ESEC-FSE’07), pp. 275–284. ACM, New York (2007)

  39. Uchitel S., Kramer J., Magee J.: Synthesis of behavioral models from scenarios. IEEE Trans. Softw. Eng. 29(2), 99–115 (2003)

    Article  Google Scholar 

  40. Westphal, B., Toben, T.: The good, the bad and the ugly: well-formedness of live sequence charts. In: Baresi, L., Heckel, R. (eds.) Proceedings of the 9th International Conference on Fundamental Approaches to Software Engineering (FASE’06). Lecture Notes in Computer Science, vol. 3922, pp. 230–246. Springer, Berlin (2006)

  41. Whittle J., Kwan R., Saboo J.: From scenarios to code: an air traffic control case study. Softw. Syst. Modeling 4(1), 71–93 (2005)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Shahar Maoz.

Additional information

Communicated by Andy Schuerr and Bran Selic.

Preliminary version appeared in MoDELS’09: Proc. ACM/IEEE 12th Int. Conf. on Model Driven Engineering Languages and Systems (October 2009) [30]. This research was supported by The John von Neumann Minerva Center for the Development of Reactive Systems at the Weizmann Institute of Science. In addition, part of this research was funded by an Advanced Research Grant awarded to David Harel of the Weizmann Institute from the European Research Council (ERC) under the European Community’s 7th Framework Programme (FP7/2007–2013). Part of this work was done while the author was a post-doctoral researcher at RWTH Aachen University, Germany.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Maoz, S. Polymorphic scenario-based specification models: semantics and applications. Softw Syst Model 11, 327–345 (2012). https://doi.org/10.1007/s10270-010-0168-6

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10270-010-0168-6

Keywords

Navigation