A Flexible, (C)LP-Based Approach to the Analysis of Object-Oriented Programs

  • Authors:
  • Mario Méndez-Lojo;Jorge Navas;Manuel V. Hermenegildo

  • Affiliations:
  • University of New Mexico, USA;University of New Mexico, USA;University of New Mexico, USA and Technical University of Madrid, Spain

  • Venue:
  • Logic-Based Program Synthesis and Transformation
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Static analyses of object-oriented programs usually rely on intermediate representations that respect the original semantics while having a more uniform and basic syntax. Most of the work involving object-oriented languages and abstract interpretation usually omits the description of that language or just refers to the Control Flow Graph (CFG) it represents. However, this lack of formalization on one hand results in an absence of assurances regarding the correctness of the transformation and on the other it typically strongly couples the analysis to the source language. In this work we present a framework for analysis of object-oriented languages in which in a first phase we transform the input program into a representation based on Horn clauses. This facilitates on one hand proving the correctness of the transformation attending to a simple condition and on the other allows applying existing analyzers for (constraint) logic programming to automatically derive a safe approximation of the semantics of the original program. The approach is flexible in the sense that the first phase decouples the analyzer from most language-dependent features, and correct because the set of Horn clauses returned by the transformation phase safely approximates the standard semantics of the input program. The resulting analysis is also reasonably scalable due to the use of mature, modular (C)LP-based analyzers. This allows us to report good results for medium-sized programs.