A case study of a slicing-based approach for locating type errors

  • Authors:
  • T. B. Dinesh;Frank Tip

  • Affiliations:
  • CWI, Amsterdam, Amsterdam, The Netherlands;IBM T.J. Watson Research Center, Yorktown Heights, NY

  • Venue:
  • Algebraic'97 Proceedings of the 2nd international conference on Theory and Practice of Algebraic Specifications
  • Year:
  • 1997

Quantified Score

Hi-index 0.00

Visualization

Abstract

Type checkers have been specified in ASF+SDF for many languages, using a variety of specification styles. Several mechanisms for tracking positional information have been proposed, each with shortcomings and/or restrictions on specifications. We propose the use of dynamic dependence tracking for tracking positional information. In this approach, a slice of the program being type checked is associated with each type error. This slice contains precisely those program fragments that caused the type error under consideration. Our approach is completely languageindependent, imposes no restrictions on ASF+SDF specifications, and has been applied successfully to a significant subset of Pascal. We report on several experiments that have shown an interesting correlation between the amount of nondeterminism in the specification, and the accuracy of the slices associated with type errors. Generally, more accurate error locations are obtained as the specification gets less deterministic.