g r a i l
play

G R A I L Rendering Innovation Motivation Company Represent - PowerPoint PPT Presentation

Language Articulation Graph G R A I L Rendering Innovation Motivation Company Represent complex graphs with syntactic simplicity Allow users to define flexible data-types Type-inference allows for concise representation of


  1. Language Articulation Graph G R A I L Rendering Innovation

  2. Motivation Company ● Represent complex graphs with syntactic simplicity ● Allow users to define flexible data-types ● Type-inference allows for concise representation of data

  3. Key Features Intuitive Syntax Primitive Types & Control Flows Basic Types if ... else … c = {station: "49th St Station", line: "1", lat:39.9436, lon:75.2167, Int, float, char, str, bool if … else if … service: [0,1,1,1,1,1,1]}; while … d = {station: "116th St Station", line: Binary & Unary Ops for (...;...;...;) … "1", lat:39.56, lon:75.456, service: Arithmetic: +, -, *, / for ( … in … ) ... [0,1,1,1,1,1,0]}; Logical: >, >=, <, <=, =, == g = (c -- d) with {distance: 1};

  4. Key Features Graphical Data Structures & Operations Derived Types List Edge List size(c.service); u -- v with e Edges Dot Graph Graphs c.station = “168th”; g =(a, b, c -- d) with {test:1} Records Record display() e = {test:1}; display(g) y = e.test;

  5. Key Features Structural Comparison Deep Copy lance = {name: "Lancelot", quest: x = [[1, 2], [3,4]]; "grail", colors:["blue"])}; y .= x; robin ={name: "Robin", quest: y[0] = [8, 9]; "grail", colors:["blue", "yellow"]}; fsty = y[0]; lance == {name: "Lancelot", quest: fstx = x[0]; "grail", colors:["blue"])); printint(fsty[0]); lance.colors == robin.colors; printint(fstx[0]);

  6. Key Features Type Inference f(x, y){ h(x){ main(){ return x + y; return x; x = f(1,2); } } y = x + g(3); g(z){ p(x){ hi = h("hi"); y = 0; return x.school; z = h(3); if(z == "hello"){ } a = {school: 3}; y = 5; p(a); } } return y; }

  7. Implementation

  8. Compiler Architectures Source Codes GNU Plot display.c Library Scanner Output executables Tokens .lli files Parser Linker AST Code Inference Typer Generation ll module SAST (.ll files)

  9. Testing

  10. General Compiler Testing Plan ● Start from basics, like arithmetic operators, and move on to advanced features Feed unit test case codes for new-implemented features with expected ● outputs/errors ● Check for exceptions or errors ○ Unit test cases syntax correct? What kind of exceptions? ○ ○ Scanner, Parser, Typer, or Codegen? ○ Send through type-tester ● Use LLVM Interpreter Implemented testing programs that can get outputs from parser or typer if we ● feed the testers with test code files

  11. Demo

  12. Petersen Graph

  13. Thank You!

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