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

Slides:



Advertisements
Similar presentations
Transposing F to C Transposing F to C Andrew Kennedy & Don Syme Microsoft Research Cambridge, U.K.
Advertisements

Introduction to Java 2 Programming
CPSC 388 – Compiler Design and Construction
COS 441 Exam Stuff David Walker. TAL 2 Logistics take-home exam will become available on the course web site Jan write down when you download &
Type Analysis and Typed Compilation Stephanie Weirich Cornell University.
The Semantic Soundness of a Type System for Interprocedural Register Allocation and Constructor Registration Torben Amtoft Kansas State University joint.
Control-Flow Graphs & Dataflow Analysis CS153: Compilers Greg Morrisett.
Current Techniques in Language-based Security David Walker COS 597B With slides stolen from: Steve Zdancewic University of Pennsylvania.
The lambda calculus David Walker CS 441. the lambda calculus Originally, the lambda calculus was developed as a logic by Alonzo Church in 1932 –Church.
1 PROPERTIES OF A TYPE ABSTRACT INTERPRETATER. 2 MOTIVATION OF THE EXPERIMENT § a well understood case l type inference in functional programming à la.
Cs784(TK)1 Semantics of Procedures and Scopes. Kinds of Scope Static or Lexical scope –determined by structure of program –Scheme, C++, Java, and many.
Typed Assembly Languages COS 441, Fall 2004 Frances Spalding Based on slides from Dave Walker and Greg Morrisett.
Slides prepared by Rose Williams, Binghamton University Chapter 1 Getting Started 1.1 Introduction to Java.
Intensional Polymorphism in Type-Erasure Semantics Karl Crary, Stephanie Weirich, Greg Morrisett Presentation by Nate Waisbrot.
Introduction to Code Generation Mooly Sagiv html:// Chapter 4.
1 Semantic Processing. 2 Contents Introduction Introduction A Simple Compiler A Simple Compiler Scanning – Theory and Practice Scanning – Theory and Practice.
Steve Zdancewic ESOP011 Secure Information Flow and CPS Steve Zdancewic Joint work with Andrew Myers Cornell University.
Typed Memory Management in a Calculus of Capabilities David Walker (with Karl Crary and Greg Morrisett)
STAL David Walker (joint work with Karl Crary, Neal Glew and Greg Morrisett)
The lambda calculus David Walker CS 441. the lambda calculus Originally, the lambda calculus was developed as a logic by Alonzo Church in 1932 –Church.
FE.1 CSE4100 Final Exam Advice and Hints Prof. Steven A. Demurjian, Sr. Computer Science & Engineering Department The University of Connecticut 191 Auditorium.
Generative type abstraction and type-level computation (Wrestling with System FC) Stephanie Weirich, Steve Zdancewic University of Pennsylvania Dimitrios.
A Type System for Expressive Security Policies David Walker Cornell University.
Introduction to Code Generation Mooly Sagiv html:// Chapter 4.
LX: A Language for Flexible Type Analysis Stephanie Weirich Cornell University joint work with Karl Crary (CMU)
Presented By: Shriraksha Mohan Nathaniel Nystrom, Michael R. Clarkson, and Andrew C. Myers.
CS 355 – Programming Languages
C++ Code Analysis: an Open Architecture for the Verification of Coding Rules Paolo Tonella ITC-irst, Centro per la Ricerca Scientifica e Tecnologica
Elements of Computing Systems, Nisan & Schocken, MIT Press, Chapter 6: Assembler slide 1www.idc.ac.il/tecs Assembler Elements of Computing.
Programming Languages and Design Lecture 7 Subroutines and Control Abstraction Instructor: Li Ma Department of Computer Science Texas Southern University,
10/14/20151 Programming Languages and Compilers (CS 421) Grigore Rosu 2110 SC, UIUC Slides by Elsa Gunter, based.
CSE 425: Object-Oriented Programming I Object-Oriented Programming A design method as well as a programming paradigm –For example, CRC cards, noun-verb.
Typed Lambda Calculus Chapter 9 Benjamin Pierce Types and Programming Languages.
Semantic Analysis. Find 6 problems with this code. These issues go beyond syntax.
CS112: Structure of Programming Languages A smorgasbord of topics in programming languages including programming paradigms and syntax, semantics, implementation.
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
 Remote Procedure Call (RPC) is a high-level model for client-sever communication.  It provides the programmers with a familiar mechanism for building.
Model construction and verification for dynamic programming languages Radu Iosif
Topic #1: Introduction EE 456 – Compiling Techniques Prof. Carl Sable Fall 2003.
Compilers: Overview/1 1 Compiler Structures Objective – –what are the main features (structures) in a compiler? , Semester 1,
Singleton Kinds and Singleton Types Christopher A. Stone August 2, 1999 Thesis Committee Bob Harper, chair Peter Lee John Reynolds Jon Riecke (Bell Laboratories)
Chapter 1 Introduction Major Data Structures in Compiler
Chapter 1: Introduction 1 Compiler Designs and Constructions Chapter 1: Introduction Objectives: Course Objectives Introduction Dr. Mohsen Chitsaz.
1 Compiler & its Phases Krishan Kumar Asstt. Prof. (CSE) BPRCE, Gohana.
Object Oriented Software Development 4. C# data types, objects and references.
BY: JAKE TENBERG & CHELSEA SHIPP PROJECT REVIEW: JGIBBERISH.
1 Aspectual Caml an Aspect-Oriented Functional Language Hideaki Tatsuzawa Hidehiko Masuhara Akinori Yonezawa University of Tokyo.
C# Fundamentals An Introduction. Before we begin How to get started writing C# – Quick tour of the dev. Environment – The current C# version is 5.0 –
ECE 750 Topic 8 Meta-programming languages, systems, and applications Automatic Program Specialization for J ava – U. P. Schultz, J. L. Lawall, C. Consel.
CSE341: Programming Languages Lecture 17 Implementing Languages Including Closures Dan Grossman Winter 2013.
An Efficient Compilation Framework for Languages Based on a Concurrent Process Calculus Yoshihiro Oyama Kenjiro Taura Akinori Yonezawa Yonezawa Laboratory.
Advanced Computer Systems
CSE341: Programming Languages Lecture 17 Implementing Languages Including Closures Dan Grossman Spring 2017.
CSE341: Programming Languages Lecture 7 First-Class Functions
Programming Language Hierarchy, Phases of a Java Program
Programming Languages Dan Grossman 2013
A Verified Compiler for an Impure Functional Language
TALx86: A Realistic Typed Assembly Language
CPSC 388 – Compiler Design and Construction
CSE341: Programming Languages Lecture 7 First-Class Functions
CSE341: Programming Languages Lecture 7 First-Class Functions
CSE341: Programming Languages Lecture 6 Nested Patterns Exceptions Tail Recursion Dan Grossman Autumn 2018.
CSE341: Programming Languages Lecture 7 First-Class Functions
CSE341: Programming Languages Lecture 7 First-Class Functions
CSE341: Programming Languages Lecture 7 First-Class Functions
CSE341: Programming Languages Lecture 6 Nested Patterns Exceptions Tail Recursion Dan Grossman Spring 2019.
CSE341: Programming Languages Lecture 7 First-Class Functions
CSE341: Programming Languages Lecture 17 Implementing Languages Including Closures Dan Grossman Spring 2019.
Abstract Types Defined as Classes of Variables
CSE341: Programming Languages Lecture 6 Nested Patterns Exceptions Tail Recursion Dan Grossman Autumn 2017.
Presentation transcript:

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 TR 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

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 Compilation of System F to Typed Assembly Language * Cited from “From system F to TAL” * * * Product type Recursion

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 »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 Compilation of System F to Typed Assembly Language * * Cited from “From system F to TAL”, Greg Morrisett, David Walker, Karl Crary, and Neal Cited from “ Intensional Polymorphism in Type-Erasure Semantics ”, Karl Crary, Stephanie Weirich, and Greg Morrisett *

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 Compilation of System F to Typed Assembly Language * Cited from “From system F to TAL” * * *

Step 4: Code generation –Objective: convertλ A to TAL, mostly syntactic –TAL syntax Compilation of System F to Typed Assembly Language * Cited from “From system F to TAL” * * Key technical Difference TAL program *