research-article Open Access Artifacts Available / v1.1 Artifacts Evaluated & Reusable / v1.1
- Authors:
- Francis Rinaldi Illinois Institute of Technology, Chicago, USA
- june wunder Boston University, Boston, USA
- Arthur Azevedo de Amorim Rochester Institute of Technology, Rochester, USA
- Stefan K. Muller Illinois Institute of Technology, Chicago, USA
Proceedings of the ACM on Programming LanguagesVolume 8Issue POPLArticle No.: 17pp 482–511https://doi.org/10.1145/3632859
Related Artifact: Implementation for "Pipelines and Beyond: Graph Types for ADTs with Futures" January 2024softwarehttps://doi.org/10.5281/zenodo.10126819
- 0citation
- 91
- Downloads
Metrics
Total Citations0Total Downloads91Last 12 Months91
Last 6 weeks47
- Get Citation Alerts
New Citation Alert added!
This alert has been successfully added and will be sent to:
You will be notified whenever a record that you have chosen has been cited.
To manage your alert preferences, click on the button below.
Manage my Alerts
New Citation Alert!
Please log in to your account
- Publisher Site
- eReader
Proceedings of the ACM on Programming Languages
Volume 8, Issue POPL
PreviousArticleNextArticle
Abstract
Parallel programs are frequently modeled as dependency or cost graphs, which can be used to detect various bugs, or simply to visualize the parallel structure of the code. However, such graphs reflect just one particular execution and are typically constructed in a post-hoc manner. Graph types, which were introduced recently to mitigate this problem, can be assigned statically to a program by a type system and compactly represent the family of all graphs that could result from the program.
Unfortunately, prior work is restricted in its treatment of futures, an increasingly common and especially dynamic form of parallelism. In short, each instance of a future must be statically paired with a vertex name. Previously, this led to the restriction that futures could not be placed in collections or be used to construct data structures. Doing so is not a niche exercise: such structures form the basis of numerous algorithms that use forms of pipelining to achieve performance not attainable without futures. All but the most limited of these examples are out of reach of prior graph type systems.
In this paper, we propose a graph type system that allows for almost arbitrary combinations of futures and recursive data types. We do so by indexing datatypes with a type-level vertex structure, a codata structure that supplies unique vertex names to the futures in a data structure. We prove the soundness of the system in a parallel core calculus annotated with vertex structures and associated operations. Although the calculus is annotated, this is merely for convenience in defining the type system. We prove that it is possible to annotate arbitrary recursive types with vertex structures, and show using a prototype inference engine that these annotations can be inferred from OCaml-like source code for several complex parallel algorithms.
References
- [n. d.]. The Rust language. https://www.rust-lang.org Accessed: 2023-07-07Google Scholar
- Özalp Babaoğlu, Keith Marzullo, and Fred B. Schneider. 1993. A Formalization of Priority Inversion. Real-Time Systems, 5, 4 (1993), 285–303. https://doi.org/10.1007/BF01088832Google Scholar
Digital Library
- Utpal Banerjee, Brian Bliss, Zhiqiang Ma, and Paul Petersen. 2006. A Theory of Data Race Detection. In Proceedings of the 2006 Workshop on Parallel and Distributed Systems: Testing and Debugging (PADTAD ’06). Association for Computing Machinery, New York, NY, USA. 69–78. isbn:1595934146 https://doi.org/10.1145/1147403.1147416Google Scholar
Digital Library
- Olivier Blanvillain, Jonathan Immanuel Brachthäuser, Maxime Kjaer, and Martin Odersky. 2022. Type-level programming with match types. Proceedings of the ACM on Programming Languages, 6 (2022), 1, issn:24751421 https://doi.org/10.1145/3498698Google Scholar
Digital Library
- Guy Blelloch and John Greiner. 1995. Parallelism in Sequential Functional Languages. In Proceedings of the Seventh International Conference on Functional Programming Languages and Computer Architecture (FPCA ’95). Association for Computing Machinery, New York, NY, USA. 226–237. isbn:0897917197 https://doi.org/10.1145/224164.224210Google Scholar
Digital Library
- Guy E. Blelloch and John Greiner. 1996. A Provable Time and Space Efficient Implementation of NESL. In Proceedings of the First ACM SIGPLAN International Conference on Functional Programming (ICFP ’96). Association for Computing Machinery, New York, NY, USA. 213–225. isbn:0897917707 https://doi.org/10.1145/232627.232650Google Scholar
Digital Library
- Guy E. Blelloch and Margaret Reid-Miller. 1997. Pipelining with Futures. In Proceedings of the Ninth Annual ACM Symposium on Parallel Algorithms and Architectures (SPAA ’97). Association for Computing Machinery, New York, NY, USA. 249–259. isbn:0897918908 https://doi.org/10.1145/258492.258517Google Scholar
Digital Library
- Zhenqiang Chen, Baowen Xu, Jianjun Zhao, and Hongji Yang. 2002. Static Dependency Analysis for Concurrent Ada 95 Programs. In Reliable Software Technologies — Ada-Europe 2002, Johann Blieberger and Alfred Strohmeier (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg. 219–230. isbn:978-3-540-48046-4 https://doi.org/10.1007/3-540-48046-3_17Google Scholar
Cross Ref
- Jingde Cheng. 1993. Process dependence net of distributed programs and its applications in development of distributed systems. In Proceedings of 1993 IEEE 17th International Computer Software and Applications Conference COMPSAC ’93. 231–240. https://doi.org/10.1109/CMPSAC.1993.404187Google Scholar
Cross Ref
- Tiago Cogumbreiro, Raymond Hu, Francisco Martins, and Nobuko Yoshida. 2018. Dynamic Deadlock Verification for General Barrier Synchronisation. ACM Trans. Program. Lang. Syst., 41, 1 (2018), Article 1, Dec., 38 pages. issn:0164-0925 https://doi.org/10.1145/3229060Google Scholar
Digital Library
- Matthew Fluet, Greg Morrisett, and Amal Ahmed. 2006. Linear Regions Are All You Need. In Proceedings of the 15th European Conference on Programming Languages and Systems (ESOP’06). Springer-Verlag, Berlin, Heidelberg. 7–21. isbn:354033095X https://doi.org/10.1007/11693024_2Google Scholar
Digital Library
- Emden R. Gansner and Stephen C. North. 2000. An Open Graph Visualization System and Its Applications to Software Engineering. Softw. Pract. Exper., 30, 11 (2000), Sept., 1203–1233. issn:0038-0644 https://doi.org/10.1002/1097-024X(200009)30:11<1203::AID-SPE338>3.0.CO;2-NGoogle Scholar
Cross Ref
- Fritz Henglein, Henning Makholm, and Henning Niss. 2005. Effect Types and Region-Based Memory Management. In Advanced Topics in Types and Programming Languages, Benjamin C. Pierce (Ed.). MIT Press, Cambridge, Massachusetts. 87–135.Google Scholar
- Thomas Bracht Laumann Jespersen, Philip Munksgaard, and Ken Friis Larsen. 2015. Session Types for Rust. In Proceedings of the 11th ACM SIGPLAN Workshop on Generic Programming (WGP 2015). Association for Computing Machinery, New York, NY, USA. 13–22. isbn:9781450338103 https://doi.org/10.1145/2808098.2808100Google Scholar
Digital Library
- Trevor Jim, J. Greg Morrisett, Dan Grossman, Michael W. Hicks, James Cheney, and Yanling Wang. 2002. Cyclone: A Safe Dialect of C. In Proceedings of the General Track of the Annual Conference on USENIX Annual Technical Conference (ATEC ’02). USENIX Association, USA. 275–288. isbn:1880446006Google Scholar
Digital Library
- Richard M. Karp and Rayamond E. Miller. 1966. Properties of a Model for Parallel Computations: Determinacy, Termination, Queueing. SIAM J. Appl. Math., 14, 6 (1966), 1390–1411. https://doi.org/10.1137/0114108Google Scholar
Digital Library
- Y. Kasahara, Y. Nomura, M. Kamachi, J. Cheng, and K. Ushijima. 1995. An integrated support environment for distributed software development based on unified program representations. In Proceedings 1995 Asia Pacific Software Engineering Conference. 254–263. https://doi.org/10.1109/APSEC.1995.496974Google Scholar
Cross Ref
- Oleg Kiselyov, Ralf Lämmel, and Keean Schupke. 2004. Strongly typed heterogeneous collections. Proceedings of the ACM SIGPLAN 2004 Haskell Workshop, Haskell’04, 96–107. isbn:1581138504 https://doi.org/10.1145/1017472.1017488Google Scholar
Digital Library
- Bogdan Korel. 1987. The program dependence graph in static program testing. Inform. Process. Lett., 24, 2 (1987), 103–108. issn:0020-0190 https://doi.org/10.1016/0020-0190(87)90102-5Google Scholar
Digital Library
- Nicolas Lagaillardie, Rumyana Neykova, and Nobuko Yoshida. 2020. Implementing Multiparty Session Types in Rust. In Coordination Models and Languages: 22nd IFIP WG 6.1 International Conference, COORDINATION 2020, Held as Part of the 15th International Federated Conference on Distributed Computing Techniques, DisCoTec 2020, Valletta, Malta, June 15–19, 2020, Proceedings. Springer-Verlag, Berlin, Heidelberg. 127–136. isbn:978-3-030-50028-3 https://doi.org/10.1007/978-3-030-50029-0_8Google Scholar
Digital Library
- Mae Milano, Joshua Turcotti, and Andrew C. Myers. 2022. A Flexible Type System for Fearless Concurrency. In Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation (PLDI 2022). Association for Computing Machinery, New York, NY, USA. 458–473. isbn:9781450392655 https://doi.org/10.1145/3519939.3523443Google Scholar
Digital Library
- Stefan K. Muller. 2022. Static Prediction of Parallel Computation Graphs. Proc. ACM Program. Lang., 6, POPL (2022), Article 46, Jan., 31 pages. https://doi.org/10.1145/3498708Google Scholar
Digital Library
- Liam O’Connor, Zilin Chen, Christine Rizkallah, Vincent Jackson, Sidney Amani, Gerwin Klein, Toby Murray, Thomas Sewell, and Gabriele Keller. 2021. Cogent: uniqueness types and certifying compilation. J. Funct. Program., 31 (2021), e25. https://doi.org/10.1017/S095679682100023XGoogle Scholar
Cross Ref
- Francis Rinaldi, june wunder, Arthur Aevedo De Amorim, and Stefan K. Muller. 2023. Pipelines and Beyond: Graph Types for ADTs with Futures. arxiv:2311.06984.Google Scholar
- Jorge E Rodriguez Bezos. 1969. A Graph Model for Parallel Computations. Ph. D. Dissertation. Massachusetts Institute of Technology. Cambridge, Massachusetts.Google Scholar
- K. C. Sivaramakrishnan, Stephen Dolan, Leo White, Sadiq Jaffer, Tom Kelly, Anmol Sahoo, Sudha Parimala, Atul Dhiman, and Anil Madhavapeddy. 2020. Retrofitting parallelism onto OCaml. Proc. ACM Program. Lang., 4, ICFP (2020), 113:1–113:30. https://doi.org/10.1145/3408995Google Scholar
Digital Library
- Daniel Spoonhower. 2009. Scheduling Deterministic Parallel Programs. Ph. D. Dissertation. Carnegie Mellon University. Pittsburgh, PA, USA.Google Scholar
- David Thibodeau, Andrew Cave, and Brigitte Pientka. 2016. Indexed Codata Types. In Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming (ICFP 2016). Association for Computing Machinery, New York, NY, USA. 351–363. isbn:9781450342193 https://doi.org/10.1145/2951913.2951929Google Scholar
Digital Library
- Mads Tofte and Jean-Pierre Talpin. 1997. Region-Based Memory Management. Information and Computation, 132, 2 (1997), 109–176. issn:0890-5401 https://doi.org/10.1006/inco.1996.2613Google Scholar
Digital Library
- Mark Weiser. 1984. Program Slicing. IEEE Transactions on Software Engineering, SE-10, 4 (1984), 352–357. https://doi.org/10.1109/TSE.1984.5010248Google Scholar
Digital Library
- Hongwei Xi and Frank Pfenning. 1999. Dependent Types in Practical Programming. In Proceedings of the 26th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’99). Association for Computing Machinery, New York, NY, USA. 214–227. isbn:1581130953 https://doi.org/10.1145/292540.292560Google Scholar
Digital Library
- Brent A. Yorgey, Stephanie Weirich, Julien Cretin, Simon Peyton Jones, Dimitrios Vytiniotis, and José Pedro Magalhães. 2012. Giving Haskell a Promotion. In Proceedings of the 8th ACM SIGPLAN Workshop on Types in Language Design and Implementation (TLDI ’12). Association for Computing Machinery, New York, NY, USA. 53–66. isbn:9781450311205 https://doi.org/10.1145/2103786.2103795Google Scholar
Digital Library
- Christoph Zenger. 1997. Indexed types. Theoretical Computer Science, 187, 1 (1997), 147–165. issn:0304-3975 https://doi.org/10.1016/S0304-3975(97)00062-5Google Scholar
Digital Library
Cited By
View all
Index Terms
Pipelines and Beyond: Graph Types for ADTs with Futures
Software and its engineering
Software notations and tools
General programming languages
Language types
Parallel programming languages
Software organization and properties
Software functional properties
Formal methods
Automated static analysis
Theory of computation
Logic
Linear logic
Recommendations
- Static prediction of parallel computation graphs
Many algorithms for analyzing parallel programs, for example to detect deadlocks or data races or to calculate the execution cost, are based on a model variously known as a cost graph, computation graph or dependency graph, which captures the parallel ...
Read More
- Language-Agnostic Static Deadlock Detection for Futures
PPoPP '24: Proceedings of the 29th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming
Deadlocks, in which threads wait on each other in a cyclic fashion and can't make progress, have plagued parallel programs for decades. In recent years, as the parallel programming mechanism known as futures has gained popularity, interest in preventing ...
Read More
- Qualified types for MLF
Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
MLF is a type system that extends a functional language with impredicative rank-n polymorphism. Type inference remains possible and only in some clearly defined situations, a local type annotation is required. Qualified types are a general concept that ...
Read More
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
Get this Article
- Information
- Contributors
Published in
Proceedings of the ACM on Programming Languages Volume 8, Issue POPL
January 2024
2820 pages
EISSN:2475-1421
DOI:10.1145/3554315
- Editor:
- Michael Hicks
Amazon, USA
Issue’s Table of Contents
Copyright © 2024 Owner/Author
This work is licensed under a Creative Commons Attribution 4.0 International License.
Sponsors
In-Cooperation
Publisher
Association for Computing Machinery
New York, NY, United States
Publication History
- Published: 5 January 2024
Published in pacmpl Volume 8, Issue POPL
Permissions
Request permissions about this article.
Author Tags
- affine type system
- computation graphs
- cost graphs
- futures
- graph types
- parallel programs
- pipelining
Qualifiers
- research-article
Conference
Funding Sources
Other Metrics
View Article Metrics
- Bibliometrics
- Citations0
Article Metrics
- View Citations
Total Citations
91
Total Downloads
- Downloads (Last 12 months)91
- Downloads (Last 6 weeks)47
Other Metrics
View Author Metrics
Cited By
This publication has not been cited yet
PDF Format
View or Download as a PDF file.
eReader
View online with eReader.
eReader
Digital Edition
View this article in digital edition.
View Digital Edition
- Figures
- Other
Close Figure Viewer
Browse AllReturn
Caption
View Issue’s Table of Contents