Ibrahima Niang Ranjith Kumar S. Sania Arif
Transcript of Ibrahima Niang Ranjith Kumar S. Sania Arif
![Page 1: Ibrahima Niang Ranjith Kumar S. Sania Arif](https://reader030.fdocuments.us/reader030/viewer/2022012715/61ad66770dc3824ceb45ec72/html5/thumbnails/1.jpg)
“Plots on the go”
Ibrahima Niang Ranjith Kumar S. Sania Arif
![Page 2: Ibrahima Niang Ranjith Kumar S. Sania Arif](https://reader030.fdocuments.us/reader030/viewer/2022012715/61ad66770dc3824ceb45ec72/html5/thumbnails/2.jpg)
In a nutshell
01
02
03
04 Useful Error MessagesEvery single error that the compiler encounters will print a rich error message for the user
ListsWe have lists for primitive as well as non-primitive data types such as point, string
Built-in function LibrariesBuilt-In functions written and compiled in our own language, have the ability to be included as libraries
C++Our backend compiles down to C++, allowing us to re-use code without re-compiling
![Page 3: Ibrahima Niang Ranjith Kumar S. Sania Arif](https://reader030.fdocuments.us/reader030/viewer/2022012715/61ad66770dc3824ceb45ec72/html5/thumbnails/3.jpg)
Project Management175 commits, 3 branches, 25 issues, 2500+ lines of code
![Page 4: Ibrahima Niang Ranjith Kumar S. Sania Arif](https://reader030.fdocuments.us/reader030/viewer/2022012715/61ad66770dc3824ceb45ec72/html5/thumbnails/4.jpg)
SyntaxLet’s talk PlOtter
Comments
Primitive data typesLists
![Page 5: Ibrahima Niang Ranjith Kumar S. Sania Arif](https://reader030.fdocuments.us/reader030/viewer/2022012715/61ad66770dc3824ceb45ec72/html5/thumbnails/5.jpg)
LoopsConditionals
![Page 6: Ibrahima Niang Ranjith Kumar S. Sania Arif](https://reader030.fdocuments.us/reader030/viewer/2022012715/61ad66770dc3824ceb45ec72/html5/thumbnails/6.jpg)
Built-in functions: Primitive
Our building block
LinePrint
PrintXY
![Page 7: Ibrahima Niang Ranjith Kumar S. Sania Arif](https://reader030.fdocuments.us/reader030/viewer/2022012715/61ad66770dc3824ceb45ec72/html5/thumbnails/7.jpg)
LibrariesBar Graph
Rectangle
To use:
![Page 8: Ibrahima Niang Ranjith Kumar S. Sania Arif](https://reader030.fdocuments.us/reader030/viewer/2022012715/61ad66770dc3824ceb45ec72/html5/thumbnails/8.jpg)
01 02 04
05 06
Scanner
07 08 09
Code GenSed ut perspiciatis
unde omnis iste natus doloremque
Sem Check
Parser
PipelinePlOtter in the making
Tokens
ASTSAST
Input.plt
Input.cpp Input.svg
![Page 9: Ibrahima Niang Ranjith Kumar S. Sania Arif](https://reader030.fdocuments.us/reader030/viewer/2022012715/61ad66770dc3824ceb45ec72/html5/thumbnails/9.jpg)
ImplementationAST
Program
MainIncludes Functions
Statements ExpressionsStatements Expressions
![Page 10: Ibrahima Niang Ranjith Kumar S. Sania Arif](https://reader030.fdocuments.us/reader030/viewer/2022012715/61ad66770dc3824ceb45ec72/html5/thumbnails/10.jpg)
Semantic Checking
Maintaining a Symbol table
Type Checking
Scoping and visibility
The meat of the compiler
Undeclared, redeclared functions and identifiers
Validation according to language specs
Static, block
![Page 11: Ibrahima Niang Ranjith Kumar S. Sania Arif](https://reader030.fdocuments.us/reader030/viewer/2022012715/61ad66770dc3824ceb45ec72/html5/thumbnails/11.jpg)
Error Reporting
Parser: On Error, report error, continue parsing.
Program:
Output:
Program:
Output:
Scanner: On Error, report error, stop scanning.
![Page 12: Ibrahima Niang Ranjith Kumar S. Sania Arif](https://reader030.fdocuments.us/reader030/viewer/2022012715/61ad66770dc3824ceb45ec72/html5/thumbnails/12.jpg)
ImplementationCompiler Flags
Pretty Printing from ASTProgram
![Page 13: Ibrahima Niang Ranjith Kumar S. Sania Arif](https://reader030.fdocuments.us/reader030/viewer/2022012715/61ad66770dc3824ceb45ec72/html5/thumbnails/13.jpg)
Test Driven DevelopmentNew test for every feature
Goal part 1: Make test passGoal part 2: Fail no other tests
Pass Tests Fail Tests
Proceeded by the word “Pass”
Tests that we know should pass
Proceeded by the word “Fail”
Tests that we know should fail
![Page 14: Ibrahima Niang Ranjith Kumar S. Sania Arif](https://reader030.fdocuments.us/reader030/viewer/2022012715/61ad66770dc3824ceb45ec72/html5/thumbnails/14.jpg)
Test SuiteSample Output
.
.
.
.
Script
![Page 15: Ibrahima Niang Ranjith Kumar S. Sania Arif](https://reader030.fdocuments.us/reader030/viewer/2022012715/61ad66770dc3824ceb45ec72/html5/thumbnails/15.jpg)
Demo
![Page 16: Ibrahima Niang Ranjith Kumar S. Sania Arif](https://reader030.fdocuments.us/reader030/viewer/2022012715/61ad66770dc3824ceb45ec72/html5/thumbnails/16.jpg)
The future of PlOtter
Customizability
Support for math functions
More libraries
Import data from external sources
REPL window for on-the-go compiling
![Page 17: Ibrahima Niang Ranjith Kumar S. Sania Arif](https://reader030.fdocuments.us/reader030/viewer/2022012715/61ad66770dc3824ceb45ec72/html5/thumbnails/17.jpg)
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