survey of typed assembly language tal n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Survey of Typed Assembly Language (TAL) PowerPoint Presentation
Download Presentation
Survey of Typed Assembly Language (TAL)

Loading in 2 Seconds...

play fullscreen
1 / 5

Survey of Typed Assembly Language (TAL) - PowerPoint PPT Presentation


  • 75 Views
  • Uploaded on

Survey of Typed Assembly Language (TAL). Introduction and Motivation Conventional untyped compiler < Typed intermediate languages Typed intermediate language < Typed target language ( TAL) Resources

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Survey of Typed Assembly Language (TAL)' - sonya-foley


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
survey of typed assembly language tal
Survey of Typed Assembly Language (TAL)
  • Introduction and Motivation
    • Conventional untyped compiler < Typed intermediate languages
    • Typed intermediate language < 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
slide2

Compilation of System F to Typed Assembly Language

*

Product

type

  • 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)
    • What’re 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”
      • Halt[τ]υ terminates the computation

*

Recursion

*

* Cited from “From system F to TAL”

slide3

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@
          • 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 / Don’t 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

@ Cited from “Intensional Polymorphism in Type-Erasure Semantics ”, Karl Crary, Stephanie Weirich, and Greg Morrisett

slide4

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 <υ0, υ1 >

*

*

* Cited from “From system F to TAL”

slide5

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”