decaf the tail of two tools · data dependency (e d) structure dependency (e s) method-call (e...

28
The Tale of Two Source-code Analysis Tools Learning and experiences Tushar Sharma Athens University of Economics and Business Funded by SENECA project under Marie-Skłodowska Curie Actions

Upload: others

Post on 09-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

TheTaleofTwoSource-codeAnalysisToolsLearningandexperiences

TusharSharma

AthensUniversityofEconomicsandBusiness

FundedbySENECAprojectunderMarie-Skłodowska CurieActions

Page 2: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Tools

Augur DesigniteAchangeimpactanalysistool Asoftwaredesignqualityassessmenttool

(http://www.designite-tools.com)

Page 3: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Tools

Augur DesigniteAchangeimpactanalysistool Asoftwaredesignqualityassessmenttool

Page 4: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Features

• Changeimpactanalysiswithmultiplegranularitysupporto Cuttingacrossprojects,namespaces,classes,methods,fields,andstatements

• Intra-granularquerieso Supportingaquerywhereachangeandtheassociatedimpactcouldbeondifferentgranularities

Software System

VSS

Namespaces (VN) Classes (VC)

Methods (VM)

Local Variables (VL)

Fields (VF)

Statements (VS)

Children (Ec)

Data dependency

(Ed)

Structure dependency

(Es)

Method-call (Ecall)

Super class (Esup)

Page 5: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Features

• ChangeImpactQueryLanguage(CIQL)o Forlargescalebatchquerying– openinganewsetofapplicationsofCIA

CIQL::get“<Granularity(Impact)>”[within “<Scope>”][with“<Depth>”]where“<Entity>”is“<Granularity>”.

Page 6: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Features

• Supportforextendeddependencieso Datao Controlo Semantico Environment

Page 7: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Architecture

Page 8: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Tools

Augur DesigniteAchangeimpactanalysistool Asoftwaredesignqualityassessmenttool

Page 9: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Features

• Supportsdetectionof19designsmellsand11implementationsmells

Page 10: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Features

• Supportscomputationofvariousmetricswithcustomthresholds

Page 11: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Features

• ProvidesDependencyStructureMatrix

Page 12: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Features

• PerformsTrendAnalysis

Page 13: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Learningandexperiences

Page 14: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

TheBigGapbetweenAcademicsandIndustry

Proposinganewresearchprograminacorporateresearchorganizationisnoteasy!

Page 15: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

TheBigGapbetweenAcademicsandIndustry

Learning(asaresearcher)- Makesuretheavailabilityofartifactsandtheirbroaderapplicability

Page 16: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Parsingmechanism

Variousoptionsforcollectingsourcecodeinformation• Stringmanipulation• Reflection• AST• Bytecodeanalysis

Page 17: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

WhichASTlibrary?

CSParserMetaspec

#Recognize!NRefactory

MSRoslyn

Page 18: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

• License• Features• Cost• Communitysupport• Futureproof-ness

Parsingmechanism

Selectioncriteria

Page 19: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Architecture

Plug-inorIndependentapplication

Page 20: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Consoleapplication

Options• Useconditionalcompilation

(usingConditionalAttribute)• Duplicatethecode-base• Performarchitecturerefactoring

Page 21: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Consoleapplication

Experience:- Architecturerefactoringisexpensivebuteffective!- SupportforarchitecturerefactoringwithinIDEsisnotsufficient

Page 22: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Extensibility

Smelldetectionlogicmustbeextensiblei.e.newrulescanbeaddedwithoutanychangeinsourcecodeanalysislogicanduserinterface

Learning:- Theroleofappropriatedesignisimportant

Page 23: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Informationdissemination

Producingusefulinformationisdesirable;presentingitwelltotheuseristheextramile.

Page 24: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Informationdissemination

Differenttypesofusers,differentrequirements.

Page 25: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Payingattentiontouserrequirements

Page 26: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Payingattentiontouserrequirements

Page 27: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

References

[1]TusharSharma,PratibhaMishra,andRohit Tiwari.2016.Designite:asoftwaredesignqualityassessmenttool.In Proceedingsofthe1stInternationalWorkshoponBringingArchitecturalDesignThinkingintoDevelopers'DailyActivities (BRIDGE'16).ACM,NewYork,NY,USA,1-4.DOI:http://dx.doi.org/10.1145/2896935.2896938

2]TusharSharma,GirishSuryanarayana.Augur:IncorporatingHiddenDependenciesandVariableGranularityinChangeImpactAnalysis.SubmittedatSCAM2016,waitingforthedecision.

Page 28: DECAF The tail of two tools · Data dependency (E d) Structure dependency (E s) Method-call (E call) Super class (E sup) Features • Change Impact Query Language (CIQL) o For large

Thank you!!

Courtesy:spikedmath.com

Tushar Sharma

[email protected]

@Sharma__Tushar