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 条
  • [1] Inferable Object-Oriented Typed Assembly Language
    Tate, Ross
    Chen, Juan
    Hawblitzel, Chris
    PLDI '10: PROCEEDINGS OF THE 2010 ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION, 2010, : 424 - 435
  • [2] Simple typed intermediate language for object-oriented languages
    Chen, J
    Tarditi, D
    ACM SIGPLAN NOTICES, 2005, 40 (01) : 38 - 49
  • [3] Implementing Statically Typed Object-Oriented Programming Languages
    Ducournau, Roland
    ACM COMPUTING SURVEYS, 2011, 43 (03)
  • [4] THE OBJECT-ORIENTED FUNCTIONAL DATA LANGUAGE
    MANNINO, MV
    CHOI, IJ
    BATORY, DS
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1990, 16 (11) : 1258 - 1272
  • [5] Associating synchronization constraints with data in an object-oriented language
    Vaziri, M
    Tip, F
    Dolby, J
    ACM SIGPLAN NOTICES, 2006, 41 (01) : 334 - 345
  • [6] Fault-tolerant typed assembly language
    Perry, Frances
    Mackey, Lester
    Reis, George A.
    Ligatti, Jay
    August, David I.
    Walker, David
    ACM SIGPLAN NOTICES, 2007, 42 (06) : 42 - 53
  • [7] From system F to typed assembly language
    Morrisett, G
    Walker, D
    Crary, K
    Glew, N
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1999, 21 (03): : 527 - 568
  • [8] A weakest precondition semantics for an object-oriented language of refinement
    Cavalcanti, A
    Naumann, DA
    FM'99-FORMAL METHODS, VOL II, 1999, 1709 : 1439 - 1459
  • [9] On the Pursuit of a Standard Language for Object-Oriented Constraint Modeling
    Soto, Ricardo
    Granvilliers, Laurent
    NEW CHALLENGES IN APPLIED INTELLIGENCE TECHNOLOGIES, 2008, 134 : 123 - 133
  • [10] A logic for information flow in object-oriented programs
    Amtoft, T
    Bandhakavi, S
    Banerjee, A
    ACM SIGPLAN NOTICES, 2006, 41 (01) : 91 - 102