Pipelines and Beyond: Graph Types for ADTs with Futures (2024)

  • Authors:
  • Francis Rinaldi Illinois Institute of Technology, Chicago, USA

    Illinois Institute of Technology, Chicago, USA

    Pipelines and Beyond: Graph Types for ADTs with Futures (3)0009-0005-0007-0898

    View Profile

    ,
  • june wunder Boston University, Boston, USA

    Boston University, Boston, USA

    Pipelines and Beyond: Graph Types for ADTs with Futures (4)0000-0002-3280-9731

    View Profile

    ,
  • Arthur Azevedo de Amorim Rochester Institute of Technology, Rochester, USA

    Rochester Institute of Technology, Rochester, USA

    Pipelines and Beyond: Graph Types for ADTs with Futures (5)0000-0001-9916-6614

    View Profile

    ,
  • Stefan K. Muller Illinois Institute of Technology, Chicago, USA

    Illinois Institute of Technology, Chicago, USA

    Pipelines and Beyond: Graph Types for ADTs with Futures (6)0000-0002-3210-9727

    View Profile

Proceedings of the ACM on Programming LanguagesVolume 8Issue POPLArticle No.: 17pp 482–511https://doi.org/10.1145/3632859

Published:05 January 2024Publication HistoryPipelines and Beyond: Graph Types for ADTs with Futures (7)

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 Downloads91

Last 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
  • PDF

Proceedings of the ACM on Programming Languages

Volume 8, Issue POPL

PreviousArticleNextArticle

Pipelines and Beyond: Graph Types for ADTs with Futures (8)

Skip Abstract Section

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

  1. [n. d.]. The Rust language. https://www.rust-lang.org Accessed: 2023-07-07Google ScholarPipelines and Beyond: Graph Types for ADTs with Futures (9)
  2. Ö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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (10)Digital Library
  3. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (12)Digital Library
  4. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (14)Digital Library
  5. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (16)Digital Library
  6. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (18)Digital Library
  7. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (20)Digital Library
  8. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (22)Cross Ref
  9. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (24)Cross Ref
  10. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (26)Digital Library
  11. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (28)Digital Library
  12. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (30)Cross Ref
  13. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (32)
  14. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (33)Digital Library
  15. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (35)Digital Library
  16. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (37)Digital Library
  17. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (39)Cross Ref
  18. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (41)Digital Library
  19. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (43)Digital Library
  20. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (45)Digital Library
  21. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (47)Digital Library
  22. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (49)Digital Library
  23. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (51)Cross Ref
  24. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (53)
  25. Jorge E Rodriguez Bezos. 1969. A Graph Model for Parallel Computations. Ph. D. Dissertation. Massachusetts Institute of Technology. Cambridge, Massachusetts.Google ScholarPipelines and Beyond: Graph Types for ADTs with Futures (54)
  26. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (55)Digital Library
  27. Daniel Spoonhower. 2009. Scheduling Deterministic Parallel Programs. Ph. D. Dissertation. Carnegie Mellon University. Pittsburgh, PA, USA.Google ScholarPipelines and Beyond: Graph Types for ADTs with Futures (57)
  28. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (58)Digital Library
  29. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (60)Digital Library
  30. Mark Weiser. 1984. Program Slicing. IEEE Transactions on Software Engineering, SE-10, 4 (1984), 352–357. https://doi.org/10.1109/TSE.1984.5010248Google ScholarPipelines and Beyond: Graph Types for ADTs with Futures (62)Digital Library
  31. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (64)Digital Library
  32. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (66)Digital Library
  33. 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 ScholarPipelines and Beyond: Graph Types for ADTs with Futures (68)Digital Library

Cited By

View all

Pipelines and Beyond: Graph Types for ADTs with Futures (70)

    Index Terms

    1. Pipelines and Beyond: Graph Types for ADTs with Futures
      1. Software and its engineering

        1. Software notations and tools

          1. General programming languages

            1. Language types

              1. Parallel programming languages

          2. Software organization and properties

            1. Software functional properties

              1. Formal methods

                1. Automated static analysis

          3. Theory of computation

            1. Logic

              1. 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

            Pipelines and Beyond: Graph Types for ADTs with Futures (71)

            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.

                Request Permissions

                Check for updates

                Pipelines and Beyond: Graph Types for ADTs with Futures (73)

                Author Tags

                • affine type system
                • computation graphs
                • cost graphs
                • futures
                • graph types
                • parallel programs
                • pipelining

                Qualifiers

                • research-article

                Conference

                Funding Sources

                • Pipelines and Beyond: Graph Types for ADTs with Futures (76)

                  Other Metrics

                  View Article Metrics

                • Bibliometrics
                • Citations0
                • Article Metrics

                  • Total Citations

                    View 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.

                PDF

                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

                  Export Citations

                    Pipelines and Beyond: Graph Types for ADTs with Futures (2024)
                    Top Articles
                    Latest Posts
                    Article information

                    Author: Moshe Kshlerin

                    Last Updated:

                    Views: 6311

                    Rating: 4.7 / 5 (57 voted)

                    Reviews: 80% of readers found this page helpful

                    Author information

                    Name: Moshe Kshlerin

                    Birthday: 1994-01-25

                    Address: Suite 609 315 Lupita Unions, Ronnieburgh, MI 62697

                    Phone: +2424755286529

                    Job: District Education Designer

                    Hobby: Yoga, Gunsmithing, Singing, 3D printing, Nordic skating, Soapmaking, Juggling

                    Introduction: My name is Moshe Kshlerin, I am a gleaming, attractive, outstanding, pleasant, delightful, outstanding, famous person who loves writing and wants to share my knowledge and understanding with you.