Singleton Types Here Singleton Types There Singleton Types Everywhere

被引:9
|
作者
Monnier, Stefan [1 ]
Haguenauer, David [1 ]
机构
[1] Univ Montreal, Montreal, PQ H3C 3J7, Canada
来源
PLPV'10: PROCEEDINGS OF THE 2010 ACM SIGPLAN WORKSHOP ON PROGRAMMING LANGUAGES MEETS PROGRAM VERIFICATION | 2010年
关键词
Dependent types; singleton types; certified compilation; POLYMORPHISM; ERASURE;
D O I
10.1145/1707790.1707792
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Singleton types are often considered a poor man's substitute for dependent types. But their generalization in the form of GADTs has found quite a following. The main advantage of singleton types and GADTs is to preserve the so-called phase distinction, which seems to be so important to make use of the usual compilation techniques. Of course, they considerably restrict the programmers, which often leads them to duplicate code at both the term and type levels, so as to reflect at the type level what happens at the term level, in order to be able to reason about it. In this article, we show how to automate such a duplication while eliminating the problematic dependencies. More specifically, we show how to compile the Calculus of Constructions into lambda(H), a non-dependently-typed language, while still preserving all the typing information. Since lambda(H) has been shown to be amenable to type preserving CPS and closure conversion, it shows a way to preserve types when doing code extraction and more generally when using all the common compiler techniques.
引用
收藏
页码:1 / 7
页数:7
相关论文
共 50 条
  • [41] A Lattice Singleton Bound
    Pai, Srikanth B.
    Rajan, B. Sundar
    2013 IEEE INTERNATIONAL SYMPOSIUM ON INFORMATION THEORY PROCEEDINGS (ISIT), 2013, : 1904 - 1908
  • [42] ON A GRAPH OF HOFFMAN AND SINGLETON
    LOSEY, NE
    BENSON, CT
    NOTICES OF THE AMERICAN MATHEMATICAL SOCIETY, 1969, 16 (02): : 406 - &
  • [43] Neighborhood singleton consistencies
    Kostas Stergiou
    Constraints, 2019, 24 : 94 - 131
  • [44] Singleton的故事
    透明
    程序员, 2004, (12) : 135 - 135
  • [45] Images of Charles Singleton
    Singleton, Charles
    MLN, 2022, 137 (01) : 209 - 213
  • [46] COPLEY,JOHN,SINGLETON
    POINTON, M
    TLS-THE TIMES LITERARY SUPPLEMENT, 1983, (4196): : 932 - 932
  • [47] SINGLETON STREET NOISES - INTERVIEW WITH SINGLETON,JOHN, DIRECTOR OF 'BOYZ N THE HOOD'
    BRUNETTE, P
    SINGLETON, J
    SIGHT AND SOUND, 1991, 1 (04): : 13 - 13
  • [48] COPLEY,JOHN,SINGLETON AMERICA
    HOCHFIELD, S
    ARTNEWS, 1976, 75 (02): : 84 - 85
  • [49] Untitled (John Singleton Copley)
    Garrett, Wendell
    MAGAZINE ANTIQUES, 2006, 170 (05): : 117 - 117
  • [50] Singleton coalition graph chains
    Davood Bakhshesh
    Michael A. Henning
    Dinabandhu Pradhan
    Computational and Applied Mathematics, 2024, 43