Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Heuristics for Discovering Architectural Violations (WCRE 2013)

Heuristics for Discovering Architectural Violations (WCRE 2013)

Software architecture conformance is a key software quality control activity that aims to reveal the progressive gap normally observed between concrete and planned software architectures. In this paper, we present ArchLint, a lightweight approach for architecture conformance based on a combination of static and historical source code analysis. For this purpose, ArchLint relies on four heuristics for detecting both absences and divergences in source code based architectures. We applied ArchLint in an industrial-strength system and as a result we detected 119 architectural violations, with an overall precision of 46.7% and a recall of 96.2%, for divergences. We also evaluated ArchLint with four open-source systems, used in an independent study on reflexion models. In this second study, ArchLint achieved precision results ranging from 57.1% to 89.4%.

ASERG, DCC, UFMG

October 14, 2013
Tweet

More Decks by ASERG, DCC, UFMG

Other Decks in Research

Transcript

  1. Heuristics for Discovering Architectural Violations Cristiano Maffort, Marco Tulio Valente,

    Mariza Bigonha, Nicolas Anquetil, Andre Hora 1 WCRE, Koblenz, Germany, October 2013
  2. Architecture Conformance  Goal: expose architectural violations  Implementation decisions

    not following the planned architecture  Two techniques:  Domain-specific languages  Model-based techniques 5
  3. Our Goal 10  Lightweight approach for conformance:  Without

    constraints  Without model refinements  Minimal input information:  Just a high-level component model (HLM)
  4. ArchLint  Our inspiration:  Our approach: 12 Bug Finding

    Tools (Lint, FindBugs, PMD, FxCop, etc) Warnings
  5. ArchLint  Heuristics to detect absences and divergences  Absences:

    dependencies prescribed by the HLM  But that are not present in the concrete model  Divergences: dependencies not prescribed by the HLM  But that are present in the concrete model  Heuristics:  False positives are expected 13
  6. Heuristics for Detecting Absences 16 Evidence #1: 4 classes dependend

    on TargetClass Evidence #2: 3 classes initially created without this dependency, but inserted it later
  7. Heuristics for Detecting Absences 17 Evidence #1: 4 classes dependend

    on TargetClass Evidence #2: 3 classes initially created without this dependency, but inserted it later Evidence #1 && Evidence #2  architectural warning C2 missing a dependency with TargetClass
  8. Heuristics #1 for Divergences 19 Evidence #1: cp2 is a

    heavy-user of TargetModule Evidence #2: c2 is the only class in cp1 that depends on TargetModule
  9. Heuristics #1 for Divergences 20 Evidence #1: cp2 is a

    heavy-user of TargetModule Evidence #2: c2 is the only class in cp1 that depends on TargetModule Evidence #3: dependency to TargetModule were removed from Cp1
  10. Heuristics #1 for Divergences 21 Evidence #1: cp2 is a

    heavy-user of TargetModule Evidence #2: c2 is the only class in cp1 that depends on TargetModule Evidence #3: dependency to TargetModule were removed from Cp1 Evidence #1 && Evidence #2 && Evidence #3  architectural warning C2 should not depend on TargetModule
  11. Evaluation 23  SGA System:  EJB-based information system 

    4,923 revisions  March, 2009 to September, 2011  1,852 classes and interfaces  127 KLOC
  12. Thresholds  Absences:  Asca = 0.9 -- 90% of

    the classes have dependency  Ains = 0.35 -- 35% inserted the dependency  Divergences  Dsca = 0.05  Ddel = 0.65  Ddir = 0.05 24
  13. Precision and Recall 25  Classification made by the system’s

    architect  For absences, architect classified each warning  For divergences, architect classified existing dependencies
  14. Precision and Recall 26  Classification made by the system’s

    architect  For absences, architect classified each warning  For divergences, architect classified existing dependencies
  15. Precision and Recall 27  Classification made by the system’s

    architect  For absences, architect classified each warning  For divergences, architect classified existing dependencies
  16. RM Dataset  RMs independently proposed by Bittencourt et al.

     Ant  ArgoUML  Lucene  SweetHome3D  False positives/negatives regarding such models  Same thresholds from the 1st evaluation 29
  17. Conclusion  ArchLint:  Lighweighted approach for architetcure conformance 

    Minimal input  Static and historical analysis  Architetcural warnings  Future work: heuristics based on data mining techniques (association rules) 32
  18. Thanks! Heuristics for Discovering Architectural Violations Cristiano Maffort, Marco Tulio

    Valente, Mariza Bigonha, Nicolas Anquetil, Andre Hora 33 WCRE, Koblenz, Germany, October 2013