A type- and scope-safe universe of syntaxes with binding: their semantics and proofs

Author:

ALLAIS GUILLAUMEORCID,ATKEY ROBERTORCID,CHAPMAN JAMESORCID,MCBRIDE CONORORCID,MCKINNA JAMESORCID

Abstract

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.

Publisher

Cambridge University Press (CUP)

Subject

Software

Reference94 articles.

1. Substitution: A formal methods case study using monads and transformations

2. Dagand, P. (2013) A cosmology of datatypes : reusability and dependent types. Ph.D. thesis. University of Strathclyde, Glasgow, UK.

3. Building domain-specific embedded languages

4. Relative monads formalised;Altenkirch;Journal of Formalized Reasoning.,2014

5. Keuchel, S. (2011 ) Generic Programming With Binders and Scope. Master’s thesis. Utrecht University.

Cited by 7 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Scoped and Typed Staging by Evaluation;Proceedings of the 2024 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation;2024-01-11

2. A Formal Treatment of Bidirectional Typing;Lecture Notes in Computer Science;2024

3. Semantic analysis of normalisation by evaluation for typed lambda calculus;Mathematical Structures in Computer Science;2022-09

4. Datatype-generic programming meets elaborator reflection;Proceedings of the ACM on Programming Languages;2022-08-29

5. Formal metatheory of second-order abstract syntax;Proceedings of the ACM on Programming Languages;2022-01-12

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3