Print Email Facebook Twitter Scopes as Types Title Scopes as Types Author van Antwerpen, H. (TU Delft Programming Languages) Poulsen, C.B. (TU Delft Programming Languages) Rouvoet, A.J. (TU Delft Programming Languages) Visser, Eelco (TU Delft Programming Languages) Date 2018 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.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. To reference this document use: http://resolver.tudelft.nl/uuid:9aad733b-23d4-45d7-b52f-331b80c5d029 DOI https://doi.org/10.1145/3276484 ISSN 2475-1421 Source Proceedings of the ACM on Programming Languages, 2 (OOPSLA), 1-30 Part of collection Institutional Repository Document type journal article Rights © 2018 H. van Antwerpen, C.B. Poulsen, A.J. Rouvoet, Eelco Visser Files PDF oopsla18main_p49_p.pdf 571.54 KB Close viewer /islandora/object/uuid:9aad733b-23d4-45d7-b52f-331b80c5d029/datastream/OBJ/view