Program Understanding as Constraint Satisfaction: Representation and Reasoning Techniques

  • Authors:
  • Steven Woods;Qiang Yang

  • Affiliations:
  • Department of Electrical Engineering, University of Hawaii at Manoa, Honolulu, Hawaii 96822, USA. E-mail: sgwoods@spectra.eng.hawaii.edu;School of Computing Science Intelligent Software Group (ISG), Simon Fraser University, Burnaby, BC V5A 1S6, Canada. E-mail: qyang@cs.sfu.ca

  • Venue:
  • Automated Software Engineering
  • Year:
  • 1998

Quantified Score

Hi-index 0.00

Visualization

Abstract

The process of understanding a source code in ahigh-level programming language involves complex computation. Given a piece of legacy code and a library of programplan templates, understanding the code corresponds to buildingmappings from parts of the source code to particular program plans.These mappings could be used to assist an expert in reverse engineering legacy code, to facilitate software reuse, orto assist in the translation of the source into anotherprogramming language. In this paper we present a model of programunderstanding using constraint satisfaction. Within this model weintelligently compose a partial global picture of the sourceprogram code by transforming knowledge about the problem domainand the program itself into sets of constraints. We then systematically study different search algorithms and empiricallyevaluate their performance. One advantage of the constraintsatisfaction model is its generality; many previous attempts inprogram understanding could now be cast under the same spectrum ofheuristics, and thus be readily compared. Another advantage is the improvement in search efficiency using various heuristictechniques in constraint satisfaction.