• DocumentCode
    3237023
  • Title

    An Abstraction-Oriented, Path-Based Approach for Analyzing Object Equality in Java

  • Author

    Rupakheti, Chandan R. ; Hou, Daqing

  • Author_Institution
    Dept. of Electr. & Comput. Eng., Clarkson Univ., Potsdam, NY, USA
  • fYear
    2010
  • fDate
    13-16 Oct. 2010
  • Firstpage
    205
  • Lastpage
    214
  • Abstract
    The standard collection data structures in Object-Oriented languages require their element classes provide a predicate to compare two objects for equality. Among other correctness requirements, this predicate must be an equivalence relation. The chance of mistakes increases when equality is implemented in a type hierarchy. Detection of such problems requires reasoning about the equality at a higher level semantics than the code, involving the state, the behavior, and the sub-typing relations in the type hierarchy. We present a path-based, abstraction-oriented approach to checking the correctness of equality implementation in a type hierarchy. In our approach, code patterns on paths are identified and translated into abstractions in Alloy. The Alloy model is then automatically checked to reveal any problems related to the equivalence relation. Our evaluation shows that this approach (1) found problems in the production code, and (2) scaled to a project as large as JDK 1.5. We believe that it has a potential to be used on a developer´s desktop on a daily basis.
  • Keywords
    Java; data structures; object-oriented programming; program diagnostics; JDK 1.5; Java; abstraction-oriented approach; code patterns; equality implementation; equivalence relation; object equality; object-oriented languages; path-based approach; production code; standard collection data structures; Algorithm design and analysis; Analytical models; Context; Filtering algorithms; Java; Metals; Receivers; abstraction recognition; equality; model checking; path-based program analysis;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Reverse Engineering (WCRE), 2010 17th Working Conference on
  • Conference_Location
    Beverly, MA
  • ISSN
    1095-1350
  • Print_ISBN
    978-1-4244-8911-4
  • Type

    conf

  • DOI
    10.1109/WCRE.2010.30
  • Filename
    5645560