YAAB (Yet Another AST Browser): Using OCL to Navigate ASTs

  • Authors:
  • G. Antoniol;M. Di Penta;E. Merlo

  • Affiliations:
  • -;-;-

  • Venue:
  • IWPC '03 Proceedings of the 11th IEEE International Workshop on Program Comprehension
  • Year:
  • 2003

Quantified Score

Hi-index 0.00

Visualization

Abstract

In the last decades several tools and environments defined and introduced languages for querying, navigating and transforming abstract syntax trees. These environments were meant to support software maintenance, reengineering and program comprehension activities.Instead of introducing a new language, this paper proposes to adopt the Object Constraint Language (OCL) to express queries over an object model representing the abstract syntax tree of the code to be analyzed. OCL is part of the UML lingua franca and thus several advantages can be readily obtained. Central to the idea is to shift the analysis paradigm from a tree-based to an object-oriented paradigm, and to provide a meta-model decoupling the query language from the target language.This paper presents the current status in implementing an OCL interpreter with the ability of querying an object model representing the abstract syntax tree, as well as some interesting applications, such as extracting software metrics or computing clones.