Affiliation:
1. Delft University of Technology, Netherlands
Abstract
Scope graphs are a promising generic framework to model the binding structures of programming languages, bridging formalization and implementation, supporting the definition of type checkers and the automation of type safety proofs. However, previous work on scope graphs has been limited to simple, nominal type systems. In this paper, we show that viewing scopes as types enables us to model the internal structure of types in a range of non-simple type systems (including structural records and generic classes) using the generic representation of scopes. Further, we show that relations between such types can be expressed in terms of generalized scope graph queries. We extend scope graphs with scoped relations and queries. We introduce Statix, a new domain-specific meta-language for the specification of static semantics, based on scope graphs and constraints. We evaluate the scopes as types approach and the Statix design in case studies of the simply-typed lambda calculus with records, System F, and Featherweight Generic Java.
Funder
Nederlandse Organisatie voor Wetenschappelijk Onderzoek
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Reference40 articles.
1. Explicit substitutions
2. Type soundness proofs with definitional interpreters
3. Luca Cardelli. 1988. Structural Subtyping and the Notion of Power Type. In POPL. 70–79. 10.1145/73560.73566 Luca Cardelli. 1988. Structural Subtyping and the Notion of Power Type. In POPL. 70–79. 10.1145/73560.73566
4. Type systems as macros
Cited by
22 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Compiled, Extensible, Multi-language DSLs (Functional Pearl);Proceedings of the ACM on Programming Languages;2024-08-15
2. OIL: an industrial case study in language engineering with Spoofax;Software and Systems Modeling;2024-06-03
3. Formally Modelling the Rijkswaterstaat Tunnel Control Systems in a Constrained Industrial Environment;Electronic Proceedings in Theoretical Computer Science;2024-03-27
4. A Monadic Framework for Name Resolution in Multi-phased Type Checkers;Proceedings of the 22nd ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences;2023-10-22
5. Verifying Well-Typedness Preservation of Refactorings using Scope Graphs;Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs;2023-07-18