dice
play

Dice Java, but worse David Watkins Khaled Atef Emily Chen Phil - PowerPoint PPT Presentation

Dice Java, but worse David Watkins Khaled Atef Emily Chen Phil Schiffrin Project Manager Testing Wizard Language Guru System Hacker 1 Introduction Dice in a nutshell LETS REVIEW SOME CONCEPTS LLVM Object-Oriented


  1. Dice “Java, but worse” David Watkins Khaled Atef Emily Chen Phil Schiffrin Project Manager Testing Wizard Language Guru System Hacker

  2. 1 Introduction Dice in a nutshell

  3. LET’S REVIEW SOME CONCEPTS LLVM Object-Oriented Multi-Level Inheritance Our backend compiled to The ability to define A Person object can have LL IR code. This allows for objects, define their as many children as it cross-platform code methods, and define wants, but only one without recompiling the private/public scope parent original source Arrays Useful Standard Library Useful Error Messages Single dimensional arrays File, String, and Integer Every single error that the as well as arrays defined classes defined as closely compiler encounters will with expressions placed to the Java Library as print a rich error message in the elements possible for the user

  4. 2 Project Management Timeline Dice is a big language

  5. 5921 Lines of Code Our compiler was a huge undertaking 109 Issues Closed 526 reduce/reduce conflicts resolved 47 Custom Emojis Total success!

  6. 3 rd Party Software Solutions Slack Github Ubuntu The bread and The best solution for Utilizing an Ubuntu butter for group our version control VM stack gave us communications. needs. Branches much needed were key. consistency.

  7. Git History

  8. 3 So how do you speak it? Dice is a BIG language

  9. Syntax Basics Comments Operators Arrays

  10. Syntax Statements Loops if-else/else-if

  11. Syntax Objects Objects Inheritance File IO

  12. 4 How it’s made Not featured on Discovery Channel

  13. Implementation Design Input.dice • Scanner Tokens • Parser AST • Analyzer • Scan and Parse Includes SAST • Codegen Out.ll

  14. Implementation AST program includes classes fields constructors methods statements expressions

  15. Implementation SAST program functions structures Main Reserved statements expressions Fields Func_decls*

  16. Implementation Structs with Inheritance Nerd Struct Techer Struct Stephen Struct int key int key int key bool isNerd bool isNerd bool isNerd bool isTecher bool isTecher bool isTeacher

  17. Implementation Virtual Function Table Class Nerd Techer Stephen Indexes  Function isNerd:Nerd isNerd:Nerd isNerd:Stephen Indexes  isTeacher:Stephen • Lookup the void* using function index and class index • Casts function pointer to correct function pointer • Makes function calls with original parameters

  18. Implementation Standard Library String Class Integer Class File Class Includes methods Get the string Open, close, read, for comparison of representation of and write to a file strings and integers obtaining the length

  19. Implementation Compiler Flags Pretty Printing SAST/AST in JSON Tokens

  20. 5 TDD Test driven development saves lives

  21. Testing Regression Suite TDD Testing Invalid Code From day 1 we made our Making sure our compiler is regression suite. We started not only correct, but also with MicroC, then added a finds user errors test for each bug/feature we could think of

  22. Testing Regression Suite

  23. Time to demo! Hope you like zoos with small dogs

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