Using Aspect-Oriented Programming for Querying Source Code

Querying source code helps developers to discover code fragments of interest and to determine their interrelations with each other. Different approaches exist to execute source code queries automatically. Some of them are based on a rather simple text pattern matching. More advanced approaches provi...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:Trudy Instituta sistemnogo programmirovaniâ 2018-10, Vol.23, p.371-386
Hauptverfasser: Novikov, E.M., Khoroshilov, A.V.
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:Querying source code helps developers to discover code fragments of interest and to determine their interrelations with each other. Different approaches exist to execute source code queries automatically. Some of them are based on a rather simple text pattern matching. More advanced approaches provide abilities to use natural languages for queries and perform matching on the basis of a formal program representation. We suggest using aspect-oriented programming for querying source code and consider advantages and disadvantages of this approach. The paper introduces main conceptions of aspect-oriented programming and briefly presents C Instrumentation Framework – an aspect-oriented programming implementation for the C programming language. We slightly extended C Instrumentation Framework so that it could execute source code queries written in form of aspects. The paper gives several examples of utilization of the suggested approach in particular for collecting information required for generating environment models for device drivers in the Linux Driver Verification project. The suggested approach is inferior to special querying tools in making queries by control and data flows. But it is simple in implementation and allows one to use traditional means of aspect-oriented programming for developing and executing source code queries.
ISSN:2079-8156
2220-6426
DOI:10.15514/ISPRAS-2012-23-21