Skip to main content

Checking Framework Interactions with Relationships

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5653))

Abstract

Software frameworks impose constraints on how plugins may interact with them. Many of these constraints involve multiple objects, are temporal, and depend on runtime values. Additionally, they are difficult to specify because they are often extrinsic and may break behavioral subtyping. This work introduces relationships as an abstraction for specifying framework constraints in FUSION (Framework Usage SpecificatIONs), and it presents a formal description and implementation of a static analysis to find constraint violations in plugin code. We define three variants of this analysis: one is sound, one is complete, and a pragmatic variant that balances these tradeoffs. We prove soundness and completeness for the appropriate variants, and we show that the pragmatic variant can effectively check constraints from real-world programs.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Johnson, R.E.: Frameworks = (components + patterns). Commun. ACM 40 (1997)

    Google Scholar 

  2. Jaspan, C., Aldrich, J.: Checking semantic usage of frameworks. In: Proc. of the symposium on Library Centric Software Design (2007)

    Google Scholar 

  3. Fowler, M.: Inversion of control containers and the dependency injection pattern (2004), http://www.martinfowler.com/articles/injection.html

  4. Leavens, G.T., Baker, A.L., Ruby, C.: Preliminary design of JML: a behavioral interface specification language for Java. SIGSOFT Softw. Eng. Notes 31(3) (2006)

    Google Scholar 

  5. Jaspan, C., Aldrich, J.: Checking framework interactions with relationships: Extended. Technical Report CMU-ISR-140-08, Institute for Software Research, Carnegie Mellon University (December 2008)

    Google Scholar 

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

    Article  Google Scholar 

  7. Parkinson, M.J., Bierman, G.M.: Separation logic, abstraction and inheritance. In: Proc. of the symposium on Principles of Programming Languages (2008)

    Google Scholar 

  8. Dhara, K.K., Leavens, G.T.: Forcing behavioral subtyping through specification inheritance. In: Proc. of the International Conference on Software Engineering (1996)

    Google Scholar 

  9. DeLine, R., Fähndrich, M.: Typestates for objects. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 465–490. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  10. Kuncak, V., Lam, P., Zee, K., Rinard, M.: Modular Pluggable Analyses for Data Structure Consistency. IEEE Trans. Softw. Eng. 32(12) (2006)

    Google Scholar 

  11. Nanda, M.G., Grothoff, C., Chandra, S.: Deriving object typestates in the presence of inter-object references. In: Proc. of the Conference on Object Oriented Programming, Systems, Languages, and Applications (2005)

    Google Scholar 

  12. Bierhoff, K., Aldrich, J.: Modular typestate checking of aliased objects. In: Proc. of the Conference on Object Oriented Programming, Systems, Languages, and Applications (2007)

    Google Scholar 

  13. Walker, R.J., Viggers, K.: Implementing Protocols via Declarative Event Patterns. In: Proc. of the symposium on Foundations of Software Engineering (2004)

    Google Scholar 

  14. Bodden, E., Hendren, L., Lhoták, O.: A staged static program analysis to improve the performance of runtime monitoring. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 525–549. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  15. Bodden, E., Lam, P., Hendren, L.: Finding programming errors earlier by evaluating runtime monitors ahead-of-time. In: Proc. of the symposium on Foundations of Software Engineering (2008)

    Google Scholar 

  16. Naeem, N.A., Lhoták, O.: Typestate-like analysis of multiple interacting objects. In: Proc. of the Conference on Object Oriented Programming, Systems, Languages, and Applications (2008)

    Google Scholar 

  17. Bierman, G., Wren, A.: First-class relationships in an object-oriented language. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 262–286. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  18. Balzer, S., Gross, T., Eugster, P.: A relational model of object collaborations and its use in reasoning about relationships. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 323–346. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  19. Helm, R., Holland, I.M., Gangopadhyay, D.: Contracts: specifying behavioral compositions in object-oriented systems. In: Proc. of the Conference on Object Oriented Programming, Systems, Languages, and Applications (1990)

    Google Scholar 

  20. Sagiv, M., Reps, T., Wilhelm, R.: Parametric shape analysis via 3-valued logic. ACM Trans. Program. Lang. Syst. 24(3), 217–298 (2002)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2009 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Jaspan, C., Aldrich, J. (2009). Checking Framework Interactions with Relationships. In: Drossopoulou, S. (eds) ECOOP 2009 – Object-Oriented Programming. ECOOP 2009. Lecture Notes in Computer Science, vol 5653. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-03013-0_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-03013-0_3

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-03012-3

  • Online ISBN: 978-3-642-03013-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics