from program analysis research to industrial programming language development andy maule

22
From Program Analysis Research to Industrial Programming Language Development Andy Maule

Post on 22-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: From Program Analysis Research to Industrial Programming Language Development Andy Maule

From Program Analysis Research to Industrial Programming Language DevelopmentAndy Maule

Page 2: From Program Analysis Research to Industrial Programming Language Development Andy Maule

Scenario • UCL coffee company™• Wholesale coffee

traders

Page 3: From Program Analysis Research to Industrial Programming Language Development Andy Maule

Sales application

• Process orders• Add/update

customers

Page 4: From Program Analysis Research to Industrial Programming Language Development Andy Maule

Inventory application

• Update stock details• Manage supplier info• Add/remove

products

Page 5: From Program Analysis Research to Industrial Programming Language Development Andy Maule

Database schema

ProductOrder

SupplierCustomer

1

∞ 1

1

∞ ∞

Page 6: From Program Analysis Research to Industrial Programming Language Development Andy Maule

Change

Supplier

Column: Address

Column: Street

Column: Town

Column: Country

Page 7: From Program Analysis Research to Industrial Programming Language Development Andy Maule

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

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

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

Automated analysis

• Program analysis• Compilers

App DBDependences

Page 11: From Program Analysis Research to Industrial Programming Language Development Andy Maule

Precision

• False positives• Need low false

positives• Go through by hand

Page 12: From Program Analysis Research to Industrial Programming Language Development Andy Maule

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

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

Overview

Page 15: From Program Analysis Research to Industrial Programming Language Development Andy Maule

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

Estimation using SUITE

Schema Update Impact Tool Environment

Page 17: From Program Analysis Research to Industrial Programming Language Development Andy Maule

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

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

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

Now…• The M programming language• The Oslo project

Page 21: From Program Analysis Research to Industrial Programming Language Development Andy Maule

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

Page 22: From Program Analysis Research to Industrial Programming Language Development Andy Maule

The end…

[email protected]

Funded by

London Software Systems