Extending Dynamic Constraint Detection with Polymorphic Analysis

  • Authors:
  • Nadya Kuzmina;Ruben Gamboa

  • Affiliations:
  • University of Wyoming;University of Wyoming

  • Venue:
  • WODA '07 Proceedings of the 5th International Workshop on Dynamic Analysis
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

The general technique for dynamically detecting likely invariants, as implemented by Daikon, lacks specific objectoriented support for polymorphism. Daikon examines only the declared type of a variable which prohibits it from examination of the runtime variables in the presence of polymorphism. The approach presented in this paper extends the technique to consider the runtime type of a polymorphic variable, which may have different declared and runtime types. The runtime behavior of a polymorphic variable is captured by polymorphic constraints which have the form of an implication with the name of the runtime class in the antecedent. We demonstrate the improved accuracy of the dynamically detected specification on the Money example from the JUnit testing framework tutorial. Polymorphic constraints are shown to reveal the specification of the runtime behavior of the example.