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.
Access provided by Autonomous University of Puebla. Download to read the full chapter text
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
http://gee.cs.oswego.edu/dl/jsr166/dist/extra166ydocs/index.html?extra166y/package-tree.html
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)
Altherr, P., Cremet, V.: Adding type constructor parameterization to Java. In: Formal Techniques for Java-like Programs, FTFJP (2007)
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)
Bocchino, R.: An Effect System and Language for Deterministic-by-Default Parallel Programming. PhD thesis, Univ. of Illinois, Urbana-Champaign, IL (2010)
Bocchino, R., et al.: A type and effect system for deterministic parallel Java. In: OOPSLA (2009)
Bocchino, R., et al.: Safe nondeterminism in a deterministic-by-default parallel language. In: POPL (2011)
Boyland, J.: In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, Springer, Heidelberg (2003)
Cameron, N., et al.: Multiple ownership. In: OOPSLA (2007)
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)
Charles, P., et al.: X10: An object-oriented approach to non-uniform cluster computing. In: OOPSLA (2005)
Clarke, D., Drossopoulou, S.: Ownership, encapsulation and the disjointness of type and effect. In: OOPSLA (2002)
Clarke, D., Wrigstad, T.: External uniqueness is unique enough. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 176–201. Springer, Heidelberg (2003)
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)
Dodds, M., et al.: Modular reasoning for deterministic parallelism. In: POPL (2011)
Fähndrich, M., DeLine, R.: Adoption and focus: Practical linear types for imperative programming. In: PLDI (2002)
Gosling, J., Joy, B., Steele, G., Bracha, G.: The Java Language Specification, 3rd edn. Addison-Wesley Longman, Amsterdam (2005)
Greenhouse, A., Boyland, J.: An object-oriented effects system. In: Liu, H. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 205–229. Springer, Heidelberg (1999)
Hammel, R., Gifford, D.: FX-87 performance measurements: Dataflow implementation. Technical Report MIT/LCS/TR-421 (1988)
Leavens, G., et al.: Preliminary design of JML: A behavioral interface specification language for Java. SIGSOFT Softw. Eng. Notes (2006)
Leino, K., et al.: Using data groups to specify and check side effects. In: PLDI (2002)
Li, P., et al.: Mojojojo — More ownership for multiple owners. In: FOOL (2010)
Lu, Y., Potter, J.: Protecting representation with effect encapsulation. In: POPL (2006)
Lucassen, J., et al.: Polymorphic effect systems. In: POPL (1988)
Meyer, B.: Systematic concurrent object-oriented programming. In: CACM (1993)
Moors, A., et al.: Generics of a higher kind. In: OOPSLA (2008)
Potanin, A., et al.: Generic ownership for generic Java. In: OOPSLA (2006)
Reinders, J.: Intel Threading Building Blocks: Outfitting C++ for Multi-core Processor Parallelism. O’Reilly Media, Sebastopol (2007)
Singh, J., et al.: SPLASH: Stanford parallel applications for shared-memory. Technical report, Stanford Univ. (1992)
Smith, L., Bull, J.: A multithreaded Java grande benchmark suite. In: Third Workshop on Java for High Performance Computing (2001)
Smith, M.: Towards an effects system for ownership domains. ECOOP (2005)
Sun Microsystems, Inc. The Fortress language specification, version 1.0. Technical report, Sun Microsystems, Inc. (March 2008)
Terauchi, T., Aiken, A.: A capability calculus for concurrency and determinism. In: TOPLAS (2008)
Thies, W., et al.: StreamIt: A language for streaming applications. In: CC (2002)
Thomas, P., Weedon, R.: Object-Oriented Programming in Eiffel, 2nd edn. Addison-Wesley Longman, Amsterdam (1998)
Vakilian, M., et al.: Inferring method effect summaries for nested heap regions. In: ASE (2009)
Wadler, P.: Linear types can change the world! In: Working Conf. on Programming Concepts and Methods (1990)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)