Paper Analysis Implementing Multi-stage Languages Using ASTs, Gensym, and Reflection by Calcagno, Taha, Huang, and Leroy.

Slides:



Advertisements
Similar presentations
CS 31003: Compilers Introduction to Phases of Compiler.
Advertisements

Suggestion #1 Richard Gonzalez. What do I what to bring to this semester from the last one ? Why ?  I wanted to bring to this semester from the previous.
Learning the Language of Linear Algebra John Hannah (Canterbury, NZ) Sepideh Stewart (Oklahoma, US) Mike Thomas (Auckland, NZ)
1 Meta-Programming through Typeful Code Representation Chiyan Chen and Hongwei Xi Boston University.
By Neng-Fa Zhou Compiler Construction CIS 707 Prof. Neng-Fa Zhou
Python Programming Chapter 1: The way of the program Saad Bani Mohammad Department of Computer Science Al al-Bayt University 1 st 2011/2012.
1 Semantic Processing. 2 Contents Introduction Introduction A Simple Compiler A Simple Compiler Scanning – Theory and Practice Scanning – Theory and Practice.
CS 330 Programming Languages 09 / 13 / 2007 Instructor: Michael Eckmann.
Abstract Syntax Trees Compiler Baojian Hua
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages Chapter 3 : Describing Syntax and Semantics Operational Semantics.
Writing Good Software Engineering Research Papers A Paper by Mary Shaw In Proceedings of the 25th International Conference on Software Engineering (ICSE),
On the Correctness of Model Transformations Gabor Karsai ISIS/Vanderbilt University.
Tim Sheard Oregon Graduate Institute Lecture 11: A Reduction Semantics for MetaML CS510 Section FSC Winter 2005 Winter 2005.
Building An Interpreter After having done all of the analysis, it’s possible to run the program directly rather than compile it … and it may be worth it.
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
Moving forward with Scalable Game Design. The landscape of computer science courses…  Try your vegetables (sneak it in to an existing course)  Required.
Lecture 2 Phases of Compiler. Preprocessors, Compilers, Assemblers, and Linkers Preprocessor Compiler Assembler Linker Skeletal Source Program Source.
CSC 8310 Programming Languages Meeting 2 September 2/3, 2014.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Bloom’s Critical Thinking Level 1 Knowledge Exhibits previously learned material by recalling facts, terms, basic concepts, and answers.
PROGRAMMING LANGUAGES The Study of Programming Languages.
How to read and critique a technical paper?. 3 phases to reading Determine if there is anything interesting at all in the paper. Determine which portion.
The Different Types of Essays. First of all…what is an essay? An essay is a short piece of writing that discusses, describes, or analyze a specific topic.
May 19-22,  Become familiar with the Fostering Algebraic Thinking materials.  Examine activities that may be challenging to facilitate. 
COP4020 Programming Languages
Algorithms and their Applications CS2004 ( ) Dr Stephen Swift 1.2 Introduction to Algorithms.
Language processors (Chapter 2) 1 Course Overview PART I: overview material 1Introduction 2Language processors (tombstone diagrams, bootstrapping) 3Architecture.
Chapter 6 Programming Languages (2) Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Modeling and simulation of systems Model building Slovak University of Technology Faculty of Material Science and Technology in Trnava.
Verification and Validation in the Context of Domain-Specific Modelling Janne Merilinna.
How to Read Research Papers? Xiao Qin Department of Computer Science and Software Engineering Auburn University

1.5 Analysis and Synthesis of Compiler There are two parts to compilation: analysis and synthesis. The analysis part breaks up the source program into.
Research Topics CSC Parallel Computing & Compilers CSC 3990.
CSE 12 – Basic Data Structures Cynthia Bailey Lee Some slides and figures adapted from Paul Kube’s CSE 12 CS2 in Java Peer Instruction Materials by Cynthia.
CMPT 880/890 The Scientific Method. MOTD The scientific method is a valuable tool The SM is not the only way of doing science The SM fits into a larger.
Prof. Fateman CS 164 Lecture 111 Syntax  Simple Semantics Lecture 11.
COP 4620 / 5625 Programming Language Translation / Compiler Writing Fall 2003 Lecture 1, 08/28/03 Prof. Roy Levow.
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
1 Compiler Design (40-414)  Main Text Book: Compilers: Principles, Techniques & Tools, 2 nd ed., Aho, Lam, Sethi, and Ullman, 2007  Evaluation:  Midterm.
Theory of Programming Languages Introduction. What is a Programming Language? John von Neumann (1940’s) –Stored program concept –CPU actions determined.
Compiler Construction (CS-636)
Chapter 1: Introduction 1 Compiler Designs and Constructions Chapter 1: Introduction Objectives: Course Objectives Introduction Dr. Mohsen Chitsaz.
How to Program? -- Part 1 Part 1: Problem Solving –Analyze a problem –Decide what steps need to be taken to solve it. –Take into consideration any special.
1 Compiler & its Phases Krishan Kumar Asstt. Prof. (CSE) BPRCE, Gohana.
What am I? while b != 0 if a > b a := a − b else b := b − a return a AST == Abstract Syntax Tree.
Format of Formal Reports
Templates of slides for P2 1. A very brief refresher of your problem Describe in English -what artifacts (programs, etc) you wish to synthesize, -from.
Fall 2008Programming Development Techniques 1 Topic 17 Assignment, Local State, and the Environment Model of Evaluation Section 3.1 & 3.2.
Paper Title Authors names Conference and Year Presented by Your Name Date.
C H A P T E R T W O Linking Syntax And Semantics Programming Languages – Principles and Paradigms by Allen Tucker, Robert Noonan.
Interpreters and Higher-Order Functions CSE 413 Autumn 2008 Credit: CSE341 notes by Dan Grossman.
CSC 4181 Compiler Construction
LECTURE 3 Compiler Phases. COMPILER PHASES Compilation of a program proceeds through a fixed series of phases.  Each phase uses an (intermediate) form.
FUNCTIONAL PROGRAMING AT WORK - HASKELL AND DOMAIN SPECIFIC LANGUAGES Dr. John Peterson Western State Colorado University.
THINKING MAPS EDUC 307.  Thinking Maps are eight visual-verbal learning tools, each based on a fundamental thinking process and used together as a set.
Lesson 2: The Scientific Method. What is the Scientific Method? The Scientific Method is a logical and rational order of steps by which scientists come.
BRIT LIT – DO NOW WHAT ARE SOME WAYS YOU CAN EFFECTIVELY ANALYZE A QUOTE? THINK ABOUT: – MEANING OF THE QUOTE – SPEAKER – TONE – SIGNIFICANCE.
Lecture 9 Symbol Table and Attributed Grammars
Advanced Compiler Design
A classification of learning objectives within education
CSE401 Introduction to Compiler Construction
Chapter 2: Designing your project
Step 1: Knowledge Exhibits previously learned material by recalling facts, terms, basic concepts and answers. Direction: List knowledge of the problem.
RAMR CYCLE Critical Reflection.
Optimization This entails further development and refinements to the design. These developments and refinements may be necessary to correct a problem or.
Advanced Compiler Design
Measured in _______________
Getting to Know Environments and Materials That Support Mathematics
Presentation transcript:

Paper Analysis Implementing Multi-stage Languages Using ASTs, Gensym, and Reflection by Calcagno, Taha, Huang, and Leroy

What kind of paper is it? ● Mostly an analysis paper, analyzing MetaOcaml – Discussion of under-the-hood implementation of MetaOcaml – More formalized description of MetaOcaml than the papers we've seen on MetaML – Mathematical proof of correctness of MetaOcaml – Performance measurements

What kind of paper is it? ● From our point of view, we could also consider it partly a synthesis paper and an extension paper – Brings staged languages together with mathematical proofs and formalization – Extends staged languages discussion to more technical and detailed aspects ● Not really a new idea paper – Doesn't seem to do anything not done by MetaML

What previous work is necessary to understand this paper? ● Some knowledge of staged languages ● Some compiler topics – Abstract syntax trees – General idea of what a compiler does

The Problem ● Same problems as in the MetaML papers in extending one- and two-stage languages ● Approaches it from a different point of view

Structure ● General description ● Formal syntax of Multi-stage source language ● Formal syntax of Single-stage target language ● Translation of source to target (and then decompilation) ● Proof of correctness ● Some implementation details ● Performance analysis

Evaluating a multi-stage language ● Translate the multi-stage language into a single- stage language ● Evaluate the single-stage language ● Decompile the result

ASTs, Gensym, Reflection ● Abstract Syntax Trees – Used in translating multi-stage to single-staged ● Gensym – Generating symbols when translating ● Reflection?

Multi-stage source language

Single-stage target language

Translation ● Translate from multi-stage (source) to single- stage (target) – Abstract syntax tree building – Symbol generation (gensym) – Run (called mor in the translation)

Translation functions

Decompilation ● Inverts what happened during translation ● Evaluates

Decompilation functions

Performance analysis