Skip to main content

Types, Regions, and Effects for Safe Programming with Object-Oriented Parallel Frameworks

  • Conference paper
ECOOP 2011 – Object-Oriented Programming (ECOOP 2011)

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

Included in the following conference series:

Abstract

Object-oriented frameworks can make parallel programming easier by providing generic parallel algorithms such as map, reduce, or pipeline and letting the user fill in the details with sequential code. However, such frameworks can produce incorrect behavior if they are not carefully used, e.g., if a user-supplied function performs an unsynchronized access to a global variable. We develop novel techniques that can prevent such errors. Building on a language (Deterministic Parallel Java, or DPJ) with an expressive region-based type and effect system, we show how to write a framework API that enables sound reasoning about the effects of unknown user-supplied methods. We also describe novel extensions to DPJ that enable generic types and effects while retaining soundness. We present a formal semantics and soundness properties for the language. Finally, we describe an evaluation showing that our technique can express three parallel frameworks and three realistic parallel algorithms using those frameworks.

This work was supported by the National Science Foundation under grants CCF 07-02724 and CNS 07-20772, and by Intel, Microsoft, and the University of Illinois through UPCRC Illinois. Robert Bocchino is supported by a Computing Innovation Fellowship.

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 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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. http://gee.cs.oswego.edu/dl/jsr166/dist/extra166ydocs/index.html?extra166y/package-tree.html

  2. Aldrich, J., Chambers, C.: Ownership domains: Separating aliasing policy from mechanism. In: Vetta, A. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 1–25. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  3. Altherr, P., Cremet, V.: Adding type constructor parameterization to Java. In: Formal Techniques for Java-like Programs, FTFJP (2007)

    Google Scholar 

  4. Barnett, M., et al.: The Spec# programming system: An overview. In: Barthe, G., Burdy, L., Huisman, M., Lanet, J.-L., Muntean, T. (eds.) CASSIS 2004. LNCS, vol. 3362, pp. 49–69. Springer, Heidelberg (2005)

    Google Scholar 

  5. Bocchino, R.: An Effect System and Language for Deterministic-by-Default Parallel Programming. PhD thesis, Univ. of Illinois, Urbana-Champaign, IL (2010)

    Google Scholar 

  6. Bocchino, R., et al.: A type and effect system for deterministic parallel Java. In: OOPSLA (2009)

    Google Scholar 

  7. Bocchino, R., et al.: Safe nondeterminism in a deterministic-by-default parallel language. In: POPL (2011)

    Google Scholar 

  8. Boyland, J.: In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, Springer, Heidelberg (2003)

    Google Scholar 

  9. Cameron, N., et al.: Multiple ownership. In: OOPSLA (2007)

    Google Scholar 

  10. Cameron, N., Gairing, M., Bateni, M.: A model for Java with wildcards. In: Ryan, M. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 2–26. Springer, Heidelberg (2008)

    Google Scholar 

  11. Charles, P., et al.: X10: An object-oriented approach to non-uniform cluster computing. In: OOPSLA (2005)

    Google Scholar 

  12. Clarke, D., Drossopoulou, S.: Ownership, encapsulation and the disjointness of type and effect. In: OOPSLA (2002)

    Google Scholar 

  13. Clarke, D., Wrigstad, T.: External uniqueness is unique enough. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 176–201. Springer, Heidelberg (2003)

    Google Scholar 

  14. Dinsdale-Young, T., Dodds, M., Gardner, P., Parkinson, M.J., Vafeiadis, V.: Concurrent abstract predicates. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 504–528. Springer, Heidelberg (2010)

    Google Scholar 

  15. Dodds, M., et al.: Modular reasoning for deterministic parallelism. In: POPL (2011)

    Google Scholar 

  16. Fähndrich, M., DeLine, R.: Adoption and focus: Practical linear types for imperative programming. In: PLDI (2002)

    Google Scholar 

  17. Gosling, J., Joy, B., Steele, G., Bracha, G.: The Java Language Specification, 3rd edn. Addison-Wesley Longman, Amsterdam (2005)

    Google Scholar 

  18. Greenhouse, A., Boyland, J.: An object-oriented effects system. In: Liu, H. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 205–229. Springer, Heidelberg (1999)

    Google Scholar 

  19. Hammel, R., Gifford, D.: FX-87 performance measurements: Dataflow implementation. Technical Report MIT/LCS/TR-421 (1988)

    Google Scholar 

  20. Leavens, G., et al.: Preliminary design of JML: A behavioral interface specification language for Java. SIGSOFT Softw. Eng. Notes (2006)

    Google Scholar 

  21. Leino, K., et al.: Using data groups to specify and check side effects. In: PLDI (2002)

    Google Scholar 

  22. Li, P., et al.: Mojojojo — More ownership for multiple owners. In: FOOL (2010)

    Google Scholar 

  23. Lu, Y., Potter, J.: Protecting representation with effect encapsulation. In: POPL (2006)

    Google Scholar 

  24. Lucassen, J., et al.: Polymorphic effect systems. In: POPL (1988)

    Google Scholar 

  25. Meyer, B.: Systematic concurrent object-oriented programming. In: CACM (1993)

    Google Scholar 

  26. Moors, A., et al.: Generics of a higher kind. In: OOPSLA (2008)

    Google Scholar 

  27. Potanin, A., et al.: Generic ownership for generic Java. In: OOPSLA (2006)

    Google Scholar 

  28. Reinders, J.: Intel Threading Building Blocks: Outfitting C++ for Multi-core Processor Parallelism. O’Reilly Media, Sebastopol (2007)

    Google Scholar 

  29. Singh, J., et al.: SPLASH: Stanford parallel applications for shared-memory. Technical report, Stanford Univ. (1992)

    Google Scholar 

  30. Smith, L., Bull, J.: A multithreaded Java grande benchmark suite. In: Third Workshop on Java for High Performance Computing (2001)

    Google Scholar 

  31. Smith, M.: Towards an effects system for ownership domains. ECOOP (2005)

    Google Scholar 

  32. Sun Microsystems, Inc. The Fortress language specification, version 1.0. Technical report, Sun Microsystems, Inc. (March 2008)

    Google Scholar 

  33. Terauchi, T., Aiken, A.: A capability calculus for concurrency and determinism. In: TOPLAS (2008)

    Google Scholar 

  34. Thies, W., et al.: StreamIt: A language for streaming applications. In: CC (2002)

    Google Scholar 

  35. Thomas, P., Weedon, R.: Object-Oriented Programming in Eiffel, 2nd edn. Addison-Wesley Longman, Amsterdam (1998)

    Google Scholar 

  36. Vakilian, M., et al.: Inferring method effect summaries for nested heap regions. In: ASE (2009)

    Google Scholar 

  37. Wadler, P.: Linear types can change the world! In: Working Conf. on Programming Concepts and Methods (1990)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bocchino, R.L., Adve, V.S. (2011). Types, Regions, and Effects for Safe Programming with Object-Oriented Parallel Frameworks. In: Mezini, M. (eds) ECOOP 2011 – Object-Oriented Programming. ECOOP 2011. Lecture Notes in Computer Science, vol 6813. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-22655-7_15

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-22655-7_15

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-22654-0

  • Online ISBN: 978-3-642-22655-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics