a matrix manipulation language
play

a matrix manipulation language Daisy Chaussee (dac2183) Anthony Kim - PowerPoint PPT Presentation

a matrix manipulation language Daisy Chaussee (dac2183) Anthony Kim (ak3703) Rafael Takasu (rgt2108) Ignacio Torras (it2216) INTRODUCTION DARN is a matrix manipulation language with native support for matrix data types. Strongly typed


  1. a matrix manipulation language Daisy Chaussee (dac2183) Anthony Kim (ak3703) Rafael Takasu (rgt2108) Ignacio Torras (it2216)

  2. INTRODUCTION DARN is a matrix manipulation language with native support for matrix data types. • Strongly typed • Imperative • Supports if/else/for/while flow controls • User control and freedom (inspiration from C) • Robust matrix-oriented standard library

  3. TIMELINE Project Proposal LRM Hello, World 9/28 ︎ 10/26 ︎ 11/19 ︎ 11/21 ︎ 12/20 ︎ Final Report Semantic Analysis Scanner & & Codegen Parser

  4. LANGUAGE OVERVIEW Primi%ve ¡Types: ¡ File ¡Extension: ¡ Function Declaration: int addMatrices(int[] x, int[] int, ¡float, ¡bool, ¡char, ¡string ¡ .darn ¡ y, int len) { /* function */ Data ¡Types: ¡ } Control ¡Flow: ¡ 1-­‑D ¡and ¡2-­‑D ¡matrices ¡ if ¡(true) ¡{ ¡ ¡print(x); ¡ } ¡else ¡ { ¡ Declara%on/Ini%aliza%on: ¡ Operators: ¡ ¡print(y); ¡ Standard ¡C ¡arithme:c ¡and ¡logical ¡ } ¡ operators ¡ int a; ¡ a = 2; ¡ while (x ¡> ¡y) ¡{ ¡ ¡ [ ¡] ¡1-­‑D ¡matrix ¡access ¡ 1D ¡matrix: ¡ ¡prints(“hello\n”); ¡ [ ¡] ¡[ ¡] ¡2-­‑D ¡matrix ¡access ¡ } ¡ int[5] m; ¡ m[1] = 0; int ¡i; ¡ % ¡access ¡pointer ¡ ¡ for ¡ (i= ¡0; ¡I ¡< ¡3; ¡i=i+1) ¡{ ¡ %% ¡ 2D ¡matrix: ¡ ¡print(x); ¡ # ¡dereference ¡pointer ¡ int[5][5] w; } ¡ ++ ¡pointer ¡increment ¡ w[0][0] = 1; ¡ ¡

  5. BRIEF TUTORIAL

  6. HELLO, WORLD 1 int main() { 2 prints(“Hello, World!\n”); 3 }

  7. ARCHITECTURE Tokens AST codegen. ︎ Input ︎ preprocess.ml ︎ scanner.mll ︎ parser.mly ︎ semant.ml ︎ ml ︎ File ︎ AST LLVM ︎

  8. TESTING • test directory contains all tests & test scripts for compiler, parser, scanner, and compiler_fail tests • testing automation program invoked separately for each directory, such as ./compiler_test.sh • success & fail tests included • continuous integration with Travis CI

  9. LESSONS LEARNED Daisy: make SMART goals & follow through Anthony: power of pair programming, overcome setbacks Rafa: time and communication are valuable, learned to love matrices Nacho: plan ahead, master OCaml early on, work on everything for better understanding

  10. DEMO

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend