“Plots on the go” Ibrahima Niang Ranjith Kumar S. Sania Arif
In a nutshell C++ Lists 01 03 Our backend compiles down We have lists for primitive as to C++, allowing us to re-use well as non-primitive data code without re-compiling types such as point, string Useful Error Messages Built-in function Libraries 04 02 Every single error that the Built-In functions written and compiler encounters will compiled in our own print a rich error message language, have the ability to for the user be included as libraries
Project Management 175 commits, 3 branches, 25 issues, 2500+ lines of code
Syntax Let’s talk PlOtter Primitive data types Lists Comments
Conditionals Loops
Built-in functions: Primitive Print Line PrintXY Our building block
Libraries Bar Graph To use: Rectangle
Pipeline PlOtter in the making Scanner Parser Input.plt Tokens 01 04 02 AST Sem Check SAST 05 06 Sed ut perspiciatis Code Gen unde omnis iste natus doloremque Input.cpp Input.svg 07 09 08
Implementation AST Program Includes Functions Main Statements Expressions Statements Expressions
Semantic Checking The meat of the compiler Maintaining a Symbol table Undeclared, redeclared functions and identifiers Type Checking Validation according to language specs Scoping and visibility Static, block
Error Reporting Scanner: On Error, report error, stop scanning. Program: Output: Parser: On Error, report error, continue parsing. Program: Output:
Implementation Compiler Flags Pretty Printing from AST Program
Test Driven Development New test for every feature Goal part 1: Make test pass Goal part 2: Fail no other tests Pass Tests Fail Tests Proceeded by the word “Pass” Proceeded by the word “Fail” Tests that we know should pass Tests that we know should fail
Test Suite Script Sample Output . . . .
Demo
The future of PlOtter Customizability Support for math functions Import data from external sources REPL window for on-the-go compiling More libraries
Takeaways Pair Programming saves lives. OCaml is awesome, give it time. Use Prof. Edwards’ slides. Choose teammates wisely, you’ll be stuck with them for the term. Courtesy: Prof. Edwards
Recommend
More recommend