Ibrahima Niang Ranjith Kumar S. Sania Arif In a nutshell C++ - - PowerPoint PPT Presentation

ibrahima niang ranjith kumar s sania arif
SMART_READER_LITE
LIVE PREVIEW

Ibrahima Niang Ranjith Kumar S. Sania Arif In a nutshell C++ - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

“Plots on the go”

Ibrahima Niang Ranjith Kumar S. Sania Arif

slide-2
SLIDE 2

In a nutshell

01 02 03 04

Useful Error Messages

Every single error that the compiler encounters will print a rich error message for the user

Lists

We have lists for primitive as well as non-primitive data types such as point, string

Built-in function Libraries

Built-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

slide-3
SLIDE 3

Project Management

175 commits, 3 branches, 25 issues, 2500+ lines of code

slide-4
SLIDE 4

Syntax

Let’s talk PlOtter

Comments Primitive data types Lists

slide-5
SLIDE 5

Loops Conditionals

slide-6
SLIDE 6

Built-in functions: Primitive

Our building block

Line Print PrintXY

slide-7
SLIDE 7

Libraries

Bar Graph Rectangle

To use:

slide-8
SLIDE 8

01 02 04 05 06

Scanner

07 08 09

Code Gen

Sed ut perspiciatis unde omnis iste natus doloremque

Sem Check Parser

Pipeline

PlOtter in the making

Tokens AST SAST Input.plt Input.cpp Input.svg

slide-9
SLIDE 9

Implementation

AST

Program Main Includes Functions Statements Expressions Statements Expressions

slide-10
SLIDE 10

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

slide-11
SLIDE 11

Error Reporting

Parser: On Error, report error, continue parsing. Program: Output: Program: Output: Scanner: On Error, report error, stop scanning.

slide-12
SLIDE 12

Implementation

Compiler Flags

Pretty Printing from AST Program

slide-13
SLIDE 13

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” Tests that we know should pass Proceeded by the word “Fail” Tests that we know should fail

slide-14
SLIDE 14

Test Suite

Sample Output

. . . .

Script

slide-15
SLIDE 15

Demo

slide-16
SLIDE 16

The future of PlOtter

Customizability Support for math functions More libraries Import data from external sources REPL window for on-the-go compiling

slide-17
SLIDE 17

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