Inferable Object-Oriented Typed Assembly Language

被引:1
|
作者
Tate, Ross [1 ]
Chen, Juan [1 ]
Hawblitzel, Chris [1 ]
机构
[1] Univ Calif San Diego, San Diego, CA 92103 USA
关键词
Languages; Theory; Verification; Type inference; Typed assembly language (TAL); Object-oriented compiler; Existential quantification; Certifying compiler; SYSTEM F;
D O I
10.1145/1809028.1806644
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
A certifying compiler preserves type information through compilation to assembly language programs, producing typed assembly language (TAL) programs that can be verified for safety independently so that the compiler does not need to be trusted. There are two challenges for adopting certifying compilation in practice. First, requiring every compiler transformation and optimization to preserve types is a large burden on compilers, especially when adopting certifying compilation into existing optimizing non-certifying compilers. Second, type annotations significantly increase the size of assembly language programs. This paper proposes an alternative to traditional certifying compilers. It presents iTalX, the first inferable TAL type system that supports existential types, arrays, interfaces, and stacks. We have proved our inference algorithm is complete, meaning if an assembly language program is typeable with iTalX then our algorithm will infer an iTalX typing for that program. Furthermore, our algorithm is guaranteed to terminate even if the assembly language program is untypeable. We demonstrate that it is practical to infer such an expressive TAL by showing a prototype implementation of type inference for code compiled by Bartok, an optimizing C# compiler. Our prototype implementation infers complete type annotations for 98% of functions in a suite of realistic C# benchmarks. The type-inference time is about 8% of the compilation time. We needed to change only 2.5% of the compiler code, mostly adding new code for defining types and for writing types to object files. Most transformations are untouched. Type-annotation size is only 17% of the size of pure code and data, reducing type annotations in our previous certifying compiler [4] by 60%. The compiler needs to preserve only essential type information such as method signatures, object-layout information, and types for static data and external labels. Even non-certifying compilers have most of this information available.
引用
收藏
页码:424 / 435
页数:12
相关论文
共 50 条
  • [21] On type systems for object-oriented database programming languages
    Leontiev, Y
    Özsu, MTR
    Szafron, D
    ACM COMPUTING SURVEYS, 2002, 34 (04) : 409 - 449
  • [22] Generalized algebraic data types and object-oriented programming
    Kennedy, A
    Russo, CV
    ACM SIGPLAN NOTICES, 2005, 40 (10) : 21 - 40
  • [23] Constrained Types for Object-Oriented Languages
    Nystrom, Nathaniel
    Saraswat, Vijay
    Palsberg, Jens
    Grothoff, Christian
    ACM SIGPLAN NOTICES, 2008, 43 (10) : 457 - 474
  • [24] Object-oriented Programming with Gradual Abstraction
    Normark, Kurt
    Thomsen, Lone Leth
    Thomsen, Bent
    ACM SIGPLAN NOTICES, 2013, 48 (02) : 41 - 51
  • [25] A Refinement Methodology for Object-Oriented Programs
    Tafat, Asma
    Boulme, Sylvain
    Marche, Claude
    FORMAL VERIFICATION OF OBJECT-ORIENTED SOFTWARE, 2011, 6528 : 153 - +
  • [26] Constrained Types for Object-Oriented Languages
    Nystrom, Nathaniel
    Saraswat, Vijay
    Palsberg, Jens
    Grothoff, Christian
    OOPSLA 2008 NASHVILLE, CONFERENCE PROCEEDINGS: MUSIC CITY USA, OOPSLA, 2008, : 457 - +
  • [27] Evaluation Criteria for Object-oriented Metrics
    Misra, Sanjay
    ACTA POLYTECHNICA HUNGARICA, 2011, 8 (05) : 109 - 136
  • [28] Extending object-oriented systems with roles
    Gottlob, G
    Schrefl, M
    Rock, B
    ACM TRANSACTIONS ON INFORMATION SYSTEMS, 1996, 14 (03) : 268 - 296
  • [29] Object-Oriented Constraints for XML Schema
    Alagic, Suad
    Bernstein, Philip A.
    Jairath, Ruchi
    OBJECTS AND DATABASES, 2010, 6348 : 100 - +
  • [30] Ownership confinement ensures representation independence for object-oriented programs
    Banerjee, A
    Naumann, DA
    JOURNAL OF THE ACM, 2005, 52 (06) : 894 - 960