Semantic Foundations for Typed Assembly Languages

被引:24
作者
Ahmed, Amal [1 ]
Appel, Andrew W. [1 ]
Richards, Christopher D. [1 ]
Swadi, Kedar N. [1 ]
Tan, Gang [1 ]
Wang, Daniel C. [1 ]
机构
[1] Princeton Univ, Princeton, NJ 08544 USA
来源
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS | 2010年 / 32卷 / 03期
关键词
Languages; Verification; Typed assembly languages; proof-carrying code; semantic models; logical relations; control flow; LOGICAL RELATIONS; MODEL;
D O I
10.1145/1709093.1709094
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Typed Assembly Languages (TALs) are used to validate the safety of machine-language programs. The Foundational Proof-Carrying Code project seeks to verify the soundness of TALs using the smallest possible set of axioms: the axioms of a suitably expressive logic plus a specification of machine semantics. This article proposes general semantic foundations that permit modular proofs of the soundness of TALs. These semantic foundations include Typed Machine Language (TML), a type theory for specifying properties of low-level data with powerful and orthogonal type constructors, and L-c, a compositional logic for specifying properties of machine instructions with simplified reasoning about unstructured control flow. Both of these components, whose semantics we specify using higher-order logic, are useful for proving the soundness of TALs. We demonstrate this by using TML and L-c to verify the soundness of a low-level, typed assembly language, LTAL, which is the target of our core-ML-to-SPARC compiler. To prove the soundness of the TML type system we have successfully applied a new approach, that of step-indexed logical relations. This approach provides the first semantic model for a type system with updatable references to values of impredicative quantified types. Both impredicative polymorphism and mutable references are essential when representing function closures in compilers with typed closure conversion, or when compiling objects to simpler typed primitives.
引用
收藏
页数:67
相关论文
共 85 条
[1]   A fully abstract game semantics for general references [J].
Abramsky, S ;
Honda, K ;
McCusker, G .
THIRTEENTH ANNUAL IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE, PROCEEDINGS, 1998, :334-344
[2]   Imperative Self-Adjusting Computation [J].
Acar, Umut A. ;
Ahmed, Amal ;
Blume, Matthias .
POPL'08: PROCEEDINGS OF THE 35TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 2008, :309-322
[3]  
Ahmed A, 2006, LECT NOTES COMPUT SC, V3924, P69
[4]  
AHMED A, 2005, P 10 ACM SIGPLAN INT, P78, DOI DOI 10.1145/1086365.1086376
[5]   A stratified semantics of general references embeddable in higher-order logic [J].
Ahmed, AJ ;
Appel, AW ;
Virga, R .
17TH ANNUAL IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE, PROCEEDINGS, 2002, :75-86
[6]  
AHMED AJ, 2004, TR71304 PRINC U
[7]  
Ahmed A, 2007, FUND INFORM, V77, P397
[8]  
Ahmed Amal., 2003, An Indexed Model of Impredicative Polymorphism and Mutable References
[9]  
Ahmed Amal., 2008, Proceedings of the 13th ACM SIGPLAN International Conference on Functional Programming, P157
[10]  
AIKEN A, 2003, P ACM C PROGR LANG D