Singleton Types Here Singleton Types There Singleton Types Everywhere

被引:9
|
作者
Monnier, Stefan [1 ]
Haguenauer, David [1 ]
机构
[1] Univ Montreal, Montreal, PQ H3C 3J7, Canada
关键词
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 条
  • [1] Extensional equivalence and Singleton types
    Stone, Christopher A.
    Harper, Robert
    ACM TRANSACTIONS ON COMPUTATIONAL LOGIC, 2006, 7 (04) : 676 - 722
  • [2] SINGLETON, UNION, AND INTERSECTION TYPES FOR PROGRAM EXTRACTION
    HAYASHI, S
    INFORMATION AND COMPUTATION, 1994, 109 (1-2) : 174 - 210
  • [3] SINGLETON, UNION AND INTERSECTION TYPES FOR PROGRAM EXTRACTION
    HAYASHI, S
    LECTURE NOTES IN COMPUTER SCIENCE, 1991, 526 : 701 - 730
  • [4] A Modular Type-Checking Algorithm for Type Theory with Singleton Types and Proof Irrelevance
    Abel, Andreas
    Coquand, Thierry
    Pagano, Miguel
    TYPED LAMBDA CALCULI AND APPLICATIONS, PROCEEDINGS, 2009, 5608 : 5 - +
  • [5] A MODULAR TYPE-CHECKING ALGORITHM FOR TYPE THEORY WITH SINGLETON TYPES AND PROOF IRRELEVANCE
    Abel, Andreas
    Coquand, Thierry
    Pagano, Miguel
    LOGICAL METHODS IN COMPUTER SCIENCE, 2011, 7 (02)
  • [6] Cost-Effectiveness Analysis of Different Types of Labor for Singleton Pregnancy: Real Life Data
    Lakic, Dragana
    Petrovic, Branko
    Petrova, Guenka
    SRPSKI ARHIV ZA CELOKUPNO LEKARSTVO, 2014, 142 (11-12) : 688 - 694
  • [7] A COST-EFFECTIVENESS ANALYSIS OF DIFFERENT TYPES OF LABOR FOR SINGLETON PREGNANCY - REAL LIFE DATA
    Lakic, D.
    Tadic, I
    Odalovic, M.
    Petrovic, B.
    Petrova, G.
    VALUE IN HEALTH, 2014, 17 (07) : A509 - A509
  • [8] 'SINGLETON'
    LINDENSMITH, M
    SOUTH DAKOTA REVIEW, 1990, 28 (01): : 128 - 142
  • [9] Singleton strings
    Engquist, Johan
    Sundell, Per
    Tamassia, Laura
    FORTSCHRITTE DER PHYSIK-PROGRESS OF PHYSICS, 2007, 55 (5-7): : 711 - 716
  • [10] Singleton 'PraiseMaker'
    Blasing, F
    OPERA NEWS, 1998, 63 (02): : 41 - +