Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1806596.1806644acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Inferable object-oriented typed assembly language

Published: 05 June 2010 Publication History

Abstract

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.

References

[1]
J. Adámek, H. Herrlich, and G. E. Strecker. Abstract and Concrete Categories. Wiley-Interscience, New York, NY, USA, 1990.
[2]
B. E. Chang, A. Chlipala, G. C. Necula, and R. R. Schneck. Type-based verification of assembly language for compiler debugging. In TLDI, pages 91--102, 2005.
[3]
J. Chen and D. Tarditi. A simple typed intermediate language for object-oriented languages. In POPL, pages 38--49, 2005.
[4]
J. Chen, C. Hawblitzel, F. Perry, M. Emmi, J. Condit, D. Coetzee, and P. Pratikaki. Type-preserving compilation for large-scale optimizing object-oriented compilers. In PLDI, pages 183--192, 2008.
[5]
C. Colby, P. Lee, G. C. Necula, F. Blau, K. Cline, and M. Plesko. A certifying compiler for Java. In PLDI, pages 95--107, 2000.
[6]
A. Goldberg. A specification of java loading and bytecode verification. In Computer and Communications Security, pages 49--58, 1998.
[7]
P. Granger. Static analysis of linear congruence equalities among variables of a program. In TAPSOFT, volume 1, pages 169--192, 1991.
[8]
M. P. Jones. First-class polymorphism with type inference. In POPL, pages 483--496, 1997.
[9]
D. Le Botlan and D. Rémy. MLF: Raising ML to the power of System F. In ICFP, pages 27--38, 2003.
[10]
C. League, Z. Shao, and V. Trifonov. Type-preserving compilation of Featherweight Java. TOPLAS, 24(2): 112--152, 2002.
[11]
D. Leijen. HMF: Simple type inference for first-class polymorphism. In ICFP, pages 283--294, 2008.
[12]
T. Lindholm and F. Yellin. The Java Virtual Machine Specification. Sun Microsystems, 2nd edition, 1999.
[13]
R. Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17:348--375, 1978.
[14]
G. Morrisett, K. Crary, N. Glew, D. Grossman, R. Samuels, F. Smith, D. Walker, S. Weirich, and S. Zdancewic. TALx86: A realistic typed assembly language. In ACM Workshop on Compiler Support for System Software, pages 25--35, 1999.
[15]
G. Morrisett, D. Walker, K. Crary, and N. Glew. From System F to typed assembly language. TOPLAS, 21(3):527--568, 1999.
[16]
G. Morrisett, K. Crary, N. Glew, and D. Walker. Stack-based typed assembly language. JFP, 13(5):957--959, 2003.
[17]
G. C. Necula and P. Lee. Safe kernel extensions without run-time checking. In OSDI, pages 229--243, 1996.
[18]
M. Odersky and P. Wadler. Pizza into java: translating theory into practice. In POPL, pages 146--159, 1997.
[19]
F. Pfenning. On the undecidability of partial polymorphic type reconstruction. Fundamenta Informaticae, 19(1,2): 185--199, 1993.
[20]
B. C. Pierce and D. N. Turner. Local type inference. In POPL, pages 252--265, 1998.
[21]
R. Tate, J. Chen, and C. Hawblitzel. A framework for type inference with existential quantification. Technical report, http://research.microsoft.com/pubs/78684/tr.pdf, 2008.
[22]
S. Wehr and P. Thiemann. On the decidability of subtyping with bounded existential types. In APLAS, pages 111--127, 2009.
[23]
J. B. Wells. Typability and type checking in System F are equivalent and undecidable. Annals of Pure and Applied Logic, 98: 111--156, 1998.

Cited By

View all
  • (2024)Decidable Subtyping of Existential Types for JuliaProceedings of the ACM on Programming Languages10.1145/36564218:PLDI(1091-1114)Online publication date: 20-Jun-2024
  • (2016)Compiler optimization for superscalar and pipelined processors2016 IEEE Distributed Computing, VLSI, Electrical Circuits and Robotics (DISCOVER)10.1109/DISCOVER.2016.7806224(232-236)Online publication date: Aug-2016
  • (2015)AUSPICERevised Selected Papers of the 7th International Conference on Verified Software: Theories, Tools, and Experiments - Volume 959310.1007/978-3-319-29613-5_12(202-222)Online publication date: 18-Jul-2015
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '10: Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation
June 2010
514 pages
ISBN:9781450300193
DOI:10.1145/1806596
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 45, Issue 6
    PLDI '10
    June 2010
    496 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1809028
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 05 June 2010

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. certifying compiler
  2. existential quantification
  3. object-oriented compiler
  4. type inference
  5. typed assembly language (tal)

Qualifiers

  • Research-article

Conference

PLDI '10
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)8
  • Downloads (Last 6 weeks)1
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Decidable Subtyping of Existential Types for JuliaProceedings of the ACM on Programming Languages10.1145/36564218:PLDI(1091-1114)Online publication date: 20-Jun-2024
  • (2016)Compiler optimization for superscalar and pipelined processors2016 IEEE Distributed Computing, VLSI, Electrical Circuits and Robotics (DISCOVER)10.1109/DISCOVER.2016.7806224(232-236)Online publication date: Aug-2016
  • (2015)AUSPICERevised Selected Papers of the 7th International Conference on Verified Software: Theories, Tools, and Experiments - Volume 959310.1007/978-3-319-29613-5_12(202-222)Online publication date: 18-Jul-2015
  • (2015)Privacy enhancement in anonymous network channels using multimodality injectionSecurity and Communication Networks10.1002/sec.12198:16(2917-2932)Online publication date: 10-Nov-2015
  • (2014)Fissile type analysisACM SIGPLAN Notices10.1145/2578855.253585549:1(73-85)Online publication date: 8-Jan-2014
  • (2014)Fissile type analysisProceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages10.1145/2535838.2535855(73-85)Online publication date: 11-Jan-2014
  • (2014)Ubiquitous IoT structure via homogeneous data type modelling7'th International Symposium on Telecommunications (IST'2014)10.1109/ISTEL.2014.7000715(283-288)Online publication date: Sep-2014
  • (2014)Stop tracking me: An anti-detection type solution for anonymous data2014 4th International Conference on Computer and Knowledge Engineering (ICCKE)10.1109/ICCKE.2014.6993463(685-690)Online publication date: Oct-2014
  • (2015)Privacy enhancement in anonymous network channels using multimodality injectionSecurity and Communication Networks10.1002/sec.12198:16(2917-2932)Online publication date: 9-Feb-2015

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media