skip to main content
10.1145/2967973.2968602acmotherconferencesArticle/Chapter ViewAbstractPublication PagesppdpConference Proceedingsconference-collections
research-article

Effect-dependent transformations for concurrent programs

Published:05 September 2016Publication History

ABSTRACT

We describe a denotational semantics for an abstract effect system for a higher-order, shared-variable concurrent language. The semantics validates general effect-based program equivalences, including sufficient conditions for replacing sequential composition with parallel composition. Effect annotations refer to abstract locations, specified by contracts, rather than physical footprints, allowing us to also show soundness of some transformations involving fine-grained concurrent data structures, such as Michael-Scott queues.

We build on a trace-based semantics for first-order programs due to Brookes. By moving from concrete to abstract locations, and adding type refinements capturing possible side-effects of both expressions and their environments, we can validate many equivalences that do not hold in an unrefined model. Refined types are interpreted using a game-based logical relation over sets of traces.

References

  1. M. Abadi and L. Lamport. The existence of refinement mappings. Theor. Comput. Sci., 82(2):253--284, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. S. Abramsky and A. Jung. Domain theory, 1994. Online Lecture Notes, avaliable from CiteSeerX.Google ScholarGoogle Scholar
  3. A. Ahmed, D. Dreyer, and A. Rossberg. State-dependent representation independence. In Proceedings of the 36th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL, pages 340--353, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. T. Amtoft, F. Nielson, and H. R. Nielson. Type and Effect Systems: Behaviours for Concurrency. World Scientific, 1999.Google ScholarGoogle ScholarCross RefCross Ref
  5. N. Benton, M. Hofmann, and V. Nigam. Abstract effects and proof-relevant logical relations. In The 41st Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL, pages 619--632, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. N. Benton, M. Hofmann, and V. Nigam. Effect-dependent transformations for concurrent programs. CoRR, abs/1510.02419, 2015.Google ScholarGoogle Scholar
  7. N. Benton, A. Kennedy, L. Beringer, and M. Hofmann. Relational semantics for effect-based program transformations: higher-order store. In Proceedings of the 11th International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming (PPDP), pages 301--312, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. N. Benton, A. Kennedy, M. Hofmann, and L. Beringer. Reading, writing and relations. In Programming Languages and Systems, 4th Asian Symposium, APLAS, pages 114--130, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. N. Benton, A. Kennedy, M. Hofmann, and V. Nigam. Counting successes: Effects and transformations for non-deterministic programs. In A List of Successes That Can Change the World - Essays Dedicated to Philip Wadler on the Occasion of His 60th Birthday, pages 56--72, 2016.Google ScholarGoogle Scholar
  10. N. Benton, A. Kennedy, and G. Russell. Compiling standard ML to java bytecodes. In Proceedings of the third ACM SIGPLAN International Conference on Functional Programming (ICFP '98), Baltimore, Maryland, USA, September 27-29, 1998., pages 129--140, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. L. Birkedal, F. Sieczkowski, and J. Thamsborg. A concurrent logical relation. In 26th International Workshop/21st Annual Conference of the EACSL, CSL, volume 16 of LIPIcs, pages 107--121, 2012.Google ScholarGoogle Scholar
  12. L. Birkedal, M. Tofte, and M. Vejlstrup. From region inference to von Neumann machines via region representation inference. In Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. N. Broberg and D. Sands. Flow locks: Towards a core calculus for dynamic flow policies. In 15th European Symposium on Programming (ESOP), volume 3924 of LNCS. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. S. D. Brookes. Full abstraction for a shared-variable parallel language. Inf. Comput., 127(2):145--163, 1996.Google ScholarGoogle ScholarCross RefCross Ref
  15. S. D. Brookes. The essence of parallel algol. Inf. Comput., 179(1):118--149, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. J. W. Coleman and C. B. Jones. A structural proof of the soundness of rely/guarantee rules. J. Log. Comput., 17(4):807--841, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. R. De Nicola and M. Hennessy. Testing equivalence for processes. In Automata, Languages and Programming, 10th Colloquium, pages 548--560, 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. T. Dinsdale-Young, L. Birkedal, P. Gardner, M. J. Parkinson, and H. Yang. Views: compositional reasoning for concurrent programs. In The 40th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL, pages 287--300, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. I. Filipovic, P. W. O'Hearn, N. Rinetzky, and H. Yang. Abstraction for concurrent objects. Theor. Comput. Sci., 411(51-52):4379--4398, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. C. Flanagan and S. Qadeer. A type and effect system for atomicity. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation PLDI, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. D. K. Gifford and J. M. Lucassen. Integrating functional and imperative programming. In LISP and Functional Programming, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J. B. Jensen and L. Birkedal. Fictional separation logic. In Proceedings of the 21st European Conference on Programming Languages and Systems ESOP, pages 377--396, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. O. Kammar and G. D. Plotkin. Algebraic foundations for effect-dependent optimisations. In Proceedings of the 39th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL, pages 349--360, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. H. Liang, X. Feng, and M. Fu. A rely-guarantee-based simulation for verifying concurrent program transformations. In Proceedings of the 39th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL, pages 455--468. ACM, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. N. A. Lynch and F. W. Vaandrager. Forward and backward simulations, ii: Timing-based systems. Inf. Comput., pages 1--25, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. M. M. Michael and M. L. Scott. Nonblocking algorithms and preemption-safe locking on multiprogrammed shared memory multiprocessors. J. Parallel Distrib. Comput., 51(1):1--26, May 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. N. Benton and P. Buchlovsky. Semantics of an effect analysis for exceptions. In 3rd ACM Workshop on Types in Language Design and Implementation TLDI, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. F. Pessaux and X. Leroy. Type-based analysis of uncaught exceptions. In Proceedings of the 26 ACM Symposium on Principles of Programming Languages POPL, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. G. D. Plotkin. A powerdomain construction. SIAM J. Comput., 5(3):452--487, 1976.Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. J. Thamsborg and L. Birkedal. A Kripke logical relation for effect-based program transformations. In Proceeding of the 16th ACM SIGPLAN international conference on Functional Programming, ICFP, pages 445--456. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. A. J. Turon, J. Thamsborg, A. Ahmed, L. Birkedal, and D. Dreyer. Logical relations for fine-grained concurrency. In The 40th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL, pages 343--356, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. A. J. Turon and M. Wand. A separation logic for refining concurrent objects. In Proceedings of the 38th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL, pages 247--258. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Effect-dependent transformations for concurrent programs

        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
        • Published in

          cover image ACM Other conferences
          PPDP '16: Proceedings of the 18th International Symposium on Principles and Practice of Declarative Programming
          September 2016
          249 pages
          ISBN:9781450341486
          DOI:10.1145/2967973
          • Conference Chair:
          • James Cheney,
          • Program Chair:
          • Germán Vidal

          Copyright © 2016 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 5 September 2016

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • research-article

          Acceptance Rates

          PPDP '16 Paper Acceptance Rate17of37submissions,46%Overall Acceptance Rate230of486submissions,47%

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader