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 条
  • [41] Description logics for semantic query optimization in object-oriented database systems
    Beneventano, D
    Bergamaschi, S
    Sartori, C
    ACM TRANSACTIONS ON DATABASE SYSTEMS, 2003, 28 (01): : 1 - 50
  • [42] Static analysis to support the evolution of exception structure in object-oriented systems
    Robillard, MP
    Murphy, GC
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2003, 12 (02) : 191 - 221
  • [43] Using types to analyze and optimize object-oriented programs
    Diwan, A
    McKinley, KS
    Moss, JEB
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2001, 23 (01): : 30 - 72
  • [44] Open issues in object-oriented programming - A Scandinavian perspective
    Madsen, OL
    SOFTWARE-PRACTICE & EXPERIENCE, 1995, 25 : 3 - 43
  • [45] COOAD - A CASE TOOL FOR OBJECT-ORIENTED ANALYSIS AND DESIGN
    YAMAMOTO, J
    OHSUGA, A
    HONIDEN, S
    INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND KNOWLEDGE ENGINEERING, 1995, 5 (03) : 367 - 389
  • [46] Perfect class hashing and numbering for object-oriented implementation
    Ducournau, Roland
    Morandat, Floreal
    SOFTWARE-PRACTICE & EXPERIENCE, 2011, 41 (06) : 661 - 694
  • [47] Verifying Executable Object-Oriented Specifications with Separation Logic
    van Staden, Stephan
    Calcagno, Cristiano
    Meyer, Bertrand
    ECOOP 2010: OBJECT-ORIENTED PROGRAMMING, 2010, 6183 : 151 - +
  • [48] A weakest precondition semantics for refinement of object-oriented programs
    Cavalcanti, A
    Naumann, DA
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2000, 26 (08) : 713 - 728
  • [49] Verification and validation guidelines for object-oriented simulation models
    Yilmaz, L
    PROCEEDINGS OF THE 1998 SUMMER COMPUTER SIMULATION CONFERENCE: SIMULATION AND MODELING TECHNOLOGY FOR THE TWENTY-FIRST CENTURY, 1998, : 645 - 650
  • [50] An object-oriented prototyping tool for automated manufacturing systems
    Mak, KL
    Lau, HYK
    Wong, STW
    COMPUTERS IN INDUSTRY, 2000, 43 (01) : 43 - 60