Inferring Hierarchical Motifs from Execution Traces Saba Alimadadi , Ali Mesbah, Karthik Pattabiraman saba@northeastern.edu
All truths are easy to understand once they are discovered; the point is to discover them. — Galileo Galilei
Search Relate Model Collect [Ko et al. ’06], [Murphy et al. ’95]
Execution Traces: Complex and Overwhelming
recurring patterns? fn fn fn fn fn fn fn fn fn fn fn fn
previously unknown pattern pattern fn fn fn fn fn fn fn fn fn fn fn fn
tolerant of small changes pattern pattern pattern pattern fn fn fn fn fn fn fn fn fn fn fn fn
hierarchical pattern pattern pattern pattern pattern fn fn fn fn fn fn fn fn fn fn fn fn
Motifs of program execution Inspired by bio-informatics Smith-Waterman [1981] BLAST [1990]
Most Popular Programming Language Java JavaScript 0 17.5 35 52.5 70 popularity % Java JavaScript 0 85000 170000 255000 340000 active repositories JS
function validateEmail () { // do stuff Email: } Address: function checkAddress () { // do more stuff Occupation: } Select one Student window Submit checkAddress validateEmail foo bar baz
Email: validateEmail() Address: checkAddress() Occupation: Select one occupation() Student Submit submit()
Email: validateEmail() Address: checkAddress() Occupation: Select one occupation() Student Degree: Select one studentForm() Submit submit()
validateEmail() Email: Address: checkAddress() Occupation: occupation() Student studentForm() Degree: Submit submit()
Database bar() foo() change() bar() transition() foo() grouped() bar() stacked() baz() index.html:11() validateEmail() showPopup() checkAddress() foo() occupation() baz() submit() validateEmail() Email: Address: checkAddress() Occupation: occupation() Student studentForm() Degree: Submit submit()
Database Query bar() foo() baz() change() bar() foo() transition() foo() validateEmail() grouped() bar() checkAddress() stacked() baz() occupation() index.html:11() validateEmail() studentForm() showPopup() checkAddress() submit() foo() occupation() change() baz() submit() transition() validateEmail() Email: Address: checkAddress() Occupation: occupation() Student studentForm() Degree: BLAST [Altschul et al. 1990] Submit submit()
Database Query bar() foo() baz() change() bar() foo() transition() foo() validateEmail() grouped() bar() checkAddress() stacked() baz() occupation() index.html:11() validateEmail() studentForm() showPopup() checkAddress() submit() foo() occupation() change() baz() submit() transition() validateEmail() Email: Address: checkAddress() Occupation: occupation() Student studentForm() Degree: Submit submit()
Database Query bar() foo() baz() change() bar() foo() transition() foo() validateEmail() grouped() bar() checkAddress() stacked() baz() occupation() index.html:11() validateEmail() studentForm() showPopup() checkAddress() submit() foo() occupation() change() baz() submit() transition() validateEmail checkAddress studentForm occupation submit 0 0 0 0 0 0 0 2 0 0 0 0 validateEmail 0 0 4 2 0 0 checkAddress occupation 0 0 2 6 4 0 submit 0 0 0 4 4 6 Smith-Waterman [Smith & Waterman 1981]
Database Query bar() foo() baz() change() bar() foo() transition() foo() validateEmail() grouped() bar() checkAddress() stacked() baz() occupation() index.html:11() validateEmail() studentForm() showPopup() checkAddress() submit() foo() occupation() change() baz() submit() transition() validateEmail checkAddress studentForm occupation submit 0 0 0 0 0 0 0 2 0 0 0 0 validateEmail 0 0 4 2 0 0 checkAddress occupation 0 0 2 6 4 0 submit 0 0 0 4 4 6
Database Query bar() foo() baz() change() bar() foo() transition() foo() validateEmail() grouped() bar() checkAddress() stacked() baz() occupation() index.html:11() validateEmail() studentForm() showPopup() checkAddress() submit() foo() occupation() change() baz() submit() transition() validateEmail checkAddress studentForm occupation submit 0 0 0 0 0 0 0 2 0 0 0 0 validateEmail 0 0 4 2 0 0 checkAddress occupation 0 0 2 6 4 0 submit 0 0 0 4 4 6
Database Query bar() foo() baz() change() bar() foo() transition() foo() validateEmail() grouped() bar() checkAddress() stacked() baz() occupation() index.html:11() validateEmail() studentForm() showPopup() checkAddress() submit() foo() occupation() change() baz() submit() transition() validateEmail checkAddress studentForm occupation submit validateEmail Motif checkAddress validateEmail occupation checkAddress submit occupation ABSTRACT submit
Database Query bar() foo() baz() change() bar() foo() transition() foo() validateEmail() grouped() bar() checkAddress() stacked() baz() occupation() index.html:11() validateEmail() studentForm() showPopup() checkAddress() submit() foo() occupation() change() baz() submit() transition() validateEmail checkAddress studentForm occupation submit abstraction Motif hierarchy Motif Abstract validateEmail Motif checkAddress validateEmail occupation checkAddress validateEmail checkAddress occupation studentForm submit submit occupation ABSTRACT submit
Sabalan E B A D C DB Motifs https://github.com/saltlab/sabalan
Does using Sabalan improve performance of developers?
Controlled Experiment Tasks: common comprehension activities 14 participants Control: tool Measure: performance
Fast is fine, but accuracy is everything. Accuracy (%) T1.a T1.b pp 54 T2.a more T2.b accuracy T3 Total 0 25 50 75 100 Sabalan Other
Recommend
More recommend