Ontology-based documentation extraction for semi-automatic migration of Java code

  • Authors:
  • Davide Ancona;Viviana Mascardi;Ombretta Pavarino

  • Affiliations:
  • DISI - Università di Genova, Genova, Italy;DISI - Università di Genova, Genova, Italy;DISI - Università di Genova, Genova, Italy

  • Venue:
  • Proceedings of the 27th Annual ACM Symposium on Applied Computing
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

Migrating libraries is not a trivial task, even under the simplest assumption of a downward compatible upgrade. We propose a novel approach to partially relieve programmers from this task, based on the simple observation that class, method and field names and comments contained in a Java library should be a good approximation of its semantics, and that code migration requires knowing the semantic similarities between the two libraries. Following this assumption, we borrow the main concepts and notions from the Semantic Web, and show how (1) an ontology can be automatically generated from the relevant information extracted from the code of the library; (2) semantic similarities between two different libraries can be found by running a particular ontology matching (a.k.a. ontology alignment) algorithm on the two ontologies extracted from the libraries. The main advantages of the approach are that ontology extraction can be fully automated, without adding ad-hoc code annotations, and that results and tools produced by the Semantic Web research community can be directly re-used for our purposes. Experiments carried out even with simple and efficient freely available matchers show that our approach is promising, even though it would benefit from the use of more advanced ontology matchers possibly integrated with a component for checking type compatibility of the computed alignments.