macaw
play

Macaw August 10, 2016 William Hom Joseph Baker Team Members - PowerPoint PPT Presentation

Macaw August 10, 2016 William Hom Joseph Baker Team Members Christopher Chang Yi Jian Introduction Macaw is a mathematical calculation language with native support for matrix data types. Strongly typed


  1. Macaw August 10, 2016

  2. ● William Hom ● Joseph Baker Team Members ● Christopher Chang ● Yi Jian

  3. Introduction Macaw is a mathematical calculation language with native support for matrix data types. Strongly typed ● ● Imperative ● Supports if/else/for/while flow controls Functions ● Operator overloading ●

  4. Project Plan

  5. Semantic checking, Complete our project SAST generation, proposal Finalize Scanner, Codegen, finished Parser, and AST 7/11 7/17 7/20 7/27 8/1 8/5 Features, test suite Finish LRM Compile “Hello World” complete into LLVM

  6. Language Overview / Tutorial A Macaw program is written as series of functions and imperative statements. Function definitions and variable declarations must be made prior to referencing them. #Does not compile #Compiles foo(); void foo() { print(“Hello World!”); }

  7. Language Overview / Tutorial Data Types number - Floating point numbers for arithmetic operations. string - Character strings used for printing statements to the console. Can be stored in variables or used as constants. matrix - Two dimensional arrays of numbers. ● Built-in support - initialization, access, insertion Standard library functions implemented. ● ● Accessed using [row, column] or [flattened] indexing. [flattened] indexing - counted across columns, then rows. ○

  8. Language Overview / Tutorial

  9. Matrix Support ● ● Operator Overloading More interesting Function Overloading ● features ● Statements are valid at the root (outside the functions)

  10. Some things our language can do

  11. Interlude Math Demos

  12. Architecture Scanner/Parser/AST: SAST: ● Scanner reads in source files and tokenizes them. ● Result of the semantic transformation of the AST ● Parser processes tokens into abstract syntax tree. ● Passed to codegen for code emission ● Abstract syntax tree represents Macaw program Codegen (aka Compilator): Semantic Checker (aka Evaluator): ● Takes SAST and emits LLVM code. ● Receives AST and checks validity of semantics and ● No logic or decision-making (except resolving data syntax types); mechanically translates SAST to LLVM IR. ○ Declarations, Types ● Create structure for the list of statements and functions.

  13. Testing Process ● Language reference manual used to devise test cases and scenarios. ○ Both success scenarios and expected failure scenarios Write unit tests that should pass/fail. ○ System architects implemented features, wrote test programs. ● ● Testers broke down test programs into component unit tests. ● “Test all” script implemented to run regressions.

  14. Lessons Learned -- Our most important takeaways ● Chris: Complex project, project management, testing ● Yi: Learned about the language design process, testing to break the language William: Matrix time management, planning language architecture ● ● Joseph: TDD, Semantic checking/transforming is surprisingly powerful

  15. Live Demo -- The coolest things we can do

  16. Questions?

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