Content area

Abstract

The syntax of almost every programming language includes a notion of binder and corresponding bound occurrences, along with the accompanying notions of α-equivalence, capture-avoiding substitution, typing contexts, runtime environments, and so on. In the past, implementing and reasoning about programming languages required careful handling to maintain the correct behaviour of bound variables. Modern programming languages include features that enable constraints like scope safety to be expressed in types. Nevertheless, the programmer is still forced to write the same boilerplate over again for each new implementation of a scope-safe operation (e.g., renaming, substitution, desugaring, printing), and then again for correctness proofs. We present an expressive universe of syntaxes with binding and demonstrate how to (1) implement scope-safe traversals once and for all by generic programming; and (2) how to derive properties of these traversals by generic proving. Our universe description, generic traversals and proofs, and our examples have all been formalised in Agda and are available in the accompanying material available online at https://github.com/gallais/generic-syntax.

Details

Title
A type- and scope-safe universe of syntaxes with binding: their semantics and proofs
Author
Allais, Guillaume 1 ; Atkey, Robert 2 ; Chapman, James 3 ; McBride, Conor 4 ; MCKINNA, JAMES 5 

 University of St Andrews, St Andrews KY16 9AJ, UK (e-mail: [email protected]
 University of Strathclyde, Glasgow G1 1XQ, UK (e-mail: [email protected]
 Input Output HK Ltd., Edinburgh EH8 9BT, UK (e-mail: [email protected]
 University of Strathclyde, Glasgow G1 1XQ, UK (e-mail: [email protected]
 Heriot-Watt University, Edinburgh EH14 4AS, UK (e-mail: [email protected]
Publication title
Volume
31
Publication year
2021
Publication date
2021
Publisher
Cambridge University Press
Place of publication
Cambridge
Country of publication
United Kingdom
ISSN
09567968
e-ISSN
14697653
Source type
Scholarly Journal
Language of publication
English
Document type
Journal Article
Publication history
 
 
Milestone dates
2019-05-31 (Received); 2020-01-30 (Revised); 2020-01-31 (Accepted)
ProQuest document ID
2582895744
Document URL
https://www.proquest.com/scholarly-journals/type-scope-safe-universe-syntaxes-with-binding/docview/2582895744/se-2?accountid=208611
Copyright
© The Author(s), 2021. Published by Cambridge University Press
Last updated
2023-11-27
Database
ProQuest One Academic