from program analysis research to industrial programming language development andy maule
Post on 22-Dec-2015
215 views
TRANSCRIPT
![Page 1: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/1.jpg)
From Program Analysis Research to Industrial Programming Language DevelopmentAndy Maule
![Page 2: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/2.jpg)
Scenario • UCL coffee company™• Wholesale coffee
traders
![Page 3: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/3.jpg)
Sales application
• Process orders• Add/update
customers
![Page 4: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/4.jpg)
Inventory application
• Update stock details• Manage supplier info• Add/remove
products
![Page 5: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/5.jpg)
Database schema
ProductOrder
SupplierCustomer
1
∞ 1
1
∞ ∞
![Page 6: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/6.jpg)
Change
Supplier
Column: Address
Column: Street
Column: Town
Column: Country
![Page 7: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/7.jpg)
Impacts?INSERT INTO Suppliers (Name, Address) VALUES (?, ?)
Invalid Column Name Address
Missing required value Town
Missing required value Street
Missing required value Country
![Page 8: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/8.jpg)
Estimate impact by hand
• DB Refactoring book: “knowledge built up
over time… gut feeling…”
• Manual inspection
![Page 9: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/9.jpg)
Don’t change the database!
• What will be affected?
• What is the cost of this change?
![Page 10: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/10.jpg)
Automated analysis
• Program analysis• Compilers
App DBDependences
![Page 11: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/11.jpg)
Precision
• False positives• Need low false
positives• Go through by hand
![Page 12: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/12.jpg)
How much do low false positives cost
O(kn)
Size of analyzed program
Anal
ysis
tim
e
![Page 13: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/13.jpg)
Making it scale
• Make algorithms more efficient
• Reduce the size of the program
![Page 14: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/14.jpg)
Overview
![Page 15: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/15.jpg)
1. Program slicing“… the parts of a program that (potentially)affect the values computed at some point of interest”
Backward slice(affect criteria)
Criteria
Forward slice(affected by criteria)
![Page 16: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/16.jpg)
Estimation using SUITE
Schema Update Impact Tool Environment
![Page 17: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/17.jpg)
Does it work?
Change Predicted True positives False positives
1 5 warns 2 3
2 4 warns 0 4
3 4 warns 0 4
4 4 warns 0 4
5 1 err 1 0
6 1 warn 1 0
7 1 warn 0 1
8 None 0 0
App (v.234)
App(v.235)
changes
Predict effects Compare to differences
Version history
… …
![Page 18: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/18.jpg)
Does it scale?
1 2 3 4 5 6 7 8 900:00.0
00:43.2
01:26.4
02:09.6
02:52.8
03:36.0
04:19.2
05:02.4
05:45.6
06:28.8
07:12.0
Whole program
With slicing
Precision (value of k)
Exec
ution
tim
e (m
m :
ss )
![Page 19: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/19.jpg)
Internship
• Building tools is hard!• How is it done in the
real world?• I got to find out
![Page 20: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/20.jpg)
Now…• The M programming language• The Oslo project
![Page 21: From Program Analysis Research to Industrial Programming Language Development Andy Maule](https://reader030.vdocuments.site/reader030/viewer/2022032523/56649d805503460f94a64476/html5/thumbnails/21.jpg)
What’s it like being a PhD in Industry?
• At least 5 PhDs on my team
• REALLY Smart people• REALLY interesting
work• Lots of resources• Potentially big impact• Good pay