Skip to main content
Log in

Types and trace effects for object orientation

  • Published:
Higher-Order and Symbolic Computation

Abstract

Trace effects are statically generated program abstractions, that can be model checked for verification of assertions in a temporal program logic. In this paper we develop a type and effect analysis for obtaining trace effects of Object Oriented programs in Featherweight Java. We observe that the analysis is significantly complicated by the interaction of trace behavior with inheritance and other Object Oriented features, particularly overridden methods, dynamic dispatch, and downcasting. We propose an expressive type and effect inference algorithm combining polymorphism and subtyping/subeffecting constraints to obtain a flexible trace effect analysis in this setting, and show how these techniques are applicable to Object Oriented features. We also extend the basic language model with exceptions and stack-based event contexts, and show how trace effects scale to these extensions by structural transformations.

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. Abadi, M., Fournet, C.: Access control based on execution history. In: Proceedings of the 10th Annual Network and Distributed System Security Symposium (NDSS’03) (2003)

  2. Alur, R., Cerny, P., Madhusudan, P., Nam, W.: Synthesis of interface specifications for java classes. In: POPL ’05: Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 98–109. ACM Press (2005)

  3. Amtoft, T., Nielson, F., Nielson, H.R.: Type and Effect Systems. Imperial College Press (1999)

  4. Ball, T., Rajamani, S.K.: Bebop: A symbolic model checker for boolean programs. In: SPIN, pp. 113–130 (2000)

  5. Bartoletti, M., Degano, P., Ferrari, G.L.: Enforcing secure service composition. In: CSFW, pp. 211–223. IEEE Computer Society (2005)

  6. Bartoletti, M., Degano, P., Ferrari, G.L.: History-based access control with local policies. In: Sassone, V. (ed.) FoSSaCS. Lecture Notes in Computer Science, vol. 3441, pp. 316–332. Springer, Berlin (2005)

    Google Scholar 

  7. Bartoletti, M., Degano, P., Ferrari, G.L.: Policy framings for access control. In: WITS ’05: Proceedings of the 2005 Workshop on Issues in the Theory of Security, pp. 5–11. ACM Press (2005)

  8. Besson, F., Jensen, T., Le Métayer, D., Thorn, T.: Model checking security properties of control flow graphs. J. Comput. Secur. 9, 217–250 (2001)

    Google Scholar 

  9. Besson, F., de Grenier de Latour, T., Jensen, T.: Secure calling contexts for stack inspection. In: Proceedings of the Fourth ACM SIGPLAN Conference on Principles and Practice of Declarative Programming (PPDP’02), pp. 76–87. ACM Press (2002)

  10. Bruce, K.B., Cardelli, L., Castagna, G., Eifrig, J., Smith, S.F., Trifonov, V., Leavens, G.T., Pierce, B.C.: On binary methods. Theory Pract. Object Syst. 1(3), 221–242 (1995)

    Google Scholar 

  11. Burkart, O., Caucal, D., Moller, F., Steffen, B.: Verification on infinite structures. In: Smolka, S., Bergstra, J., Pons, A. (eds.) Handbook on Process Algebra. North-Holland, Amsterdam (2001)

    Google Scholar 

  12. Cartwright, R., Fagan, M.: Soft typing. In: Proceedings of the ACM SIGPLAN 1991 Conference on Programming Language Design and Implementation, pp. 278–292. ACM Press (1991)

  13. Chen, H., Wagner, D.: MOPS: an infrastructure for examining security properties of software. In: Proceedings of the 9th ACM Conference on Computer and Communications Security, pp. 235–244, Washington, DC, November 18–22, 2002

  14. Colcombet, T., Fradet, P.: Enforcing trace properties by program transformation. In: 27th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 54–66 (2000)

  15. Damas, L., Milner, R.: Principal type-schemes for functional programs. In: ACM Symposium on Principles of Programming Languages (POPL), pp. 207–212 (1982)

  16. Edjlali, G., Acharya, A., Chaudhary, V.: History-based access control for mobile code. In: ACM Conference on Computer and Communications Security, pp. 38–48 (1998)

  17. Eifrig, J., Smith, S., Trifonov, V.: Type inference for recursively constrained types and its application to OOP. In: Mathematical Foundations of Programming Semantics. Electronic Notes in Theoretical Computer Science, vol. 1. Elsevier Science, Amsterdam (1995)

    Google Scholar 

  18. Esparza, J., Kucera, A., Schwoon, S.: Model-checking LTL with regular valuations for pushdown systems. In: TACS: 4th International Conference on Theoretical Aspects of Computer Software (2001)

  19. Foster, J.S., Terauchi, T., Aiken, A.: Flow-sensitive type qualifiers. In: Proceedings of the 2002 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 1–12, Berlin, Germany, June 2002

  20. Gong, L., Mueller, M., Prafullchandra, H., Schemers, R.: Going beyond the sandbox: An overview of the new security architecture in the Java Development Kit 1.2. In: USENIX Symposium on Internet Technologies and Systems, pp. 103–112, Monterey, CA, December 1997

  21. Higuchi, T., Ohori, A.: A static type system for JVM access control. ACM Trans. Program. Lang. Syst. 29(1) (2007)

  22. Holzmann, G.J., Smith, M.H.: Software model checking: extracting verification models from source code. Softw. Test. Verif. Reliab. 11(2), 65–79 (2001)

    Article  Google Scholar 

  23. Igarashi, A., Kobayashi, N.: Resource usage analysis. In: Conference Record of POPL’02: The 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 331–342, Portland, Oregon, January 2002

  24. Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: a minimal core calculus for Java and GJ. ACM Trans. Program. Lang. Syst. 23(3), 396–450 (2001)

    Article  Google Scholar 

  25. Iwama, F., Igarashi, A., Kobayashi, N.: Resource usage analysis for a functional language with exceptions. In: PEPM ’06: Proceedings of the 2006 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pp. 38–47. ACM Press, New York (2006)

    Chapter  Google Scholar 

  26. Jensen, T., Le Métayer, D., Thorn, T.: Verification of control flow based security properties. In: Proceedings of the 1999 IEEE Symposium on Security and Privacy (1999)

  27. Stuckey, P.J., Marriott, K., Sulzmann, M.: Resource usage verification. In: Proc. of First Asian Programming Languages Symposium, APLAS 2003 (2003)

  28. Logozzo, F.: Separate compositional analysis of class-based object-oriented languages. In: Proceedings of the 10th International Conference on Algebraic Methodology and Software Technology (AMAST’2004). Lectures Notes in Computer Science, vol. 3116, pp. 332–346. Springer, Berlin (2004)

    Google Scholar 

  29. Mandelbaum, Y., Walker, D., Harper, R.: An effective theory of type refinements. In: Proceedings of the Eighth ACM SIGPLAN International Conference on Functional Programming (ICFP’03), Uppsala, Sweden, August 2003

  30. Nagata, A., Kobayashi, N., Yonezawa, A.: Region-based memory management for a dynamically-typed language. In: Asian Programming Languages Symposium. Lecture Notes in Computer Science. Springer, Berlin (2004)

    Google Scholar 

  31. Palsberg, J., O’Keefe, P.: A type system equivalent to flow analysis. In: POPL ’95: Proceedings of the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 367–378. ACM Press, New York (1995)

    Chapter  Google Scholar 

  32. Palsberg, J., Smith, S.: Constrained types and their expressiveness. ACM Trans. Program. Lang. Syst. 18(5), 519–527 (1996)

    Article  Google Scholar 

  33. Schmidt, D.A.: Trace-based abstract interpretation of operational semantics. Lisp Symb. Comput. 10(3), 237–271 (1998)

    Article  Google Scholar 

  34. Schneider, F.B.: Enforceable security policies. Inf. Syst. Secur. 3(1), 30–50 (2000)

    Article  Google Scholar 

  35. Skalka, C.: Trace effects and object orientation. In: PPDP ’05: Proceedings of the 7th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming, pp. 139–150. ACM Press, New York (2005)

    Chapter  Google Scholar 

  36. Skalka, C., Smith, S.: Static enforcement of security with types. In: Proceedings of the Fifth ACM SIGPLAN International Conference on Functional Programming (ICFP’00), pp. 34–45, Montréal, Canada, September 2000

  37. Skalka, C., Smith, S.: History effects and verification. In: Asian Programming Languages Symposium. Lecture Notes in Computer Science, vol. 3302. Springer, Berlin (2004)

    Google Scholar 

  38. Skalka, C., Smith, S., Van Horn, D.: A type and effect system for flexible abstract interpretation of Java. In: Proceedings of the ACM Workshop on Abstract Interpretation of Object Oriented Languages. Electronic Notes in Theoretical Computer Science, January 2005

  39. Skalka, C., Smith, S., Van Horn, D.: Types and trace effects of higher order programs. J. Funct. Program. 18(2), 179–249 (2008)

    MATH  Google Scholar 

  40. Steffen, B., Burkart, O.: Model checking for context-free processes. In: CONCUR’92, Stony Brook (NY). Lecture Notes in Computer Science, vol. 630, pp. 123–137. Springer, Heidelberg (1992)

    Google Scholar 

  41. Talpin, J.-P., Jouvelot, P.: The type and effect discipline. In: Seventh Annual IEEE Symposium on Logic in Computer Science, Santa Cruz, California, pp. 162–173. IEEE Computer Society Press, Los Alamitos (1992)

    Chapter  Google Scholar 

  42. Tofte, M., Talpin, J.-P.: Region-based memory management. Inf. Comput. 132(2), 109–176 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  43. Tofte, M., Birkedal, L., Elsman, M., Hallenberg, N.: A retrospective on region-based memory management. High. Order Symb. Comput. 17(3), 245–265 (2004)

    Article  MATH  Google Scholar 

  44. Trifonov, V., Smith, S.: Subtyping constrained types. In: Proceedings of the Third International Static Analysis Symposium, vol. 1145, pp. 349–365. Springer, Berlin (1996)

    Google Scholar 

  45. Walker, D.: A type system for expressive security policies. In: Conference Record of POPL’00: The 27th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 254–267, Boston, Massachusetts, January 2000

  46. Wallach, D.S., Felten, E.: Understanding Java stack inspection. In: Proceedings of the 1998 IEEE Symposium on Security and Privacy, May 1998

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Christian Skalka.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Skalka, C. Types and trace effects for object orientation. Higher-Order Symb Comput 21, 239–282 (2008). https://doi.org/10.1007/s10990-008-9032-6

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10990-008-9032-6

Keywords

Navigation