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 条
  • [31] Transposing G to C#: Expressivity of generalized algebraic data types in an object-oriented language
    Kennedy, Andrew J.
    Russo, Claudio V.
    THEORETICAL COMPUTER SCIENCE, 2018, 741 : 3 - 18
  • [32] THE MODEL, LANGUAGE, AND IMPLEMENTATION OF AN OBJECT-ORIENTED MULTIMEDIA KNOWLEDGE-BASE MANAGEMENT-SYSTEM
    ISHIKAWA, H
    SUZUKI, F
    KOZAKURA, F
    MAKINOUCHI, A
    MIYAGISHIMA, M
    IZUMIDA, Y
    AOSHIMA, M
    YAMANE, Y
    ACM TRANSACTIONS ON DATABASE SYSTEMS, 1993, 18 (01): : 1 - 50
  • [33] Scandinavian Contributions to Object-Oriented Modeling Languages
    Moller-Pedersen, Birger
    HISTORY OF NORDIC COMPUTING 3, 2011, 350 : 339 - 349
  • [34] A Programming Model for Concurrent Object-Oriented Programs
    Jacobs, Bart
    Piessens, Frank
    Smans, Jan
    Rustan, K.
    Leino, M.
    Schulte, Wolfram
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2008, 31 (01):
  • [35] The Concept of Class Invariant in Object-oriented Programming
    Meyer, Bertrand
    Arkadova, Alisa
    Kogtenkov, Alexander
    FORMAL ASPECTS OF COMPUTING, 2024, 36 (01)
  • [36] A proof outline logic for object-oriented programming
    Pierik, C
    de Boer, FS
    THEORETICAL COMPUTER SCIENCE, 2005, 343 (03) : 413 - 442
  • [37] Unifying Aspect- and Object-Oriented Design
    Rajan, Hridesh
    Sullivan, Kevin J.
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2009, 19 (01) : 1 - 41
  • [38] Teaching Religion Within an Object-Oriented Ontology
    Michael Hubbard MacKay
    RELIGION & EDUCATION, 2022, 49 (01) : 82 - 103
  • [39] Cost analysis of object-oriented bytecode programs
    Albert, Elvira
    Arenas, Puri
    Genaim, Samir
    Puebla, German
    Zanardini, Damiano
    THEORETICAL COMPUTER SCIENCE, 2012, 413 (01) : 142 - 159
  • [40] Object-Oriented Design and Programming: An Investigation of Novices' Conceptions on Objects and Classes
    Xinogalos, Stelios
    ACM TRANSACTIONS ON COMPUTING EDUCATION, 2015, 15 (03):