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
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Johnson, R.E.: Frameworks = (components + patterns). Commun. ACM 40 (1997)
Jaspan, C., Aldrich, J.: Checking semantic usage of frameworks. In: Proc. of the symposium on Library Centric Software Design (2007)
Fowler, M.: Inversion of control containers and the dependency injection pattern (2004), http://www.martinfowler.com/articles/injection.html
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)
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)
Liskov, B.H., Wing, J.M.: A behavioral notion of subtyping. ACM Trans. Program. Lang. Syst. 16(6), 1811–1841 (1994)
Parkinson, M.J., Bierman, G.M.: Separation logic, abstraction and inheritance. In: Proc. of the symposium on Principles of Programming Languages (2008)
Dhara, K.K., Leavens, G.T.: Forcing behavioral subtyping through specification inheritance. In: Proc. of the International Conference on Software Engineering (1996)
DeLine, R., Fähndrich, M.: Typestates for objects. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 465–490. Springer, Heidelberg (2004)
Kuncak, V., Lam, P., Zee, K., Rinard, M.: Modular Pluggable Analyses for Data Structure Consistency. IEEE Trans. Softw. Eng. 32(12) (2006)
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)
Bierhoff, K., Aldrich, J.: Modular typestate checking of aliased objects. In: Proc. of the Conference on Object Oriented Programming, Systems, Languages, and Applications (2007)
Walker, R.J., Viggers, K.: Implementing Protocols via Declarative Event Patterns. In: Proc. of the symposium on Foundations of Software Engineering (2004)
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)
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)
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)
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)
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)
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)
Sagiv, M., Reps, T., Wilhelm, R.: Parametric shape analysis via 3-valued logic. ACM Trans. Program. Lang. Syst. 24(3), 217–298 (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)