DeFacto: Language-Parametric Fact Extraction from Source Code

  • Authors:
  • H. J. Basten;P. Klint

  • Affiliations:
  • Centrum Wiskunde & Informatica, Amsterdam, The Netherlands NL-1090 GB;Centrum Wiskunde & Informatica, Amsterdam, The Netherlands NL-1090 GB

  • Venue:
  • Software Language Engineering
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Extracting facts from software source code forms the foundation for any software analysis. Experience shows, however, that extracting facts from programs written in a wide range of programming and application languages is labour-intensive and error-prone. We present DeFacto , a new technique for fact extraction. It amounts to annotating the context-free grammar of a language of interest with fact annotations that describe how to extract elementary facts for language elements such as, for instance, a declaration or use of a variable, a procedure or method call, or control flow statements. Once the elementary facts have been extracted, we use relational techniques to further enrich them and to perform the actual software analysis. We motivate and describe our approach, sketch a prototype implementation and assess it using various examples. A comparison with other fact extraction methods indicates that our fact extraction descriptions are considerably smaller than those of competing methods.