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

Intrinsically-typed definitional interpreters for linear, session-typed languages

Published: 22 January 2020 Publication History

Abstract

An intrinsically-typed definitional interpreter is a concise specification of dynamic semantics, that is executable and type safe by construction. Unfortunately, scaling intrinsically-typed definitional interpreters to more complicated object languages often results in definitions that are cluttered with manual proof work. For linearly-typed languages (including session-typed languages) one has to prove that the interpreter, as well as all the operations on semantic components, treat values linearly. We present new methods and tools that make it possible to implement intrinsically-typed definitional interpreters for linearly-typed languages in a way that hides the majority of the manual proof work. Inspired by separation logic, we develop reusable and composable abstractions for programming with linear operations using dependent types. Using these abstractions, we define interpreters for linear lambda calculi with strong references, concurrency, and session-typed communication in Agda.

References

[1]
Andreas Abel and James Chapman. 2014. Normalization by evaluation in the delay monad: A case study for coinduction via copatterns and sized types. In MSFP (EPTCS), Vol. 153. 51-67.
[2]
Andreas Abel and Nicolai Kraus. 2011. A lambda term representation inspired by linear ordered logic. In LFMTP (EPTCS), Vol. 71. 1-13.
[3]
Guillaume Allais, James Chapman, Conor McBride, and James McKinna. 2017. Type-and-scope safe programs and their proofs. In CPP. 195-207.
[4]
Thorsten Altenkirch, James Chapman, and Tarmo Uustalu. 2015. Monads need not be endofunctors. LMCS 11, 1 (2015).
[5]
Nada Amin and Tiark Rompf. 2017. Type soundness proofs with definitional interpreters. In POPL. 666-679.
[6]
Casper Bach Poulsen, Arjen Rouvoet, Andrew Tolmach, Robbert Krebbers, and Eelco Visser. 2018. Intrinsically-typed definitional interpreters for imperative languages. PACMPL 2, POPL (2018), 16:1-16:34.
[7]
Richard Bornat, Cristiano Calcagno, Peter W. O'Hearn, and Matthew J. Parkinson. 2005. Permission accounting in separation logic. In POPL. 259-270.
[8]
Cristiano Calcagno, Peter W. O'Hearn, and Hongseok Yang. 2007. Local action and abstract separation logic. In LICS. 366-378.
[9]
Venanzio Capretta. 2005. General recursion via coinductive types. LMCS 1, 2 (2005).
[10]
Jesper Cockx. 2017. Dependent pattern matching and proof-relevant unification. Ph.D. Dissertation. Katholieke Universiteit Leuven.
[11]
Jesper Cockx and Andreas Abel. 2016. Sprinkles of extensionality for your vanilla type theory. Abstract of a talk at TYPES (2016).
[12]
Thierry Coquand. 1992. Pattern matching with dependent types. In Informal proceedings of Logical Frameworks, Vol. 92. 66-79.
[13]
Nils Anders Danielsson. 2018. Up-to techniques using sized types. PACMPL 2, POPL (2018), 43:1-43:28.
[14]
Robert Dockins, Aquinas Hobor, and Andrew W. Appel. 2009. A fresh look at separation algebras and share accounting. In APLAS (LNCS), Vol. 5904. 161-177.
[15]
Matthias Felleisen and Daniel P. Friedman. 1987. Control operators, the SECD-machine, and the ?-calculus. In Formal Description of Programming Concepts. 193-222.
[16]
Simon Fowler, Sam Lindley, J. Garrett Morris, and Sára Decova. 2019. Exceptional asynchronous session types: Session types without tiers. PACMPL 3, POPL (2019), 28:1-28:29.
[17]
Simon J. Gay and Vasco T. Vasconcelos. 2010. Linear type theory for asynchronous session types. JFP 20, 1 (2010), 19-50.
[18]
Peter Hancock and Anton Setzer. 2000. Interactive programs in dependent type theory. In CSL (LNCS), Vol. 1862. 317-331.
[19]
Jonas Kastberg Hinrichsen, Jesper Bengtson, and Robbert Krebbers. 2020. Actris: Session-type based reasoning in separation logic. PACMPL 4, POPL (2020), 6:1-6:30.
[20]
Ralf Jung, Jacques-Henri Jourdan, Robbert Krebbers, and Derek Dreyer. 2018. RustBelt: Securing the foundations of the Rust programming language. PACMPL 2, POPL (2018), 66:1-66:34.
[21]
Ralf Jung, Robbert Krebbers, Jacques-Henri Jourdan, Ales Bizjak, Lars Birkedal, and Derek Dreyer. 2018. Iris from the ground up: A modular foundation for higher-order concurrent separation logic. JFP 28 (2018), e20.
[22]
Ralf Jung, David Swasey, Filip Sieczkowski, Kasper Svendsen, Aaron Turon, Lars Birkedal, and Derek Dreyer. 2015. Iris: Monoids and invariants as an orthogonal basis for concurrent reasoning. In POPL. 637-650.
[23]
Anders Kock. 1972. Strong functors and monoidal monads. Archiv der Mathematik 23, 1 (1972), 113-120.
[24]
Robbert Krebbers. 2015. The C standard formalized in Coq. Ph.D. Dissertation. Radboud University Nijmegen.
[25]
Robbert Krebbers, Amin Timany, and Lars Birkedal. 2017. Interactive proofs in higher-order concurrent separation logic. In POPL. 205-217.
[26]
Conor McBride. 2018. Everybody's got to be somewhere. In MSFP (EPTCS), Vol. 275. 53-69.
[27]
Eugenio Moggi. 1991. Notions of computation and monads. Information and Computation 93, 1 (1991), 55-92.
[28]
Ulf Norell. 2009. Dependently typed programming in Agda. In TLDI. 1-2.
[29]
Peter W. O'Hearn and David J. Pym. 1999. The logic of bunched implications. Bulletin of Symbolic Logic 5, 2 (1999), 215-244.

Cited By

View all
  • (2025)Split Decisions: Explicit Contexts for Substructural LanguagesProceedings of the 14th ACM SIGPLAN International Conference on Certified Programs and Proofs10.1145/3703595.3705888(257-271)Online publication date: 10-Jan-2025
  • (2024)Type Inference LogicsProceedings of the ACM on Programming Languages10.1145/36897868:OOPSLA2(2125-2155)Online publication date: 8-Oct-2024
  • (2024)Intrinsically Typed Syntax, a Logical Relation, and the Scourge of the Transfer LemmaProceedings of the 9th ACM SIGPLAN International Workshop on Type-Driven Development10.1145/3678000.3678201(2-15)Online publication date: 28-Aug-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
CPP 2020: Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs
January 2020
381 pages
ISBN:9781450370974
DOI:10.1145/3372885
This work is licensed under a Creative Commons Attribution International 4.0 License.

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 22 January 2020

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Agda
  2. definitional interpreters
  3. dependent types
  4. linear types
  5. mechanized semantics
  6. separation logic
  7. session types
  8. type safety

Qualifiers

  • Research-article

Conference

POPL '20
Sponsor:

Acceptance Rates

Overall Acceptance Rate 18 of 26 submissions, 69%

Upcoming Conference

POPL '26

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)181
  • Downloads (Last 6 weeks)28
Reflects downloads up to 26 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2025)Split Decisions: Explicit Contexts for Substructural LanguagesProceedings of the 14th ACM SIGPLAN International Conference on Certified Programs and Proofs10.1145/3703595.3705888(257-271)Online publication date: 10-Jan-2025
  • (2024)Type Inference LogicsProceedings of the ACM on Programming Languages10.1145/36897868:OOPSLA2(2125-2155)Online publication date: 8-Oct-2024
  • (2024)Intrinsically Typed Syntax, a Logical Relation, and the Scourge of the Transfer LemmaProceedings of the 9th ACM SIGPLAN International Workshop on Type-Driven Development10.1145/3678000.3678201(2-15)Online publication date: 28-Aug-2024
  • (2024)Deadlock-Free Separation Logic: Linearity Yields Progress for Dependent Higher-Order Message PassingProceedings of the ACM on Programming Languages10.1145/36328898:POPL(1385-1417)Online publication date: 5-Jan-2024
  • (2024)Language-parameterized Proofs for Functional Languages with SubtypingFunctional and Logic Programming10.1007/978-981-97-2300-3_15(291-310)Online publication date: 15-May-2024
  • (2024)The Concurrent Calculi Formalisation BenchmarkCoordination Models and Languages10.1007/978-3-031-62697-5_9(149-158)Online publication date: 17-Jun-2024
  • (2023)Dependent Session Protocols in Separation Logic from First Principles (Functional Pearl)Proceedings of the ACM on Programming Languages10.1145/36078567:ICFP(768-795)Online publication date: 31-Aug-2023
  • (2022)Lang-n-Prove: A DSL for Language ProofsProceedings of the 15th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3567512.3567514(16-29)Online publication date: 29-Nov-2022
  • (2022)Multiparty GV: functional multiparty session types with certified deadlock freedomProceedings of the ACM on Programming Languages10.1145/35476386:ICFP(466-495)Online publication date: 31-Aug-2022
  • (2022)Connectivity graphs: a method for proving deadlock freedom based on separation logicProceedings of the ACM on Programming Languages10.1145/34986626:POPL(1-33)Online publication date: 12-Jan-2022
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media