Diagnosing and Correcting Design Inconsistencies in Source Code with Logical Abduction

Authors
Sergio Castro, Coen De Roover, Andy Kellens, Angela Lozano, Kim Mens, Theo DíHondt
Tags
, , , , , , , ,
Title
Diagnosing and Correcting Design Inconsistencies in Source Code with Logical Abduction
Authors
Sergio Castro, Coen De Roover, Andy Kellens, Angela Lozano, Kim Mens, Theo DíHondt
 2010-scico-castro.pdf Δ   457Kb   10 Oct 2011
Type
Article
Journal
Science of Computer Programming
Volume
76
Number
12
Pages
1113-1129
Publisher
Elsevier North-Holland, Inc.
Year
2011
Note
Special Issue on Software Evolution, Adaptability and Variability

Abstract

Correcting design decay in source code is not a trivial task. Diagnosing and subsequently correcting inconsistencies between a software systemsís code and its design rules (e.g., database queries are only allowed in the persistence layer) and coding conventions can be complex, time-consuming and error-prone. Providing support for this process is therefore highly desirable, but of a far greater complexity than suggesting basic corrective actions for simplistic implementation problems (like the "declare a local variable for non-declared variable" suggested by Eclipse).

We present an abductive reasoning approach to inconsistency correction that consists of (1) a means for developers to document and verify a systemís design and coding rules, (2) an abductive logic reasoner that hypothesizes possible causes of inconsistencies between the systemís code and the documented rules and (3) a library of corrective actions for each hypothesized cause. This work builds on our previous work, where we expressed design rules as equality relationships between sets of source code artifacts (e.g., the set of methods in the persistence layer is the same as the set of methods that query the database). In this paper, we generalize our approach to design rules expressed as user-defined binary relationships between two sets of source code artifacts (e.g., every state changing method should invoke a persistence method).

We illustrate our approach on the design of IntensiVE, a tool suite that enables defining sets of source code artifacts intensionally (by means of logic queries) and verifying relationships between such sets.

Tags Tags: , , , , , , , ,


BibTeX Record
  @article{RELEASeD-2011-234666,
    title = {Diagnosing and Correcting Design Inconsistencies in Source Code with Logical Abduction},
    author = {Sergio Castro and Coen {De Roover} and Andy Kellens and Angela Lozano and Kim Mens and Theo {DíHondt}},
    year = {2011},
    journal = {Science of Computer Programming},
    volume = {76},
    number = {12},
    pages =  {1113-1129},
    publisher = {Elsevier North-Holland, Inc.},
    note = {Special Issue on Software Evolution, Adaptability and Variability},
  }