 
Summary: Semantic Foundations for
Typed Assembly Languages
AMAL AHMED, ANDREW W. APPEL, CHRISTOPHER D. RICHARDS,
KEDAR N. SWADI, GANG TAN, and DANIEL C. WANG
Princeton University
Typed Assembly Languages (TALs) are used to validate the safety of machinelanguage programs.
The Foundational ProofCarrying Code project seeks to verify the soundness of TALs using the
smallest possible set of axiomsthe axioms of a suitably expressive logic plus a specification
of machine semantics. This paper 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 lowlevel data with powerful and orthogonal type
constructors, and Lc, 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 higherorder logic, are useful for proving the soundness of TALs. We demonstrate
this by using TML and Lc to verify the soundness of a lowlevel, typed assembly language, LTAL,
which is the target of our coreMLtosparc compiler.
To prove the soundness of the TML type system we have successfully applied a new approach,
that of stepindexed logical relations. This approach provides the first semantic model for a type
system with updatable references to values of impredicative quantified types. Both impredica
tive polymorphism and mutable references are essential when representing function closures in
