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

From Program A nalysis R esearch to Industrial Programming L anguage Development

  • Upload
    teenie

  • View
    23

  • Download
    0

Embed Size (px)

DESCRIPTION

From Program A nalysis R esearch to Industrial Programming L anguage Development. Andy Maule. Scenario. UCL coffee company™ Wholesale coffee traders. Sales application. Process orders Add/update customers. Inventory application. Update stock details Manage supplier info - PowerPoint PPT Presentation

Citation preview

Page 1: From  Program  A nalysis  R esearch  to Industrial Programming  L anguage Development

From Program Analysis Research to Industrial Programming Language DevelopmentAndy Maule

Page 2: From  Program  A nalysis  R esearch  to Industrial Programming  L anguage Development

Scenario • UCL coffee company™• Wholesale coffee

traders

Page 3: From  Program  A nalysis  R esearch  to Industrial Programming  L anguage Development

Sales application

• Process orders• Add/update

customers

Page 4: From  Program  A nalysis  R esearch  to Industrial Programming  L anguage Development

Inventory application

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

products

Page 5: From  Program  A nalysis  R esearch  to Industrial Programming  L anguage Development

Database schema

ProductOrder

SupplierCustomer

1

∞ 1

1

∞ ∞

Page 6: From  Program  A nalysis  R esearch  to Industrial Programming  L anguage Development

Change

Supplier

Column: Address

Column: Street

Column: Town

Column: Country

Page 7: From  Program  A nalysis  R esearch  to Industrial Programming  L anguage Development

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  A nalysis  R esearch  to Industrial Programming  L anguage Development

Estimate impact by hand

• DB Refactoring book: “knowledge built up

over time… gut feeling…”

• Manual inspection

Page 9: From  Program  A nalysis  R esearch  to Industrial Programming  L anguage Development

Don’t change the database!

• What will be affected?

• What is the cost of this change?

Page 10: From  Program  A nalysis  R esearch  to Industrial Programming  L anguage Development

Automated analysis

• Program analysis• Compilers

App DBDependences

Page 11: From  Program  A nalysis  R esearch  to Industrial Programming  L anguage Development

Precision

• False positives• Need low false

positives• Go through by hand

Page 12: From  Program  A nalysis  R esearch  to Industrial Programming  L anguage Development

How much do low false positives cost

O(kn)

Size of analyzed program

Anal

ysis

time

Page 13: From  Program  A nalysis  R esearch  to Industrial Programming  L anguage Development

Making it scale

• Make algorithms more efficient

• Reduce the size of the program

Page 14: From  Program  A nalysis  R esearch  to Industrial Programming  L anguage Development

Overview

Page 15: From  Program  A nalysis  R esearch  to Industrial Programming  L anguage Development

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  A nalysis  R esearch  to Industrial Programming  L anguage Development

Estimation using SUITE

Schema Update Impact Tool Environment

Page 17: From  Program  A nalysis  R esearch  to Industrial Programming  L anguage Development

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  A nalysis  R esearch  to Industrial Programming  L anguage Development

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  A nalysis  R esearch  to Industrial Programming  L anguage Development

Internship

• Building tools is hard!• How is it done in the

real world?• I got to find out

Page 20: From  Program  A nalysis  R esearch  to Industrial Programming  L anguage Development

Now…• The M programming language• The Oslo project

Page 21: From  Program  A nalysis  R esearch  to Industrial Programming  L anguage Development

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  A nalysis  R esearch  to Industrial Programming  L anguage Development

The end…

[email protected]

Funded by

London Software Systems