Skip to main content

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9953))

Included in the following conference series:

Abstract

Advances in programming often revolve around key design patterns, which programming languages embody as new control features. These control features, such as higher-order functions, advice, and context dependence, use indirection to decrease coupling and enhance modularity. However, this indirection makes them difficult to verify, because it hides actions (and their effects) behind an abstraction barrier. Such abstraction barriers can be overcome in a modular way using greybox specification techniques, provided the programming language supports interfaces as a place to record specifications. These techniques have previously allowed specification and modular verification of higher-order functional and object-oriented programs, as well as aspect-oriented and context-oriented programs.

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 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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

Notes

  1. 1.

    This copying can be used repeatedly if the model program contains recursive calls. In general the substitution of actuals for formals may need to rename locals to avoid capture.

  2. 2.

    Which handlers are invoked is implicit in implicit invocation languages, but where they are invoked from is evident in the source code. See Sanchez and Leavens’s paper [31] for a general discussion of the reasoning tradeoffs involved.

  3. 3.

    See http://web.cs.iastate.edu/~ptolemy/ for details about PtolemyJ.

References

  1. Ambler, A.L., Good, D.I., Browne, J.C., Burger, W.F., Choen, R.M., Hoch, C.G., Wells, R.E.: Gypsy: a language for specification and implementation of verifiable programs. In: Proceedings of the ACM Conference on Language Design for Reliable Software (1977)

    Google Scholar 

  2. Aotani, T., Leavens, G.T.: Towards modular reasoning for context-oriented programs. In: Formal Techniques for Java-like Programs, July 2016 (to appear)

    Google Scholar 

  3. Appel, A.W.: Program Logics - for Certified Compilers. Cambridge University Press, Cambridge (2014)

    Book  MATH  Google Scholar 

  4. Appeltauer, M., Hirschfeld, R., Linckeb, J.: Declarative layer composition with the JCop programming language. J. Object Technol. 12(2), 4:1–4:37 (2013)

    Article  Google Scholar 

  5. Back, R.-J., von Wright, J.: Refinement Calculus: A Systematic Introduction. Graduate Texts in Computer Science. Springer, New York (1998)

    Book  MATH  Google Scholar 

  6. Bagherzadeh, M., Leavens, G.T., Dyer, R.: Applying translucid contracts for modular reasoning about aspect andobject oriented events. In: 10th International Workshop on Foundations of Aspect-Oriented Languages (2011a)

    Google Scholar 

  7. Bagherzadeh, M., Rajan, H., Leavens, G.T., Mooney, S.: Translucid contracts: expressive specification and modularverification for aspect-oriented interfaces. In: 10th International Conference on Aspect-Oriented Software Development (2011b)

    Google Scholar 

  8. Bagherzadeh, M., Rajan, H., Darvish, A.: On exceptions, events and observer chains. In: 12th International Conference on Aspect-Oriented Software Development (2013)

    Google Scholar 

  9. Bagherzadeh, M., Dyer, R., Fernando, R.D., Sanchez, J., Rajan, H.: Modular reasoning in the presence of event subtyping. In: 14th International Conference on Modularity (2015)

    Google Scholar 

  10. Barnett, M., Schulte, W.: Runtime verification of.NET contracts. J. Syst. Softw. 65(3), 199–208 (2003)

    Article  Google Scholar 

  11. Büchi, M., Weck, W.: The greybox approach: when blackbox specifications hide too much. Technical Report 297, Turku Center for Computer Science (1999)

    Google Scholar 

  12. Damm, W., Josko, B.: A sound and relatively complete Hoare-logic for a language with higher type procedures. Acta Informatica 20(1), 59–101 (1983)

    Article  MathSciNet  MATH  Google Scholar 

  13. Ernst, G.W., Navlakha, J.K., Ogden, W.F.: Verification of programs with procedure-type parameters. Acta Informatica 18(2), 149–169 (1982)

    Article  MathSciNet  MATH  Google Scholar 

  14. Findler, R.B., Felleisen, M.: Contracts for higher-order functions. In: ACM International Conference on Functional Programming (2002)

    Google Scholar 

  15. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1995)

    MATH  Google Scholar 

  16. Guttag, J.V., Horning, J.J.: A tutorial on Larch and LCL, a Larch/C interface language. In: Prehn, S., Toetenel, H. (eds.) VDM 1991. LNCS, vol. 552, pp. 1–78. Springer, Heidelberg (1991). doi:10.1007/BFb0019995

    Chapter  Google Scholar 

  17. Hirschfeld, R., Costanza, P., Nierstrasz, O.: Context-oriented programming. J. Object Technol. 7(3), 125–151 (2008)

    Article  Google Scholar 

  18. Hoare, C.A.R.: An axiomatic basis for computer programming. Commun. ACM 12(10), 576–580 (1969)

    Article  MATH  Google Scholar 

  19. Jones, C.B.: Systematic Software Development Using VDM. Prentice-Hall, Englewood Cliffs (1986)

    MATH  Google Scholar 

  20. Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C., Loingtier, J.-M., Irwin, J.: Aspect-oriented programming. In: Akşit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997). doi:10.1007/BFb0053381

    Google Scholar 

  21. Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An overview of AspectJ. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–354. Springer, Heidelberg (2001). doi:10.1007/3-540-45337-7_18

    Chapter  Google Scholar 

  22. Krishnaswami, N.R., Aldrich, J., Birkedal, L., Svendsen, K., Buisse, A.: Design patterns in separation logic. In: International Workshop on Types in Languages Design and Implementation (2009)

    Google Scholar 

  23. Meyer, B.: Applying ‘design by contract’. Computer 25(10), 40–51 (1992)

    Article  Google Scholar 

  24. Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice Hall, Upper Saddle River (1997)

    MATH  Google Scholar 

  25. Morgan, C.: Procedures, parameters, abstraction: separate concerns. Sci. Comput. Program. 11(1), 17–27 (1988)

    Article  MathSciNet  MATH  Google Scholar 

  26. Morgan, C.: Programming from Specifications, 2nd edn. Prentice Hall, Hertfordshire (1994)

    MATH  Google Scholar 

  27. Naumann, D.A.: Predicate transformers and higher order programs. Theor. Comput. Sci. 150, 111–159 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  28. Rajan, H., Leavens, G.T.: Quantified, typed events for improved separation of concerns. Technical Report 07-14c, Iowa State University, Department of Computer Science, October 2007. ftp://ftp.cs.iastate.edu/pub/techreports/TR07-14/TR.pdf

  29. Rajan, H., Leavens, G.T.: Ptolemy: a language with quantified, typed events. In: Vitek, J. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 155–179. Springer, Heidelberg (2008). doi:10.1007/978-3-540-70592-5_8

    Chapter  Google Scholar 

  30. Rajan, H., Tao, J., Shaner, S., Leavens, G.T.: Tisa: a language design and modular verification technique for temporal policies in web services. In: Castagna, G. (ed.) ESOP 2009. LNCS, vol. 5502, pp. 333–347. Springer, Heidelberg (2009). doi:10.1007/978-3-642-00590-9_24

    Chapter  Google Scholar 

  31. Sánchez, J., Leavens, G.T.: Reasoning tradeoffs in languages with enhanced modularity features. In: 15th International Conference on Modularity (2016)

    Google Scholar 

  32. Shaner, S., Rajan, H., Leavens, G.T.: Model programs for preserving composite invariants. In: 7th International Workshop on Specification and Verification of Component-Based Systems, Technical report CS-TR-08-07, University of Central Florida (2008)

    Google Scholar 

  33. Shaner, S.M., Leavens, G.T., Naumann, D.A.: Modular verification of higher-order methods with mandatory calls specified by model programs. In: International Conference on Object-Oriented Programming, Systems, Languages and Applications (2007)

    Google Scholar 

  34. Soundarajan, N., Fridella, S.: Incremental reasoning for object oriented systems. In: Owe, O., Krogdahl, S., Lyche, T. (eds.) From Object-Orientation to Formal Methods. LNCS, vol. 2635, pp. 302–333. Springer, Heidelberg (2004). doi:10.1007/978-3-540-39993-3_15

    Chapter  Google Scholar 

  35. Wing, J.M.: Writing Larch interface language specifications. ACM Trans. Prog. Lang. Syst. 9(1), 1–24 (1987)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgments

Thanks to Luke Meyers and Klaus Havelund for comments on an earlier draft. Special thanks to Steve Shaner, who co-developed the theory behind this paper with Leavens and Naumann [33]. Thanks to Mehdi Bagherzadeh and Jose Sanchez, who helped us apply greybox specification techniques to Ptolemy and AspectJ. The work of Leavens was supported in part by US NSF grants CNS1228695 and CCF1518897. The work of Naumann was supported in part by NSF CNS 1228930. The work of Rajan was supported in part by NSF grants CCF-15-18897, CNS-15-13263, CCF-14-23370, CCF-11-17937, and CCF-08-46059. The work of Aotani was supported by the Core Research for Evolutional Science and Technology (CREST) Program, “Software development for post petascale supercomputing — Modularity for supercomputing” by the Japan Science and Technology Agency.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Gary T. Leavens .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing AG

About this paper

Cite this paper

Leavens, G.T., Naumann, D., Rajan, H., Aotani, T. (2016). Specifying and Verifying Advanced Control Features. In: Margaria, T., Steffen, B. (eds) Leveraging Applications of Formal Methods, Verification and Validation: Discussion, Dissemination, Applications. ISoLA 2016. Lecture Notes in Computer Science(), vol 9953. Springer, Cham. https://doi.org/10.1007/978-3-319-47169-3_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-47169-3_7

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-47168-6

  • Online ISBN: 978-3-319-47169-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics