Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3414080.3414087acmotherconferencesArticle/Chapter ViewAbstractPublication PagesppdpConference Proceedingsconference-collections
research-article
Open access

Verified Linear Session-Typed Concurrent Programming

Published: 21 September 2020 Publication History

Abstract

We present a system of linear session types that integrates several features aimed at verification of different properties of concurrent programs, specifically types indexed with arithmetic expressions, linear constraints and quantification. We prove the standard type safety properties of session fidelity and deadlock freedom. In order to control the verbosity of programs we introduce implicit syntax and an algorithm for reconstruction, which is complete under some mild assumptions on the structure of types. We then illustrate the expressive power of our language (called Rast) with a variety of examples, including normalization for the linear λ-calculus, balanced ternary arithmetic, binary counters and tries.

References

[1]
Bernardo Almeida, Andreia Mordido, and Vasco T. Vasconcelos. 2020. Deciding the Bisimilarity of Context-Free Session Types. In 16th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS 2020), A. Biere and D. Parker (Eds.). Springer LNCS 12079, Dublin, Ireland, 39–56.
[2]
Jean-Marc Andreoli. 1992. Logic Programming with Focusing Proofs in Linear Logic. Journal of Logic and Computation 2 (1992), 297–347.
[3]
Pedro Baltazar, Dimitris Mostrous, and Vasco T. Vasconcelos. 2012. Linearly Refined Session Types. In International Workshop on Linearity (LINEARITY 2012), S. Alves and I. Mackie (Eds.). EPTCS 101, Tallinn, Estonia, 38–49.
[4]
Nick Benton. 1994. A Mixed Linear and Non-Linear Logic: Proofs, Terms and Models. In Selected Papers from the 8th International Workshop on Computer Science Logic (CLS’94), Leszek Pacholski and Jerzy Tiuryn (Eds.). Springer LNCS 933, Kazimierz, Poland, 121–135. An extended version appears as Technical Report UCAM-CL-TR-352, University of Cambridge.
[5]
Luís Caires and Frank Pfenning. 2010. Session Types as Intuitionistic Linear Propositions. In Proceedings of the 21st International Conference on Concurrency Theory (CONCUR 2010), P.Gastin and F.Laroussinie (Eds.). Springer LNCS 6269, Paris, France, 222–236.
[6]
Luís Caires, Frank Pfenning, and Bernardo Toninho. 2014. Linear Logic Propositions as Session Types. Mathematical Structures in Computer Science 760 (11 2014).
[7]
Iliano Cervesato and Andre Scedrov. 2009. Relating state-based and process-based concurrency through linear logic (full-version). Information and Computation 207, 10 (2009), 1044 – 1077. https://doi.org/10.1016/j.ic.2008.11.006 Special issue: 13th Workshop on Logic, Language, Information and Computation (WoLLIC 2006).
[8]
David C Cooper. 1972. Theorem proving in arithmetic without multiplication. Machine intelligence 7, 91-99 (1972), 300.
[9]
Ankush Das, Jan Hoffmann, and Frank Pfenning. 2018. Parallel Complexity Analysis with Temporal Session Types. Proc. ACM Program. Lang. 2, ICFP, Article 91 (July 2018), 30 pages. https://doi.org/10.1145/3236786
[10]
Ankush Das, Jan Hoffmann, and Frank Pfenning. 2018. Work Analysis with Resource-Aware Session Types. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science (Oxford, United Kingdom) (LICS ’18). ACM, New York, NY, USA, 305–314. https://doi.org/10.1145/3209108.3209146
[11]
Ankush Das and Frank Pfenning. 2020. Rast: Resource-Aware Session Types with Arithmetic Refinements (System Description). In 5th International Conference on Formal Structures for Computation and Deduction (FSCD 2020)(Leibniz International Proceedings in Informatics (LIPIcs), Vol. 167), Zena M. Ariola (Ed.). Schloss Dagstuhl–Leibniz-Zentrum für Informatik, Dagstuhl, Germany, 33:1–33:17. https://doi.org/10.4230/LIPIcs.FSCD.2020.33
[12]
Ankush Das and Frank Pfenning. 2020. Session Types with Arithmetic Refinements. arxiv:2005.05970 [cs.PL]
[13]
Farzaneh Derakhshan and Frank Pfenning. 2019. Circular Proofs as Session-Typed Processes: A Local Validity Condition. arxiv:1908.01909 [cs.LO]
[14]
Juliana Franco and Vasco T. Vasconcelos. 2013. A Concurrent Programming Language with Refined Session Types. In Software Engineering and Formal Methods (SEFM 2013), S. Counsell and M. Núñez (Eds.). Springer LNCS 8368, Madrid, Spain, 15–28.
[15]
Simon Gay and Malcolm Hole. 2005. Subtyping for session types in the pi calculus. Acta Informatica 42, 2 (01 Nov 2005), 191–225. https://doi.org/10.1007/s00236-005-0177-z
[16]
J. Y. Girard and Y. Lafont. 1987. Linear logic and lazy computation. In TAPSOFT ’87, Hartmut Ehrig, Robert Kowalski, Giorgio Levi, and Ugo Montanari (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 52–66.
[17]
Hannah Gommerstadt. 2019. Session-Typed Concurrent Contracts. Ph.D. Dissertation. Carnegie Mellon University. Available as Technical Report CMU-CS-19-119.
[18]
Hannah Gommerstadt, Limin Jia, and Frank Pfenning. 2018. Session-Typed Concurrent Contracts. In Programming Languages and Systems, Amal Ahmed (Ed.). Springer International Publishing, Cham, 771–798.
[19]
Dennis Griffith and Elsa L. Gunter. 2013. LiquidPi: Inferrable Dependent Session Types. In Proceedings of the NASA Formal Methods Symposium. Springer LNCS 7871, 186–197.
[20]
Kohei Honda. 1993. Types for dyadic interaction. In CONCUR’93, Eike Best (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 509–523.
[21]
Kohei Honda, Vasco T. Vasconcelos, and Makoto Kubo. 1998. Language primitives and type discipline for structured communication-based programming. In Programming Languages and Systems, Chris Hankin (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 122–138.
[22]
Kohei Honda, Nobuko Yoshida, and Marco Carbone. 2008. Multiparty Asynchronous Session Types. In Proceedings of the 35th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (San Francisco, California, USA) (POPL ’08). ACM, New York, NY, USA, 273–284. https://doi.org/10.1145/1328438.1328472
[23]
Dominic Orchard, Vilem-Benjamin Liepelt, and Harley Eades, III. 2019. Quantitative Program Reasoning with Graded Modal Types. In International Conference on Functional Programming (ICFP 2019). ACM, Berlin, Germany, 110:1–110:30.
[24]
Frank Pfenning, Luís Caires, and Bernardo Toninho. 2011. Proof-Carrying Code in a Session-Typed Process Calculus. In 1st International Conference on Certified Programs and Proofs (CPP 2011). Springer LNCS 7086, Kenting, Taiwan, 21–36.
[25]
Frank Pfenning and Dennis Griffith. 2015. Polarized Substructural Session Types. In Foundations of Software Science and Computation Structures, Andrew Pitts (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 3–22.
[26]
Klaas Pruiksma and Frank Pfenning. 2019. A Message-Passing Interpretation of Adjoint Logic. In Workshop on Programming Language Approaches to Concurrency and Communication-Centric Software (PLACES), F. Martins and D. Orchard (Eds.). EPTCS 291, Prague, Czech Republic, 60–79.
[27]
Rast 2020. Rast Language. https://bitbucket.org/fpfenning/rast/src/master/rast/Version 1.01.
[28]
Peter Thiemann and Vasco T. Vasconcelos. 2016. Context-Free Session Types. In Proceedings of the 21st International Conference on Functional Programming (ICFP 2016). ACM, Nara, Japan, 462–475.
[29]
Peter Thiemann and Vasco T. Vasconcelos. 2020. Label-Dependent Session Types. In Proceedings of the Symposium on Programming Languages (POPL 2020), L. Birkedal(Ed.). ACM Proceedings on Programming Languages 4, New Orleans, Louisiana, USA, 67:1–67:29.
[30]
Bernardo Toninho, Luís Caires, and Frank Pfenning. 2011. Dependent Session Types via Intuitionistic Linear Type Theory. In Proceedings of the 13th International Conference on Principles and Practice of Declarative Programming (PPDP 2011), P.Schneider-Kamp and M.Hanus (Eds.). ACM, Odense, Denmark, 161–172.
[31]
Bernardo Toninho and Nobuko Yoshida. 2018. Depending on Session-Typed Processes. In Foundations of Software Science and Computation Structures, Christel Baier and Ugo Dal Lago (Eds.). Springer International Publishing, Cham, 128–145.
[32]
Bernardo Toninho and Nobuko Yoshida. 2018. Depending on Session-Types Processes. In 21st International Conference on Foundations of Software Science and Computation Structures (FoSSaCS 2018), C. Baier and U. Dal Lago (Eds.). Springer LNCS 10803, Thessaloniki, Greece, 128–145.
[33]
Vasco T. Vasconcelos. 2012. Fundamentals of session types. Information and Computation 217 (2012), 52 – 70. https://doi.org/10.1016/j.ic.2012.05.002
[34]
Philip Wadler. 2012. Propositions as Sessions. In Proceedings of the 17th International Conference on Functional Programming (ICFP 2012). ACM Press, Copenhagen, Denmark, 273–286.
[35]
Hanwen Wu and Hongwei Xi. 2017. Dependent Session Types. arxiv:1704.07004 [cs.PL]
[36]
Hongwei Xi and Frank Pfenning. 1999. Dependent Types in Practical Programming. In Conference Record of the 26th Symposium on Principles of Programming Languages (POPL 1999), A. Aiken (Ed.). ACM Press, San Antonio, Texas, USA, 214–227.
[37]
Christoph Zenger. 1997. Indexed Types. Theoretical Computer Science 187 (1997), 147–165.
[38]
Fangyi Zhou. 2019. Refinement Session Types. Master’s thesis. Imperial College London.
[39]
Fangyi Zhou, Francisco Ferreira, Rumyana Neykova, and Nobuko Yoshida. 2019. Fluid Types: Statically Verified Distributed Protocols with Refinements. In 11th Workshop on Programming Language Approaches to Concurrency and Communication-Centric Software.

Cited By

View all
  • (2023)Probabilistic Resource-Aware Session TypesProceedings of the ACM on Programming Languages10.1145/35712597:POPL(1925-1956)Online publication date: 9-Jan-2023
  • (2022)Nested Session TypesACM Transactions on Programming Languages and Systems10.1145/353965644:3(1-45)Online publication date: 15-Jul-2022
  • (2021)A Decade of Dependent Session TypesProceedings of the 23rd International Symposium on Principles and Practice of Declarative Programming10.1145/3479394.3479398(1-3)Online publication date: 6-Sep-2021
  • Show More Cited By
  1. Verified Linear Session-Typed Concurrent Programming

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Other conferences
    PPDP '20: Proceedings of the 22nd International Symposium on Principles and Practice of Declarative Programming
    September 2020
    179 pages
    ISBN:9781450388214
    DOI:10.1145/3414080
    This work is licensed under a Creative Commons Attribution International 4.0 License.

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 21 September 2020

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Concurrency
    2. Linear types
    3. Session types
    4. Verification

    Qualifiers

    • Research-article
    • Research
    • Refereed limited

    Funding Sources

    • NSF

    Conference

    PPDP '20

    Acceptance Rates

    Overall Acceptance Rate 230 of 486 submissions, 47%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)85
    • Downloads (Last 6 weeks)20
    Reflects downloads up to 30 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)Probabilistic Resource-Aware Session TypesProceedings of the ACM on Programming Languages10.1145/35712597:POPL(1925-1956)Online publication date: 9-Jan-2023
    • (2022)Nested Session TypesACM Transactions on Programming Languages and Systems10.1145/353965644:3(1-45)Online publication date: 15-Jul-2022
    • (2021)A Decade of Dependent Session TypesProceedings of the 23rd International Symposium on Principles and Practice of Declarative Programming10.1145/3479394.3479398(1-3)Online publication date: 6-Sep-2021
    • (2021)Nested Session TypesProgramming Languages and Systems10.1007/978-3-030-72019-3_7(178-206)Online publication date: 23-Mar-2021

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    HTML Format

    View this article in HTML Format.

    HTML Format

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media