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...

Full description

Bibliographic Details
Published in:Труды Института системного программирования РАН
Main Authors: E. M. Novikov, A. V. Khoroshilov
Format: Article
Language:English
Published: Russian Academy of Sciences, Ivannikov Institute for System Programming 2018-10-01
Subjects:
Online Access:https://ispranproceedings.elpub.ru/jour/article/view/990
_version_ 1848655079754694656
author E. M. Novikov
A. V. Khoroshilov
author_facet E. M. Novikov
A. V. Khoroshilov
author_sort E. M. Novikov
collection DOAJ
container_title Труды Института системного программирования РАН
description 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.
format Article
id doaj-art-a3fc622898e3438fa4e37dc9b7c4e43a
institution Directory of Open Access Journals
issn 2079-8156
2220-6426
language English
publishDate 2018-10-01
publisher Russian Academy of Sciences, Ivannikov Institute for System Programming
record_format Article
spelling doaj-art-a3fc622898e3438fa4e37dc9b7c4e43a2025-11-02T17:32:05ZengRussian Academy of Sciences, Ivannikov Institute for System ProgrammingТруды Института системного программирования РАН2079-81562220-64262018-10-0123010.15514/ISPRAS-2012-23-21990Using Aspect-Oriented Programming for Querying Source CodeE. M. Novikov0A. V. Khoroshilov1ИСП РАНИСП РАН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.https://ispranproceedings.elpub.ru/jour/article/view/990разработка программыподдержка программызапрос по исходному коду программыформальное представление программыаспектно-ориентированное программирование
spellingShingle E. M. Novikov
A. V. Khoroshilov
Using Aspect-Oriented Programming for Querying Source Code
разработка программы
поддержка программы
запрос по исходному коду программы
формальное представление программы
аспектно-ориентированное программирование
title Using Aspect-Oriented Programming for Querying Source Code
title_full Using Aspect-Oriented Programming for Querying Source Code
title_fullStr Using Aspect-Oriented Programming for Querying Source Code
title_full_unstemmed Using Aspect-Oriented Programming for Querying Source Code
title_short Using Aspect-Oriented Programming for Querying Source Code
title_sort using aspect oriented programming for querying source code
topic разработка программы
поддержка программы
запрос по исходному коду программы
формальное представление программы
аспектно-ориентированное программирование
url https://ispranproceedings.elpub.ru/jour/article/view/990
work_keys_str_mv AT emnovikov usingaspectorientedprogrammingforqueryingsourcecode
AT avkhoroshilov usingaspectorientedprogrammingforqueryingsourcecode