The Dependent Object Types (DOT) calculus aims to formalize the Scala programming language with a focus on path-dependent types - types such as x.a(1 )... a(n).T that depend on the runtime value of a path x.a(1) ... a(n) to an object. Unfortunately, existing formulations of DOT can model only types of the form x.A which depend on variables rather than general paths. This restriction makes it impossible to model nested module dependencies. Nesting small components inside larger ones is a necessary ingredient of a modular, scalable language. DOT's variable restriction thus undermines its ability to fully formalize a variety of programming-language features including Scala's module system, family polymorphism, and covariant specialization. This paper presents the pDOT calculus, which generalizes DOT to support types that depend on paths of arbitrary length, as well as singleton types to track path equality. We show that naive approaches to add paths to DOT make it inherently unsound, and present necessary conditions for such a calculus to be sound. We discuss the key changes necessary to adapt the techniques of the DOT soundness proofs so that they can be applied to pDOT. Our paper comes with a Coq-mechanized type-safety proof of pDOT. With support for paths of arbitrary length, pDOT can realize DOT's full potential for formalizing Scala-like calculi.
机构:
Shandong Univ, Zhongtai Secur Inst Financial Studies, Sch Math, Jinan 250100, Peoples R ChinaShandong Univ, Zhongtai Secur Inst Financial Studies, Sch Math, Jinan 250100, Peoples R China
Peng, Shige
Song, Yongsheng
论文数: 0引用数: 0
h-index: 0
机构:
Chinese Acad Sci, Acad Math & Syst Sci, Beijing 100190, Peoples R China
Univ Chinese Acad Sci, Sch Math Sci, Beijing 100049, Peoples R ChinaShandong Univ, Zhongtai Secur Inst Financial Studies, Sch Math, Jinan 250100, Peoples R China
机构:
Univ Evry Val dEssonne, Lab Math & Modelisat Evry LaMME, 23 Blvd France, F-91037 Evry, FranceUniv Evry Val dEssonne, Lab Math & Modelisat Evry LaMME, 23 Blvd France, F-91037 Evry, France
Chevalier, Etienne
Vath, Vathana Ly
论文数: 0引用数: 0
h-index: 0
机构:
Univ Evry Val dEssonne, Lab Math & Modelisat Evry LaMME, 23 Blvd France, F-91037 Evry, France
ENSIIE, 1 Sq Resistance, F-91000 Evry, FranceUniv Evry Val dEssonne, Lab Math & Modelisat Evry LaMME, 23 Blvd France, F-91037 Evry, France