skip to main content
research-article

Deterministic parallelism via liquid effects

Authors Info & Claims
Published:11 June 2012Publication History
Skip Abstract Section

Abstract

Shared memory multithreading is a popular approach to parallel programming, but also fiendishly hard to get right. We present Liquid Effects, a type-and-effect system based on refinement types which allows for fine-grained, low-level, shared memory multi-threading while statically guaranteeing that a program is deterministic. Liquid Effects records the effect of an expression as a for- mula in first-order logic, making our type-and-effect system highly expressive. Further, effects like Read and Write are recorded in Liquid Effects as ordinary uninterpreted predicates, leaving the effect system open to extension by the user. By building our system as an extension to an existing dependent refinement type system, our system gains precise value- and branch-sensitive reasoning about effects. Finally, our system exploits the Liquid Types refinement type inference technique to automatically infer refinement types and effects. We have implemented our type-and-effect checking techniques in CSOLVE, a refinement type inference system for C programs. We demonstrate how CSOLVE uses Liquid Effects to prove the determinism of a variety of benchmarks.

References

  1. Nvidia cuda programming guide.Google ScholarGoogle Scholar
  2. S. V. Adve, S. Heumann, R. Komuravelli, J. Overbey, P. Simmons, H. Sung, and M. Vakilian. A type and effect system for deterministic parallel java. In OOPSLA, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. F. Aleen and N. Clark. Commutativity analysis for software parallelization: letting program transformations see the big picture. In ASPLOS, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Z. R. Anderson, D. Gay, R. Ennals, and E. A. Brewer. Sharc: checking data sharing strategies for multithreaded c. In PLDI, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. A. Aviram, S.-C. Weng, S. Hu, and B. Ford. Efficient system-enforced deterministic parallelism. In OSDI, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. Boyapati, R. Lee, and M. C. Rinard. Ownership types for safe programming: preventing data races and deadlocks. In OOPSLA, pages 211--230, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. Chakravarty, G. Keller, R. Lechtchinsky, and W. Pfannenstiel. Nepal: Nested data parallelism in haskell. In Euro-Par, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. D. G. Clarke and S. Drossopoulou. Ownership, encapsulation and the disjointness of type and effect. In OOPSLA, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. D. G. Clarke, J. Noble, and J. M. Potter. Simple ownership types for object containment. In ECOOP, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. R. DeLine and M. Fädrich. Enforcing high-level protocols in low-level software. In PLDI, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. C. Flanagan and S. N. Freund. Type-based race detection for java. In PLDI, pages 219--232, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. C. Flanagan and S. Qadeer. A type and effect system for atomicity. In PLDI, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. J. Foster, T. Terauchi, and A. Aiken. Flow-sensitive type qualifiers. In PLDI, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. B. Jacobs, F. Piessens, J. Smans, K. R. M. Leino, and W. Schulte. A programming model for concurrent object-oriented programs. TOPLAS, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. T. Jim, J. G. Morrisett, D. Grossman, M. W. Hicks, J. Cheney, and Y. Wang. Cyclone: A safe dialect of c. In USENIX, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. M. Kawaguchi, P. Rondon, A. Bakst, and R. Jhala. Liquid effects: Technical report. http://goto.ucsd.edu/ rjhala/liquid.Google ScholarGoogle Scholar
  17. S. K. Lahiri and S. Qadeer. Back to the future: revisiting precise program verification using smt solvers. In POPL, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. S. K. Lahiri, S. Qadeer, and D. Walker. Linear maps. In PLPV, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. C. Lattner and V. S. Adve. Automatic pool allocation: improving performance by controlling data structure layout in the heap. In PLDI, pages 129--142, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. K. R. M. Leino, A. Poetzsch-Heffter, and Y. Zhou. Using data groups to specify and check side effects, 2002.Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. D. Marino and T. D. Millstein. A generic type-and-effect system. In A. Kennedy and A. Ahmed, editors, TLDI, pages 39--50. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J.-P. Martin, M. Hicks, M. Costa, P. Akritidis, and M. Castro. Dynamically checking ownership policies in concurrent c/c programs. In POPL, pages 457--470, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. C. C. Minh, J. Chung, C. Kozyrakis, and K. Olukotun. Stamp: Stanford transactional applications for multi-processing. In IISWC, pages 35--46, 2008.Google ScholarGoogle Scholar
  24. P. Pratikakis, J. S. Foster, and M. W. Hicks. Locksmith: context-sensitive correlation analysis for race detection. In PLDI, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. Raza, C. Calcagno, and P. Gardner. Automatic parallelization with separation logic. In ESOP, pages 348--362, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. J. C. Reynolds. Separation logic: A logic for shared mutable data structures. In LICS, pages 55--74, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. M. C. Rinard and P. C. Diniz. Commutativity analysis: A new analysis technique for parallelizing compilers. TOPLAS, 19(6), 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. P. Rondon, M. Kawaguchi, and R. Jhala. Low-level liquid types. In POPL, pages 131--144, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. M. Smith. Towards an effects system for ownership domains. In In ECOOP Workshop - FTfJP 2005, 2005.Google ScholarGoogle Scholar
  30. T. Terauchi and A. Aiken. A capability calculus for concurrency and determinism. TOPLAS, 30, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. M. Tofte and J.-P. Talpin. A theory of stack allocation in polymorphically typed languages, 1993.Google ScholarGoogle Scholar
  32. M. T. Vechev, E. Yahav, R. Raman, and V. Sarkar. Automatic verification of determinism for structured parallel programs. In SAS, pages 455--471, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. J. Voung, R. Chugh, R. Jhala, and S. Lerner. Dataflow analysis for concurrent programs using data race detection. In PLDI, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. D. Walker and J. Morrisett. Alias types for recursive data structures. pages 177--206. 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. E. Yahav and M. Sagiv. Verifying safety properties of concurrent heap-manipulating programs. TOPLAS, 32(5), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Deterministic parallelism via liquid effects

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            Full Access

            • Published in

              cover image ACM SIGPLAN Notices
              ACM SIGPLAN Notices  Volume 47, Issue 6
              PLDI '12
              June 2012
              534 pages
              ISSN:0362-1340
              EISSN:1558-1160
              DOI:10.1145/2345156
              Issue’s Table of Contents
              • cover image ACM Conferences
                PLDI '12: Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation
                June 2012
                572 pages
                ISBN:9781450312059
                DOI:10.1145/2254064

              Copyright © 2012 ACM

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 11 June 2012

              Check for updates

              Qualifiers

              • research-article

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader
            About Cookies On This Site

            We use cookies to ensure that we give you the best experience on our website.

            Learn more

            Got it!