1 / 15

Paper Analysis

Implementing Multi-stage Languages Using ASTs, Gensym, and Reflection by Calcagno, Taha, Huang, and Leroy. Paper Analysis. What kind of paper is it?. Mostly an analysis paper, analyzing MetaOcaml Discussion of under-the-hood implementation of MetaOcaml

matsu
Télécharger la présentation

Paper Analysis

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. 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

  3. 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

  4. 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

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

  6. 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

  7. Evaluating a multi-stage language • Translate the multi-stage language into a single-stage language • Evaluate the single-stage language • Decompile the result

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

  9. Multi-stage source language

  10. Single-stage target language

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

  12. Translation functions

  13. Decompilation • Inverts what happened during translation • Evaluates

  14. Decompilation functions

  15. Performance analysis

More Related