Skip to main content

Design Assertions: Executable Assertions for Design Constraints

  • Conference paper
  • First Online:
Computational Science and Its Applications – ICCSA 2022 Workshops (ICCSA 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13381))

Included in the following conference series:

Abstract

An assertion is a Boolean expression embedded in a program that must hold during the execution. Executable assertions are a simple but practical way to check assumptions and code logic at runtime. Assertions are written by referring to concrete program states. In this paper, we recognize a variety of assertions that we call design assertions. These are assertions written to ensure design constraints and properties, not detailed implementation decisions, and thus can detect major problems in the implementation such as design drift or corrosion. However, they are written by referring to concrete program states, thus causing readability and maintenance problems. To address these problems, we propose to write design constraints at a higher abstraction level by referring to abstract program states. We explain our approach using the Dart/Flutter platform, but it should work in other languages and platforms with similar assertion facilities.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 99.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 129.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Avila, C., Flores, G., Cheon, Y.: A library-based approach to translating OCL constraints to JML assertions for runtime checking. In: International Conference on Software Engineering Research and Practice, Las Vegas, Nevada, 14–17 July, pp. 403–408 (2008)

    Google Scholar 

  2. Avila, C., Sarcar, A., Cheon, Y., Yeep, C.: Runtime constraint checking approaches for OCL, a critical comparison, In: International Conference on Software Engineering and Knowledge Engineering, 1–3 July, San Francisco, CA, pp. 393–398 (2010)

    Google Scholar 

  3. Borgida, A., Mylopoulos, J., Reiter, R.: ‘. . . and nothing else changes’: the frame problem in procedure specifications. In: Proceedings of 1993 15th International Conference on Software Engineering, pp. 303–314. IEEE (1993)

    Google Scholar 

  4. Bracha, G.: The Dart Programming Language. Addison-Wesley, Boston (2016)

    Google Scholar 

  5. Briand, L., Dzidek, W., Labiche, Y.: Instrumenting contracts with aspect-oriented programming to increase observability and support debugging. In: International Conference on Software Maintenance, Budapest, Hungary, 25–30 September, pp. 687–690. IEEE (2005)

    Google Scholar 

  6. Chalin, P.: Ensuring that your dart will hit the mark: an introduction to dart contracts. In: International Conference on Information Reuse and Integration, Redwood City, CA, 13–15 August, pp. 369–377. IEEE (2014)

    Google Scholar 

  7. Cheon, Y.: Toward more effective use of assertions for mobile app development. In: International Conference on Progress in Informatics and Computing, Shanghai, China, 17–19 December, pp. 319–323. IEEE (2021)

    Google Scholar 

  8. Cheon, Y., Avila, C., Roach, S., Munoz, C.: Checking design constraints at run-time using OCL and AspectJ. Int. J. Softw. Eng. 2(3), 5–28 (2009)

    Google Scholar 

  9. Cheon, Y., Leavens, T., Sitaraman, M., Edwards, S.: Model variables: cleanly supporting abstraction in design by contract. Softw. Pract. Exp. 35(6), 583–599 (2005)

    Google Scholar 

  10. Flutter Homepage. https://flutter.dev/. Accessed 6 Nov 2021

  11. Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley, Boston (1999)

    Google Scholar 

  12. Hamie, A.: Translating the object constraint language into the java modeling language. In: ACM Symposium on Applied Computing, Nicosia, Cyprus, 14–17 March, pp. 1531–1535. ACM (2004)

    Google Scholar 

  13. Leavens, G., Cheon, Y., Clifton, C., Ruby, C., Cok, D.: How the design of JML accommodates both runtime assertion checking and formal verification. Sci. Comput. Program. 55(1–3), 185–208 (2005)

    Article  MathSciNet  Google Scholar 

  14. Perry, D., Wolf, A.: Foundations for the study of software architecture. ACM SIGSOFT Softw. Eng. Notes 17(4), 40–52 (1992)

    Article  Google Scholar 

  15. Richters, M., Gogolla, M.: Aspect-oriented monitoring of UML and OCL constraints. In: AOSD Modeling with UML Workshop, San Francisco, CA, 20 October 2003 (2003)

    Google Scholar 

  16. Spivey, S.: The Z Notation: A Reference Manual. Prentice Hall, Hoboken (1992)

    Google Scholar 

  17. Warmer, J., Kleppe, A.: The Object Constraint Language: Getting Your Models Ready for MDA, 2nd edn. Addison-Wesley, Hoboken (2003)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yoonsik Cheon .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Cheon, Y. (2022). Design Assertions: Executable Assertions for Design Constraints. In: Gervasi, O., Murgante, B., Misra, S., Rocha, A.M.A.C., Garau, C. (eds) Computational Science and Its Applications – ICCSA 2022 Workshops. ICCSA 2022. Lecture Notes in Computer Science, vol 13381. Springer, Cham. https://doi.org/10.1007/978-3-031-10548-7_45

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-10548-7_45

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-10547-0

  • Online ISBN: 978-3-031-10548-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics