Alias Control for Deterministic Parallelism

  • Robert L. BocchinoJr.
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7850)

Abstract

A parallel program is deterministic if it produces the same output on every execution with a given input, regardless of the parallel schedule chosen. Determinism makes parallel programs much easier to write, understand, debug, and maintain. Further, many parallel programs are intended to be deterministic. Therefore a deterministic programming model (i.e., one in which all programs that pass compile-time checking are guaranteed to run deterministically) is attractive. However, aliasing poses difficulties for such a model, because hidden read-write conflicts through shared memory can cause unwanted nondeterminism and even data races. This article surveys the state of the art in program annotations for controlling aliasing in a way that can support a deterministic parallel programming model. It discusses the following techniques: the Deterministic Parallel Java effect system; other effect systems, including systems based on object ownership; permission-based type systems; and annotations based on program logic.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Lee, E.A.: The problem with threads. IEEE Computer 39, 33–42 (2006)CrossRefGoogle Scholar
  2. 2.
    Bocchino, R., Adve, V., Adve, S., Snir, M.: Parallel programming must be deterministic by default. In: HotPar (2009)Google Scholar
  3. 3.
    Loidl, H.W., Rubio, F., Scaife, N., Hammond, K., Horiguchi, S., Klusik, U., Loogen, R., Michaelson, G.J., Pena, R., Priebe, S., Rebón, A.J., Trinder, P.W.: Comparing parallel functional languages: Programming and performance. Higher-Order and Symbolic Computation 16(3), 203–251 (2003)MATHCrossRefGoogle Scholar
  4. 4.
    Sridharan, M., Chandra, S., Dolby, J., Fink, S.J., Yahav, E.: Alias Analysis for Object-Oriented Programs. In: Clarke, D., Noble, J., Wrigstad, T. (eds.) Aliasing in Object-Oriented Programming. LNCS, vol. 7850, pp. 196–232. Springer, Heidelberg (2013)Google Scholar
  5. 5.
    Kennedy, K., Allen, J.R.: Optimizing Compilers for Modern Architectures: A Dependence-Based Approach. Morgan Kaufmann Publishers Inc., San Francisco (2002)Google Scholar
  6. 6.
    Raza, M., Calcagno, C., Gardner, P.: Automatic Parallelization with Separation Logic. In: Castagna, G. (ed.) ESOP 2009. LNCS, vol. 5502, pp. 348–362. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  7. 7.
    Devietti, J., Lucia, B., Ceze, L., Oskin, M.: DMP: Deterministic shared memory multiprocessing. In: International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS (2009)Google Scholar
  8. 8.
    Olszewski, M., Ansel, J., Amarasinghe, S.: Kendo: Efficient deterministic multithreading in software. In: International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS (2009)Google Scholar
  9. 9.
    Burckhardt, S., Baldassin, A., Leijen, D.: Concurrent programming with revisions and isolation types. In: ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA (2010)Google Scholar
  10. 10.
    Aviram, A., Weng, S.C., Hu, S., Ford, B.: Efficient system-enforced deterministic parallelism. In: USENIX Symposium on Operating System Design and Implementation, OSDI (2010)Google Scholar
  11. 11.
    Prabhu, M.K., Olukotun, K.: Using thread-level speculation to simplify manual parallelization. In: ACM Symposium on Principles and Practice of Parallel Programming, PPOPP (2003)Google Scholar
  12. 12.
    Berger, E.D., Yang, T., Liu, T., Novark, G.: Grace: Safe multithreaded programming for C/C++. In: ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA (2009)Google Scholar
  13. 13.
    Rinard, M.C., Lam, M.S.: The design, implementation, and evaluation of Jade. ACM Transactions on Programming Languages and Systems (TOPLAS) 20(3), 483–545 (1998)CrossRefGoogle Scholar
  14. 14.
    Allen, M.D., Sridharan, S., Sohi, G.S.: Serialization sets: A dynamic dependence-based parallel execution model. In: ACM Symposium on Principles and Practice of Parallel Programming, PPOPP (2009)Google Scholar
  15. 15.
    Bocchino, Jr., R.L., Adve, V.S., Dig, D., Adve, S.V., Heumann, S., Komuravelli, R., Overbey, J., Simmons, P., Sung, H., Vakilian, M.: A type and effect system for deterministic parallel Java. In: ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA (2009)Google Scholar
  16. 16.
    Stork, S., Marques, P., Aldrich, J.: Concurrency by default: Using permissions to express dataflow in stateful programs. In: Onward (2009)Google Scholar
  17. 17.
    Karmani, R.K., Madhusudan, P., Moore, B.M.: Thread contracts for safe parallelism. In: ACM Symposium on Principles and Practice of Parallel Programming, PPOPP (2011)Google Scholar
  18. 18.
  19. 19.
    Kim, D., Rinard, M.C.: Verification of semantic commutativity conditions and inverse operations on linked data structures. In: ACM Conference on Programming Language Design and Implementation, PLDI (2011)Google Scholar
  20. 20.
    Bocchino Jr., R.L.: An effect system and language for deterministic-by-default parallel programming. PhD thesis, University of Illinois at Urbana-Champaign (2010)Google Scholar
  21. 21.
    Bocchino, Jr., R.L., Heumann, S., Honarmand, N., Adve, S.V., Adve, V.S., Welc, A., Shpeisman, T.: Safe nondeterminism in a deterministic-by-default parallel language. In: ACM Symposium on Principles of Programming Languages, POPL (2011)Google Scholar
  22. 22.
    Bocchino Jr., R.L., Adve, V.S.: Types, Regions, and Effects for Safe Programming with Object-Oriented Parallel Frameworks. In: Mezini, M. (ed.) ECOOP 2011. LNCS, vol. 6813, pp. 306–332. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  23. 23.
    Lucassen, J.M., Gifford, D.K.: Polymorphic effect systems. In: ACM Symposium on Principles of Programming Languages, POPL (1988)Google Scholar
  24. 24.
    Hammel, R.T., Gifford, D.K.: FX-87 performance measurements: Dataflow implementation. Technical Report MIT/LCS/TR-421 (1988)Google Scholar
  25. 25.
    Gifford, D.K., Jouvelot, P., Sheldon, M.A., O’Toole, J.W.: Report on the FX-91 programming language. Technical Report MIT/LCS/TR-531 (1992)Google Scholar
  26. 26.
    Leino, K.R.M.: Data groups: Specifying the modification of extended state. In: ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA (1998)Google Scholar
  27. 27.
    Greenhouse, A., Boyland, J.: An Object-Oriented Effects System. In: Guerraoui, R. (ed.) ECOOP 1999. LNCS, vol. 1628, pp. 205–229. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  28. 28.
    Greenhouse, A., Scherlis, W.L.: Assuring and evolving concurrent programs: annotations and policy. In: IEEE Computing in Science and Engineering (2002)Google Scholar
  29. 29.
    Leino, K.R.M., Poetzsch-Heffter, A., Zhou, Y.: Using data groups to specify and check side effects. In: ACM Conference on Programming Language Design and Implementation, PLDI (2002)Google Scholar
  30. 30.
    Clarke, D.G., Potter, J.M., Noble, J.: Ownership types for flexible alias protection. In: ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA (1998)Google Scholar
  31. 31.
    Clarke, D., Östlund, J., Sergey, I., Wrigstad, T.: Ownership Types: A Survey. In: Clarke, D., Noble, J., Wrigstad, T. (eds.) Aliasing in Object-Oriented Programming. LNCS, vol. 7850, pp. 15–58. Springer, Heidelberg (2013)Google Scholar
  32. 32.
    Clarke, D., Drossopoulou, S.: Ownership, encapsulation and the disjointness of type and effect. In: ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA (2002)Google Scholar
  33. 33.
    Smith, M.: Towards an effects system for ownership domains. In: European Conference on Object-Oriented Programming, ECOOP (2005)Google Scholar
  34. 34.
    Noble, J., Vitek, J., Potter, J.: Flexible Alias Protection. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 158–185. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  35. 35.
    Clarke, D., Wrigstad, T.: External Uniqueness is Unique Enough. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 176–201. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  36. 36.
    Leino, K.R.M., Müller, P.: Object Invariants in Dynamic Contexts. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 491–515. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  37. 37.
    Dietl, W., Müller, P.: Universes: Lightweight ownership for JML. Journal of Object Technology (JOT) 4(8), 5–32 (2005)CrossRefGoogle Scholar
  38. 38.
    Lu, Y., Potter, J.: Protecting representation with effect encapsulation. In: ACM Symposium on Principles of Programming Languages, POPL (2006)Google Scholar
  39. 39.
    Cameron, N.R., Drossopoulou, S., Noble, J., Smith, M.J.: Multiple ownership. In: ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA (2007)Google Scholar
  40. 40.
    Dietl, W., Müller, P.: Object Ownership in Program Verification. In: Clarke, D., Noble, J., Wrigstad, T. (eds.) Aliasing in Object-Oriented Programming. LNCS, vol. 7850, pp. 289–318. Springer, Heidelberg (2013)Google Scholar
  41. 41.
    Aldrich, J.: Ownership Domains: Separating Aliasing Policy from Mechanism. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 1–25. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  42. 42.
    Wrigstad, T.: External uniqueness. PhD thesis, Stockholm University/KTH, Stockholm, Sweden (2004)Google Scholar
  43. 43.
    Tofte, M., Talpin, J.P.: Region-based memory management. Information and Computation 132(2), 109–176 (1997)MathSciNetMATHCrossRefGoogle Scholar
  44. 44.
    Boyapati, C., Lee, R., Rinard, M.: Ownership types for safe programming: Preventing data races and deadlocks. In: ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA (2002)Google Scholar
  45. 45.
    Abadi, M., Flanagan, C., Freund, S.N.: Types for safe locking: Static race detection for Java. ACM Transactions on Programming Languages and Systems (TOPLAS) 28(2) (2006)Google Scholar
  46. 46.
    Jacobs, B., Piessens, F., Smans, J., Leino, K.R.M., Schulte, W.: A programming model for concurrent object-oriented programs. ACM Transactions on Programming Languages and Systems (TOPLAS) 31(1) (2008)Google Scholar
  47. 47.
    Hogg, J.: Islands: Aliasing protection in object-oriented languages. In: ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA (1991)Google Scholar
  48. 48.
    Boyapati, C., Rinard, M.: A parameterized type system for race-free Java programs. In: ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA (2001)Google Scholar
  49. 49.
    Hicks, M., Morrisett, G., Grossman, D., Jim, T.: Experience with safe manual memory-management in Cyclone. In: International Symposium on Memory Management, ISMM (2004)Google Scholar
  50. 50.
    Wolff, R., Garcia, R., Tanter, É., Aldrich, J.: Gradual Typestate. In: Mezini, M. (ed.) ECOOP 2011. LNCS, vol. 6813, pp. 459–483. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  51. 51.
    Haller, P., Odersky, M.: Capabilities for Uniqueness and Borrowing. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 354–378. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  52. 52.
    Harms, D., Weide, B.: Copying and swapping: Influences on the design of reusable software components. IEEE Transactions on Software Engineering 17, 424–435 (1991)CrossRefGoogle Scholar
  53. 53.
    Smith, F., Walker, D., Morrisett, G.: Alias Types. In: Smolka, G. (ed.) ESOP/ETAPS 2000. LNCS, vol. 1782, pp. 366–381. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  54. 54.
    DeLine, R., Fähndrich, M.: Enforcing high-level protocols in low-level software. In: ACM Conference on Programming Language Design and Implementation, PLDI (2001)Google Scholar
  55. 55.
    Fähndrich, M., DeLine, R.: Adoption and focus: Practical linear types for imperative programming. In: ACM Conference on Programming Language Design and Implementation, PLDI (2002)Google Scholar
  56. 56.
    Walker, D., Morrisett, G.: Alias Types for Recursive Data Structures. In: Harper, R. (ed.) TIC 2000. LNCS, vol. 2071, pp. 177–206. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  57. 57.
    Barnett, M., DeLine, R., Fähndrich, M., Leino, K.R.M., Schulte, W.: Verification of object-oriented programs with invariants. Journal of Object Technology (JOT) 3 (2004)Google Scholar
  58. 58.
    Naden, K., Bocchino, R., Aldrich, J., Bierhoff, K.: A type system for borrowing permissions. In: ACM Symposium on Principles of Programming Languages, POPL (2012)Google Scholar
  59. 59.
    Westbrook, E., Zhao, J., Budimlić, Z., Sarkar, V.: Practical Permissions for Race-Free Parallelism. In: Noble, J. (ed.) ECOOP 2012. LNCS, vol. 7313, pp. 614–639. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  60. 60.
    Boyland, J.: Alias burying: Unique variables without destructive reads. Software: Practice and Experience 31(6), 533–553 (2001)MATHCrossRefGoogle Scholar
  61. 61.
    Bierhoff, K.: Automated program verification made SYMPLAR: Symbolic permissions for lightweight automated reasoning. In: Onward (2011)Google Scholar
  62. 62.
    Boyland, J.: Fractional Permissions. In: Clarke, D., Noble, J., Wrigstad, T. (eds.) Aliasing in Object-Oriented Programming. LNCS, vol. 7850, pp. 270–288. Springer, Heidelberg (2013)Google Scholar
  63. 63.
    Boyland, J.: Checking Interference with Fractional Permissions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 55–72. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  64. 64.
    Terauchi, T., Aiken, A.: A capability calculus for concurrency and determinism. ACM Transactions on Programming Languages and Systems (TOPLAS) 30(5), 1–30 (2008)CrossRefGoogle Scholar
  65. 65.
    Bierhoff, K., Aldrich, J.: Modular typestate checking of aliased objects. In: ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA (2007)Google Scholar
  66. 66.
    Heule, S., Leino, K.R.M., Müller, P., Summers, A.J.: Fractional permissions without the fractions. In: Workshop on Formal Techniques for Java-Like Programs, FTfJP (2011)Google Scholar
  67. 67.
    Smans, J., Jacobs, B., Piessens, F.: VeriFast for Java: A Tutorial. In: Clarke, D., Noble, J., Wrigstad, T. (eds.) Aliasing in Object-Oriented Programming. LNCS, vol. 7850, pp. 407–442. Springer, Heidelberg (2013)Google Scholar
  68. 68.
    Müller, P., Rudich, A.: Ownership transfer in universe types. In: ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA (2007)Google Scholar
  69. 69.
  70. 70.
    Nikhil, R.S.: ID version 90.0 reference manual. Technical report, MIT (July 1990)Google Scholar
  71. 71.
    Feo, J.T., Cann, D.C., Oldehoeft, R.R.: A report on the Sisal language project. Journal of Parallel and Distributed Computing 10(4), 349–366 (1990)CrossRefGoogle Scholar
  72. 72.
    Vakilian, M., Dig, D., Bocchino, R., Overbey, J., Adve, V., Johnson, R.: Inferring method effect summaries for nested heap regions. In: International Conference on Automated Software Engineering, ASE (2009)Google Scholar
  73. 73.
    Gotsman, A., Berdine, J., Cook, B., Sagiv, M.: Thread-modular shape analysis. In: ACM Conference on Programming Language Design and Implementation, PLDI (2007)Google Scholar
  74. 74.
    O’Hearn, P.W.: Resources, concurrency, and local reasoning. Theoretical Computer Science (2007)Google Scholar
  75. 75.
    Jacobs, B., Smans, J., Philippaerts, P., Vogels, F., Penninckx, W., Piessens, F.: VeriFast: A Powerful, Sound, Predictable, Fast Verifier for C and Java. In: Bobaru, M., Havelund, K., Holzmann, G.J., Joshi, R. (eds.) NFM 2011. LNCS, vol. 6617, pp. 41–55. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  76. 76.
    Berdine, J., Calcagno, C., O’Hearn, P.W.: Smallfoot: Modular Automatic Assertion Checking with Separation Logic. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2005. LNCS, vol. 4111, pp. 115–137. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  77. 77.
    Distefano, D., Parkinson, M.J.: jStar: Towards practical verification for Java. In: ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA (2008)Google Scholar
  78. 78.
    Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: IEEE Symposium on Logic in Computer Science (2002)Google Scholar
  79. 79.
    Hoare, C.A.R.: An axiomatic basis for computer programming. Communications of the ACM 12(10), 576–580 (1969)MATHCrossRefGoogle Scholar
  80. 80.
    Bornat, R., Calcagno, C., O’Hearn, P., Parkinson, M.: Permission accounting in separation logic. In: ACM Symposium on Principles of Programming Languages, POPL (2005)Google Scholar
  81. 81.
    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)CrossRefGoogle Scholar
  82. 82.
    Dodds, M., Jagannathan, S., Parkinson, M.J.: Modular reasoning for deterministic parallelism. In: ACM Symposium on Principles of Programming Languages, POPL (2011)Google Scholar
  83. 83.
    Kassios, I.T.: Dynamic Frames: Support for Framing, Dependencies and Sharing Without Restrictions. In: Misra, J., Nipkow, T., Sekerinski, E. (eds.) FM 2006. LNCS, vol. 4085, pp. 268–283. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  84. 84.
    Smans, J., Jacobs, B., Piessens, F.: Implicit Dynamic Frames: Combining Dynamic Frames and Separation Logic. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 148–172. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  85. 85.
    Leino, K.R.M., Müller, P.: A Basis for Verifying Multi-threaded Programs. In: Castagna, G. (ed.) ESOP 2009. LNCS, vol. 5502, pp. 378–393. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  86. 86.
    de Moura, L., Bjørner, N.S.: Z3: An Efficient SMT Solver. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  87. 87.
    Banerjee, A., Naumann, D.A., Rosenberg, S.: Regional Logic for Local Reasoning about Global Invariants. In: Vitek, J. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 387–411. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  88. 88.
    Banerjee, A., Barnett, M., Naumann, D.A.: Boogie Meets Regions: A Verification Experience Report. In: Shankar, N., Woodcock, J. (eds.) VSTTE 2008. LNCS, vol. 5295, pp. 177–191. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  89. 89.
    Kawaguchi, M., Rondon, P., Bakst, A., Jhala, R.: Deterministic parallelism via liquid effects. In: ACM Conference on Programming Language Design and Implementation, PLDI (2012)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Robert L. BocchinoJr.
    • 1
  1. 1.Carnegie Mellon UniversityUSA

Personalised recommendations