SlideShare a Scribd company logo
1 of 40
Don’t Call It a Comeback
Attribute Grammars for Big Data Viz
Leo Meyerovich
Parallelism Lab @ UC
Berkeley
Superconductor: sc-lang.com
1
Why Attribute Grammars?
Beautiful Data
Declarative Design
Multicore/GPU Patterns
compilers
2
10X Less Power vs. Laptop
Faster mobile browsers? Data
visualization? 3
4
“Well-designed graphics
are usually the simplest”
Big Data is Different:
going from Data Reporting
to Knowledge Discovery
… small & static charts enough?
Ex: How to Report Voter
Turnout
5
Swedes Like
Voting
0% 100
%
50%
Voter Turnout
# Votes
Mexic
o
Democracy?
 Bell Curve
Mystery Country
Abnormal curve;
can be voter fraud!
6
Precrafted message,
not knowledge discovery!
demo: fraud analysis
7
8
9
10
Superconductor
is
a collection of domain specific languages
for data visualization
… that compile into parallel JavaScript
(WebCL/WebGL/workers/…).
11
Superconductor: Domain Specific
Languages
12
data
paintlayout
stylize
Parallel & High-Level Language for
Each?
Attribute
Grammars
JSON
CSS
Selectors
DSL 1: Data via JSON
13
JavaScript, Ruby, Python, Jav
a, …
Easy… until 1-10s data
loading
Parsing Demo
14
Parsing Demo
15
Manually Building a Layout System
Stinks
browsera.com
Performance
footprint, parallelis
m, incrementalism,
…
Tools
debugger, IDE, …
Automation Cuts Implementation Costs!
16
Correctness
500pg standard, 100K+ lines of
C++
DSL 2: Automate with Attribute
Grammars
Compilertreemap.ftl
Parallel code
workers, CL, GL
tree: SC_DOM.js
LayoutEngine
.js
offline
17
browser
class HBox : Node
children:
left : Node
right: Node
constraints:
w := left.w + right.w
…
xy xy
y
y
y
w h
w h
x x
x
hw
Writing a Custom Layout: Super
CSS!
10px
5px
Root
HBox
LeafLeaf
LeafLeaf
HBox
w
xy
hw
hwh
input: x, y
var: w, h
[Kastens 1980, Saraiva 2003] [WWW 2010, PPOPP 2013]
2. Single-assignment
1. Local
18
Declarative Calculator!
19
Declarative Calculator!
20
Declarative Calculator!
21
Layout DSL is Flexible!
22
multicoremulticor
e
multicor
e
GPU
GPU
GPU
GPU
expressivenes
s
lazy, iterative, …
1990+
optimize
incremental, parallel
1980+
build
parsers
yacc/bison
Compiler
Research
1970
+
History of Attribute Grammar Formalism
semantics
time FP Research
196
7
build IDEs
spoofax
2000+
Haskell, Coq
synthesis2009+
23
Why Attribute Grammars?
Beautiful Data
Declarative Design
Multicore/GPU Patterns
compilers
24
Leaf
Compute: Layout as Tree Traversals
w,h w,h
w,h
w,h
w,h
w,h
x,y …
1. Works for all data sets
2. Compiler automatically parallelizes!
[WWW 2010]
logical joins
logical spawns
Parallelism in each traversal!
25
Two Examples
26
multicore
GPU
CSS
B = [img, normal, flow, root]
P = [
, , , , , , ,
(buSubInorder, (B,_, _)), ]
Interactive Treemap
P = [ , , , ,  ]
Pattern Programming
27
Need “Structured Programming”
for Automatically Parallel
Languages
Synthesizerfunctional spec
attr grammar
schedule
{w,h}; {x, …
partial behavioral spec
schedule sketch
CSS 1.0, 2.0, 2.1, 3.0, 4.0,
…
28
Input: Partial Behavior (“Schedule
Sketch”)
 _ ;_ ;_ ;_;_ ;_;nest({Text,Font,Inline}, _);_;_
OK: rescheduling
attribs
w, h
bug: less
parallelism!
sequential_inorder{y,r}
Structures parallel programming:
share code, test ideas, and debug
Hole filled by synthesizer with: , {x,y}, “||”, …
Synthesizer rejects programs that cannot obey sketch
29
GPU Patterns
30
parallel for loop
(level synchronous)
GPU Traversals: Flattened & Level-
Synchronous
level 1
Tree
level n
whxy
Nodes in arrays
Array per attribute
Compiler automates code + data
transformations.
[Blelloch 93]
31
circ(…)
Problem: Dynamic Memory Allocation on
GPU?
square(…) rect(…); …
line(…); …
rect(…); …
oval(…)
32
1.0 0.8 0.5 0.2 0 0.2
function circ(x,y,r) {
buffer = new
Array(r*10)
for (i = 0; i < r * 10;
i++)
buffer[i] =
Math.cos(i)
}
dynamic allocation
Fast Dynamic Memory Allocation
allocCirc(…); …
allocRect(…); …
allocLine(…); …
allocRect(…); …
fillCirc(…); …
fillRect(…);
…
fillLine(…); …
fillRect(…);
…
1. Prefix sum for needed
space
2. Allocate buffers
3. Fill vertex buffers in
parallel
4. Give OpenGL buffers
pointer
33
1.0 0.8 0.5 0.2 0
0.2
1.0 0.8 0.5
0.2
1.0 0.8 0.5 0.2 0
0.2
Automatic!
@Line3D(x, y, z, x + 1, y + 1, z + 1)
@Line3D(x, y, z, x + 1, y + 1, z + 1)
=== compiler ===>
size1 := Line3D_alloc(x, y, z, x + 1, y + 1, z + 1)
size2 := Line3D_alloc(x, y, z, x + 1, y + 1, z + 1)
child.bufferIndex := bufferIndex + size1 + size2
render1 := Line3D_fill(x, y, z, x + 1, y + 1, z + 1,
bufferIndex )
render2 := Line3D_fill(x, y, z, x + 1, y + 1, z + 1,
bufferIndex + size1)
34
1
10
100
1,000
10,000
LAYOUT (4 passes) rendering pass TOTAL
Time(ms)
Naïve JS (Chrome 26) Arrays (Chrome 26) GPU (Safari + WebCL 11/3/12)
CPU vs. GPU for Election Treemap:
5 traversals over 100K nodes
Total: 53XTyped arrays:
14X
35
WebCL:
5X
WebCL+WebGL:
32X
Platform: JavaScript is the New
Assembly
36
parallel
multicore:
SIMD:
HTML5 Hardware
Access
GPU:
Too low-level
w/out DSLs
Architecture: Browser-in-a-
Browser
HTML data
CSS styling
JS script
Pixels
Parser
Selectors
Layout
RendererJavaScriptVMRenderer.GL
Parser.js
webpage
37
Layout.CL
Selectors.CL
GPU
superconductor.js
data
styling
widgets
data viz
Compiler
Date stays
on GPU!
Debugger
Multiple
backends
Server
…
GE Demo
38
GE Demo
39
sc-lang.com : please take our survey 
Beautiful Data
Declarative Design
Multicore/GPU Patterns
synthesis + compilation
40

More Related Content

Viewers also liked

Temperature Cycling Tests
Temperature Cycling TestsTemperature Cycling Tests
Temperature Cycling TestsAnjar Bumi
 
FM priekšlikums diferencētā neapliekamā minimuma ieviešanai
FM priekšlikums diferencētā neapliekamā minimuma ieviešanaiFM priekšlikums diferencētā neapliekamā minimuma ieviešanai
FM priekšlikums diferencētā neapliekamā minimuma ieviešanaiFinanšu ministrija
 
Social media workshop BBC Fides
Social media workshop BBC FidesSocial media workshop BBC Fides
Social media workshop BBC FidesRefreshed
 
R -Sweave/ Sweave For Statistical Programming at LaTeX
R -Sweave/ Sweave For Statistical Programming at LaTeX R -Sweave/ Sweave For Statistical Programming at LaTeX
R -Sweave/ Sweave For Statistical Programming at LaTeX Hirwanto Iwan
 
Мапа порушень та інші інформаційні продукти ОПОРИ
Мапа порушень та інші інформаційні продукти ОПОРИМапа порушень та інші інформаційні продукти ОПОРИ
Мапа порушень та інші інформаційні продукти ОПОРИVolyn Media
 
Laporan Metode Statistikia II
Laporan Metode Statistikia IILaporan Metode Statistikia II
Laporan Metode Statistikia IIHirwanto Iwan
 
Ministriju iesniegtās jaunās politikas iniciatīvas 2015., 2016. un 2017. gadam
Ministriju iesniegtās jaunās politikas iniciatīvas 2015., 2016. un 2017. gadamMinistriju iesniegtās jaunās politikas iniciatīvas 2015., 2016. un 2017. gadam
Ministriju iesniegtās jaunās politikas iniciatīvas 2015., 2016. un 2017. gadamFinanšu ministrija
 

Viewers also liked (13)

Temperature Cycling Tests
Temperature Cycling TestsTemperature Cycling Tests
Temperature Cycling Tests
 
Kerkis
KerkisKerkis
Kerkis
 
J company
J companyJ company
J company
 
FM priekšlikums diferencētā neapliekamā minimuma ieviešanai
FM priekšlikums diferencētā neapliekamā minimuma ieviešanaiFM priekšlikums diferencētā neapliekamā minimuma ieviešanai
FM priekšlikums diferencētā neapliekamā minimuma ieviešanai
 
Gfs neohellenic
Gfs neohellenicGfs neohellenic
Gfs neohellenic
 
Tiringa
TiringaTiringa
Tiringa
 
Social media workshop BBC Fides
Social media workshop BBC FidesSocial media workshop BBC Fides
Social media workshop BBC Fides
 
Tribute to Yogi Berra
Tribute to Yogi BerraTribute to Yogi Berra
Tribute to Yogi Berra
 
R -Sweave/ Sweave For Statistical Programming at LaTeX
R -Sweave/ Sweave For Statistical Programming at LaTeX R -Sweave/ Sweave For Statistical Programming at LaTeX
R -Sweave/ Sweave For Statistical Programming at LaTeX
 
Мапа порушень та інші інформаційні продукти ОПОРИ
Мапа порушень та інші інформаційні продукти ОПОРИМапа порушень та інші інформаційні продукти ОПОРИ
Мапа порушень та інші інформаційні продукти ОПОРИ
 
Laporan Metode Statistikia II
Laporan Metode Statistikia IILaporan Metode Statistikia II
Laporan Metode Statistikia II
 
Ministriju iesniegtās jaunās politikas iniciatīvas 2015., 2016. un 2017. gadam
Ministriju iesniegtās jaunās politikas iniciatīvas 2015., 2016. un 2017. gadamMinistriju iesniegtās jaunās politikas iniciatīvas 2015., 2016. un 2017. gadam
Ministriju iesniegtās jaunās politikas iniciatīvas 2015., 2016. un 2017. gadam
 
Computer modern
Computer modernComputer modern
Computer modern
 

Similar to Don't Call It a Comeback: Attribute Grammars for Big Data Visualization

WT-4065, Superconductor: GPU Web Programming for Big Data Visualization, by ...
WT-4065, Superconductor: GPU Web Programming for Big Data Visualization, by  ...WT-4065, Superconductor: GPU Web Programming for Big Data Visualization, by  ...
WT-4065, Superconductor: GPU Web Programming for Big Data Visualization, by ...AMD Developer Central
 
Data-Centric Parallel Programming
Data-Centric Parallel ProgrammingData-Centric Parallel Programming
Data-Centric Parallel Programminginside-BigData.com
 
Trends in Programming Technology you might want to keep an eye on af Bent Tho...
Trends in Programming Technology you might want to keep an eye on af Bent Tho...Trends in Programming Technology you might want to keep an eye on af Bent Tho...
Trends in Programming Technology you might want to keep an eye on af Bent Tho...InfinIT - Innovationsnetværket for it
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentDavid Galeano
 
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksSegmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksDavid Evans
 
Advanced Data Science on Spark-(Reza Zadeh, Stanford)
Advanced Data Science on Spark-(Reza Zadeh, Stanford)Advanced Data Science on Spark-(Reza Zadeh, Stanford)
Advanced Data Science on Spark-(Reza Zadeh, Stanford)Spark Summit
 
Introduction to Big Data
Introduction to Big DataIntroduction to Big Data
Introduction to Big DataAlbert Bifet
 
Joey gonzalez, graph lab, m lconf 2013
Joey gonzalez, graph lab, m lconf 2013Joey gonzalez, graph lab, m lconf 2013
Joey gonzalez, graph lab, m lconf 2013MLconf
 
2 Years of Real World FP at REA
2 Years of Real World FP at REA2 Years of Real World FP at REA
2 Years of Real World FP at REAkenbot
 
Hadoop institutes-in-bangalore
Hadoop institutes-in-bangaloreHadoop institutes-in-bangalore
Hadoop institutes-in-bangaloreKelly Technologies
 
Hadoop trainting-in-hyderabad@kelly technologies
Hadoop trainting-in-hyderabad@kelly technologiesHadoop trainting-in-hyderabad@kelly technologies
Hadoop trainting-in-hyderabad@kelly technologiesKelly Technologies
 
Natural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali ZaidiNatural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali ZaidiDatabricks
 
Hadoop trainting in hyderabad@kelly technologies
Hadoop trainting in hyderabad@kelly technologiesHadoop trainting in hyderabad@kelly technologies
Hadoop trainting in hyderabad@kelly technologiesKelly Technologies
 
The Next Mainstream Programming Language: A Game Developer’s Perspective
The Next Mainstream Programming Language: A Game Developer’s PerspectiveThe Next Mainstream Programming Language: A Game Developer’s Perspective
The Next Mainstream Programming Language: A Game Developer’s Perspectiveguest4fd7a2
 
Tim Popl
Tim PoplTim Popl
Tim Poplmchaar
 
Class 26: Objectifying Objects
Class 26: Objectifying ObjectsClass 26: Objectifying Objects
Class 26: Objectifying ObjectsDavid Evans
 
High-Performance Graph Analysis and Modeling
High-Performance Graph Analysis and ModelingHigh-Performance Graph Analysis and Modeling
High-Performance Graph Analysis and ModelingNesreen K. Ahmed
 
Keynote at IWLS 2017
Keynote at IWLS 2017Keynote at IWLS 2017
Keynote at IWLS 2017Manish Pandey
 

Similar to Don't Call It a Comeback: Attribute Grammars for Big Data Visualization (20)

WT-4065, Superconductor: GPU Web Programming for Big Data Visualization, by ...
WT-4065, Superconductor: GPU Web Programming for Big Data Visualization, by  ...WT-4065, Superconductor: GPU Web Programming for Big Data Visualization, by  ...
WT-4065, Superconductor: GPU Web Programming for Big Data Visualization, by ...
 
Data-Centric Parallel Programming
Data-Centric Parallel ProgrammingData-Centric Parallel Programming
Data-Centric Parallel Programming
 
Trends in Programming Technology you might want to keep an eye on af Bent Tho...
Trends in Programming Technology you might want to keep an eye on af Bent Tho...Trends in Programming Technology you might want to keep an eye on af Bent Tho...
Trends in Programming Technology you might want to keep an eye on af Bent Tho...
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game development
 
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and TasksSegmentation Faults, Page Faults, Processes, Threads, and Tasks
Segmentation Faults, Page Faults, Processes, Threads, and Tasks
 
Advanced Data Science on Spark-(Reza Zadeh, Stanford)
Advanced Data Science on Spark-(Reza Zadeh, Stanford)Advanced Data Science on Spark-(Reza Zadeh, Stanford)
Advanced Data Science on Spark-(Reza Zadeh, Stanford)
 
Introduction to Big Data
Introduction to Big DataIntroduction to Big Data
Introduction to Big Data
 
Matlab workshop
Matlab workshopMatlab workshop
Matlab workshop
 
Joey gonzalez, graph lab, m lconf 2013
Joey gonzalez, graph lab, m lconf 2013Joey gonzalez, graph lab, m lconf 2013
Joey gonzalez, graph lab, m lconf 2013
 
2 Years of Real World FP at REA
2 Years of Real World FP at REA2 Years of Real World FP at REA
2 Years of Real World FP at REA
 
K10765 Matlab 3D Mesh Plots
K10765 Matlab 3D Mesh PlotsK10765 Matlab 3D Mesh Plots
K10765 Matlab 3D Mesh Plots
 
Hadoop institutes-in-bangalore
Hadoop institutes-in-bangaloreHadoop institutes-in-bangalore
Hadoop institutes-in-bangalore
 
Hadoop trainting-in-hyderabad@kelly technologies
Hadoop trainting-in-hyderabad@kelly technologiesHadoop trainting-in-hyderabad@kelly technologies
Hadoop trainting-in-hyderabad@kelly technologies
 
Natural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali ZaidiNatural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali Zaidi
 
Hadoop trainting in hyderabad@kelly technologies
Hadoop trainting in hyderabad@kelly technologiesHadoop trainting in hyderabad@kelly technologies
Hadoop trainting in hyderabad@kelly technologies
 
The Next Mainstream Programming Language: A Game Developer’s Perspective
The Next Mainstream Programming Language: A Game Developer’s PerspectiveThe Next Mainstream Programming Language: A Game Developer’s Perspective
The Next Mainstream Programming Language: A Game Developer’s Perspective
 
Tim Popl
Tim PoplTim Popl
Tim Popl
 
Class 26: Objectifying Objects
Class 26: Objectifying ObjectsClass 26: Objectifying Objects
Class 26: Objectifying Objects
 
High-Performance Graph Analysis and Modeling
High-Performance Graph Analysis and ModelingHigh-Performance Graph Analysis and Modeling
High-Performance Graph Analysis and Modeling
 
Keynote at IWLS 2017
Keynote at IWLS 2017Keynote at IWLS 2017
Keynote at IWLS 2017
 

Recently uploaded

Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInOutage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInThousandEyes
 
The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)IES VE
 
Top 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTop 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTopCSSGallery
 
From the origin to the future of Open Source model and business
From the origin to the future of  Open Source model and businessFrom the origin to the future of  Open Source model and business
From the origin to the future of Open Source model and businessFrancesco Corti
 
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdfQ4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdfTejal81
 
Scenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosScenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosErol GIRAUDY
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Muhammad Tiham Siddiqui
 
The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)codyslingerland1
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxKaustubhBhavsar6
 
IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingMAGNIntelligence
 
Technical SEO for Improved Accessibility WTS FEST
Technical SEO for Improved Accessibility  WTS FESTTechnical SEO for Improved Accessibility  WTS FEST
Technical SEO for Improved Accessibility WTS FESTBillieHyde
 
March Patch Tuesday
March Patch TuesdayMarch Patch Tuesday
March Patch TuesdayIvanti
 
Oracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptxOracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptxSatishbabu Gunukula
 
Novo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNovo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNeo4j
 
AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024Brian Pichman
 
Planetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingFrancesco Corti
 
My key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIMy key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIVijayananda Mohire
 
UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2DianaGray10
 

Recently uploaded (20)

Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInOutage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
 
The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)The Importance of Indoor Air Quality (English)
The Importance of Indoor Air Quality (English)
 
Top 10 Squarespace Development Companies
Top 10 Squarespace Development CompaniesTop 10 Squarespace Development Companies
Top 10 Squarespace Development Companies
 
From the origin to the future of Open Source model and business
From the origin to the future of  Open Source model and businessFrom the origin to the future of  Open Source model and business
From the origin to the future of Open Source model and business
 
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdfQ4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
 
Scenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenariosScenario Library et REX Discover industry- and role- based scenarios
Scenario Library et REX Discover industry- and role- based scenarios
 
Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)Trailblazer Community - Flows Workshop (Session 2)
Trailblazer Community - Flows Workshop (Session 2)
 
The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptx
 
IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced Computing
 
Technical SEO for Improved Accessibility WTS FEST
Technical SEO for Improved Accessibility  WTS FESTTechnical SEO for Improved Accessibility  WTS FEST
Technical SEO for Improved Accessibility WTS FEST
 
March Patch Tuesday
March Patch TuesdayMarch Patch Tuesday
March Patch Tuesday
 
Oracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptxOracle Database 23c Security New Features.pptx
Oracle Database 23c Security New Features.pptx
 
Novo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNovo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4j
 
AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024
 
Planetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile Brochure
 
Where developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is goingWhere developers are challenged, what developers want and where DevEx is going
Where developers are challenged, what developers want and where DevEx is going
 
My key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAIMy key hands-on projects in Quantum, and QAI
My key hands-on projects in Quantum, and QAI
 
UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2UiPath Studio Web workshop series - Day 2
UiPath Studio Web workshop series - Day 2
 

Don't Call It a Comeback: Attribute Grammars for Big Data Visualization

  • 1. Don’t Call It a Comeback Attribute Grammars for Big Data Viz Leo Meyerovich Parallelism Lab @ UC Berkeley Superconductor: sc-lang.com 1
  • 2. Why Attribute Grammars? Beautiful Data Declarative Design Multicore/GPU Patterns compilers 2
  • 3. 10X Less Power vs. Laptop Faster mobile browsers? Data visualization? 3
  • 4. 4 “Well-designed graphics are usually the simplest” Big Data is Different: going from Data Reporting to Knowledge Discovery … small & static charts enough?
  • 5. Ex: How to Report Voter Turnout 5 Swedes Like Voting 0% 100 % 50% Voter Turnout # Votes Mexic o Democracy?  Bell Curve Mystery Country Abnormal curve; can be voter fraud!
  • 6. 6 Precrafted message, not knowledge discovery! demo: fraud analysis
  • 7. 7
  • 8. 8
  • 9. 9
  • 10. 10
  • 11. Superconductor is a collection of domain specific languages for data visualization … that compile into parallel JavaScript (WebCL/WebGL/workers/…). 11
  • 12. Superconductor: Domain Specific Languages 12 data paintlayout stylize Parallel & High-Level Language for Each? Attribute Grammars JSON CSS Selectors
  • 13. DSL 1: Data via JSON 13 JavaScript, Ruby, Python, Jav a, … Easy… until 1-10s data loading
  • 16. Manually Building a Layout System Stinks browsera.com Performance footprint, parallelis m, incrementalism, … Tools debugger, IDE, … Automation Cuts Implementation Costs! 16 Correctness 500pg standard, 100K+ lines of C++
  • 17. DSL 2: Automate with Attribute Grammars Compilertreemap.ftl Parallel code workers, CL, GL tree: SC_DOM.js LayoutEngine .js offline 17 browser
  • 18. class HBox : Node children: left : Node right: Node constraints: w := left.w + right.w … xy xy y y y w h w h x x x hw Writing a Custom Layout: Super CSS! 10px 5px Root HBox LeafLeaf LeafLeaf HBox w xy hw hwh input: x, y var: w, h [Kastens 1980, Saraiva 2003] [WWW 2010, PPOPP 2013] 2. Single-assignment 1. Local 18
  • 22. Layout DSL is Flexible! 22 multicoremulticor e multicor e GPU GPU GPU GPU
  • 23. expressivenes s lazy, iterative, … 1990+ optimize incremental, parallel 1980+ build parsers yacc/bison Compiler Research 1970 + History of Attribute Grammar Formalism semantics time FP Research 196 7 build IDEs spoofax 2000+ Haskell, Coq synthesis2009+ 23
  • 24. Why Attribute Grammars? Beautiful Data Declarative Design Multicore/GPU Patterns compilers 24
  • 25. Leaf Compute: Layout as Tree Traversals w,h w,h w,h w,h w,h w,h x,y … 1. Works for all data sets 2. Compiler automatically parallelizes! [WWW 2010] logical joins logical spawns Parallelism in each traversal! 25
  • 26. Two Examples 26 multicore GPU CSS B = [img, normal, flow, root] P = [ , , , , , , , (buSubInorder, (B,_, _)), ] Interactive Treemap P = [ , , , ,  ]
  • 28. Need “Structured Programming” for Automatically Parallel Languages Synthesizerfunctional spec attr grammar schedule {w,h}; {x, … partial behavioral spec schedule sketch CSS 1.0, 2.0, 2.1, 3.0, 4.0, … 28
  • 29. Input: Partial Behavior (“Schedule Sketch”)  _ ;_ ;_ ;_;_ ;_;nest({Text,Font,Inline}, _);_;_ OK: rescheduling attribs w, h bug: less parallelism! sequential_inorder{y,r} Structures parallel programming: share code, test ideas, and debug Hole filled by synthesizer with: , {x,y}, “||”, … Synthesizer rejects programs that cannot obey sketch 29
  • 31. parallel for loop (level synchronous) GPU Traversals: Flattened & Level- Synchronous level 1 Tree level n whxy Nodes in arrays Array per attribute Compiler automates code + data transformations. [Blelloch 93] 31
  • 32. circ(…) Problem: Dynamic Memory Allocation on GPU? square(…) rect(…); … line(…); … rect(…); … oval(…) 32 1.0 0.8 0.5 0.2 0 0.2 function circ(x,y,r) { buffer = new Array(r*10) for (i = 0; i < r * 10; i++) buffer[i] = Math.cos(i) } dynamic allocation
  • 33. Fast Dynamic Memory Allocation allocCirc(…); … allocRect(…); … allocLine(…); … allocRect(…); … fillCirc(…); … fillRect(…); … fillLine(…); … fillRect(…); … 1. Prefix sum for needed space 2. Allocate buffers 3. Fill vertex buffers in parallel 4. Give OpenGL buffers pointer 33 1.0 0.8 0.5 0.2 0 0.2 1.0 0.8 0.5 0.2 1.0 0.8 0.5 0.2 0 0.2
  • 34. Automatic! @Line3D(x, y, z, x + 1, y + 1, z + 1) @Line3D(x, y, z, x + 1, y + 1, z + 1) === compiler ===> size1 := Line3D_alloc(x, y, z, x + 1, y + 1, z + 1) size2 := Line3D_alloc(x, y, z, x + 1, y + 1, z + 1) child.bufferIndex := bufferIndex + size1 + size2 render1 := Line3D_fill(x, y, z, x + 1, y + 1, z + 1, bufferIndex ) render2 := Line3D_fill(x, y, z, x + 1, y + 1, z + 1, bufferIndex + size1) 34
  • 35. 1 10 100 1,000 10,000 LAYOUT (4 passes) rendering pass TOTAL Time(ms) Naïve JS (Chrome 26) Arrays (Chrome 26) GPU (Safari + WebCL 11/3/12) CPU vs. GPU for Election Treemap: 5 traversals over 100K nodes Total: 53XTyped arrays: 14X 35 WebCL: 5X WebCL+WebGL: 32X
  • 36. Platform: JavaScript is the New Assembly 36 parallel multicore: SIMD: HTML5 Hardware Access GPU: Too low-level w/out DSLs
  • 37. Architecture: Browser-in-a- Browser HTML data CSS styling JS script Pixels Parser Selectors Layout RendererJavaScriptVMRenderer.GL Parser.js webpage 37 Layout.CL Selectors.CL GPU superconductor.js data styling widgets data viz Compiler Date stays on GPU! Debugger Multiple backends Server …
  • 40. sc-lang.com : please take our survey  Beautiful Data Declarative Design Multicore/GPU Patterns synthesis + compilation 40

Editor's Notes

  1. First line: To demonstrate how to specify a layout in our system let’s look at an example, specifically an HboxHbox is one of many layout components that positions its contents horizontallyIn specification form, this means that the width attribute of Hbox is the sum of the children’s widthsRest of Hbox specified in a similar manner, for instance… - Given a set of such specifications for all layout components, we need to find a ordering of assignments that solves an input tree
  2. Gloss over details of what is going on. Take away should be: this stuff is complicated, but don’t worry, compiler does it all for you.[what is meant by ‘subtree’ here? And ‘including edges’? Get this slide clarified.]
  3. [MENTION THAT WE STAY ON GPU HERE. Rewrite to include this.]‘malloc’ is what we want, but can’t have. Need solution.