The XPSL Query component: a framework for pattern searches in code [thesis]

Satyadev Nandakumar
This thesis describes the tool support for the query component of the eXtensible Pattern Specification Language (XPSL). The XPSL framework is a part of the Knowledge-Centric Software (KCS) platform of tools for software analysis and transformation. XPSL provides a language for the specification of patterns. Currently, there is no tool support to perform software analysis and transformation patterns specified through XPSL. The objective of this research is to provide tool support for analysis.
more » ... ort for analysis. An analysis task is viewed by the tool as a query that can be executed to produce the appropriate results. The goal is to produce a tool which is extensible and easily maintainable. This thesis outlines the framework design of the query component of XPSL, wherein it is presented as a library of basic queries on patterns in code, together with a composition mechanism for writing queries of greater sophistication. The tool is implemented as a translator which takes an XPSL specification as input, and converts it into an equivalent query in a target language of choice. We consider XQuery and XSLT as possible target languages. We discuss the comparative merits and demerits of XSLT and XQuery as the target languages, and explain why our choice of XQuery as the target language is desirable. The pattern search is then done by an XQuery engine. The translation mechanism precisely defines of the semantics of execution of the query, and chooses the various data formats and the technologies for its stages. These are discussed in the thesis. We also do an empirical study of the efficacy and efficiency of the approach taken. Some queries which were executed demonstrate the fact that queries composed in XPSL and executed using the tool can go beyond what is possible in the current Aspect-Oriented Languages. We discuss the applicability of the tool to various software engineering paradigms. We also explore future extensions to the querying mechanism, and discuss the issues that may arise in adding viii a transformation component to the current framework.
doi:10.31274/rtd-20200716-84 fatcat:r7lclwpchbgvvctwticbjoij34