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.
- M. Abadi and L. Lamport. The existence of refinement mappings. Theor. Comput. Sci., 82(2):253--284, 1991. Google ScholarDigital Library
- S. Abramsky and A. Jung. Domain theory, 1994. Online Lecture Notes, avaliable from CiteSeerX.Google Scholar
- 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 ScholarDigital Library
- T. Amtoft, F. Nielson, and H. R. Nielson. Type and Effect Systems: Behaviours for Concurrency. World Scientific, 1999.Google ScholarCross Ref
- 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 ScholarDigital Library
- N. Benton, M. Hofmann, and V. Nigam. Effect-dependent transformations for concurrent programs. CoRR, abs/1510.02419, 2015.Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- S. D. Brookes. Full abstraction for a shared-variable parallel language. Inf. Comput., 127(2):145--163, 1996.Google ScholarCross Ref
- S. D. Brookes. The essence of parallel algol. Inf. Comput., 179(1):118--149, 2002. Google ScholarDigital Library
- 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 ScholarDigital Library
- R. De Nicola and M. Hennessy. Testing equivalence for processes. In Automata, Languages and Programming, 10th Colloquium, pages 548--560, 1983. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- D. K. Gifford and J. M. Lucassen. Integrating functional and imperative programming. In LISP and Functional Programming, 1986. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- N. A. Lynch and F. W. Vaandrager. Forward and backward simulations, ii: Timing-based systems. Inf. Comput., pages 1--25, 1996. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- G. D. Plotkin. A powerdomain construction. SIAM J. Comput., 5(3):452--487, 1976.Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
Index Terms
- Effect-dependent transformations for concurrent programs
Recommendations
Relational semantics for effect-based program transformations with dynamic allocation
PPDP '07: Proceedings of the 9th ACM SIGPLAN international conference on Principles and practice of declarative programmingWe give a denotational semantics to a region-based effect system tracking reading, writing and allocation in a higher-order language with dynamically allocated integer references.
Effects are interpreted in terms of the preservation of certain binary ...
Specification, Refinement and Verification of Concurrent Systems—An Integration of Object-Z and CSP
This paper presents a method of formally specifying, refining and verifying concurrent systems which uses the object-oriented state-based specification language Object-Z together with the process algebra CSP. Object-Z provides a convenient way of ...
A rely-guarantee-based simulation for verifying concurrent program transformations
POPL '12Verifying program transformations usually requires proving that the resulting program (the target) refines or is equivalent to the original one (the source). However, the refinement relation between individual sequential threads cannot be preserved in ...
Comments