Survey of Typed Assembly Language TAL

1 / 5
About This Presentation
Title:

Survey of Typed Assembly Language TAL

Description:

From System F to Typed Assembly Language Greg Morrisett, David Walker, Karl ... Requires / Don't require both abstract kinds of translucent types ... –

Number of Views:36
Avg rating:3.0/5.0
Slides: 6
Provided by: aoyu
Category:

less

Transcript and Presenter's Notes

Title: Survey of Typed Assembly Language TAL


1
Survey of Typed Assembly Language (TAL)
  • Introduction and Motivation
  • Conventional untyped compiler lt Typed
    intermediate languages
  • Typed intermediate language lt Typed target
    language ( TAL)
  • Resources
  • From System F to Typed Assembly Language Greg
    Morrisett, David Walker, Karl Crary, and Neal
    Glew
  • From System F to Typed Assembly Language
    (Extended version). Technical Report TR97-1651
    Greg Morrisett, David Walker, Karl Crary, and
    Neal Glew
  • Intensional Polymorphism in Type-Erasure
    Semantics. Stephanie Weirich , Karl Crary and
    Greg Morrisett
  • TALx86 A Realistic Typed Assembly Language Greg
    Morrisett, Karl Crary, Neal Glew, Dan Grossman,
    Richard Samuels, Frederick Smith, David Walker,
    Stephanie Weirich, and Steve Zdancewic
  • Structure
  • From system F to TAL 4 translations and 5 typed
    calculi
  • Extension and practice
  • TAL86x, a realistic typed assembly language

2
Compilation of System F to Typed Assembly Language
  • Step 1 system F and Continuation Passing style
    (CPS) conversion
  • Objective conversion to CPS
  • Syntax for ?F(call-by-value variant of system F
    augmented with products and recursion )
  • Syntax for?K (target calculus, typed intermediate
    language)
  • Whatre completed and changed?
  • Names all intermediate computations and
    eliminates the need for a control stack
  • All unconditional control transfers are achieved
    via function call
  • ?K is almost linear, except for if0
  • Functions in ?K invoke continuations using
    void
  • Haltt? terminates the computation

Product type

Recursion

Cited from From system F to TAL
3
Compilation of System F to Typed Assembly Language
  • Step 2 Simplified Polymorphic Closure
    Conversion
  • Objective separate program code from data
  • Two steps
  • Closure conversion proper
  • Approaches Minamide et al / The Definition of
    Standard ML_at_
  • Type-passing / Type-erasure interpretation of
    polymorphism
  • (types are constructed and passed to
    polymorphic functions at run-time)
  • (run-time type information is represented
    by ordinary terms)
  • Polymorphic instantiation cannot / can easily be
    handled via substitution
  • Requires / Dont require both abstract kinds of
    translucent types
  • Cost of Polymorphic closure conversion
  • Hoisting lift the closed function code to the
    top of program
  • Key point of implementation of the Type-erasure
    interpretation
  • Partial applications of functions to type
    arguments to be values
  • Eg. ? has type
  • is treated as a value and has type


Cited from From system F to TAL, Greg
Morrisett, David Walker, Karl Crary, and Neal
Glew _at_ Cited from Intensional Polymorphism in
Type-Erasure Semantics , Karl Crary, Stephanie
Weirich, and Greg Morrisett
4
Compilation of System F to Typed Assembly Language
  • Step 3 Explicit Allocation
  • Objective allocate spaces for tuples and fill
    them out field by field
  • Syntax for?A(similar to ?C )
  • Features
  • Tuples no long have value form
  • Creation of an n-element tuple an allocation
    step n initialization steps
  • Eg. Creation of the pair lt?0, ?1 gt



Cited from From system F to TAL
5
Compilation of System F to Typed Assembly Language
  • Step 4 Code generation
  • Objective convert?A to TAL, mostly syntactic
  • TAL syntax


Key technical Difference
TAL program

Cited from From system F to TAL
Write a Comment
User Comments (0)
About PowerShow.com