Abstract

This research focuses on the use of ontologies as formal knowledge bases for representing source code in automated systems.By creating an ontology that represents the concepts, relationships, and properties of source code elements, it becomes possible to capture and organize knowledge about the codebase. This enables various functional abilities such as automated code analysis and reasoning about code structure and behavior. The aim of this research is to verify the ability to use ontology as a formal knowledge base about source code in automated systems. A review of the recent articles showed that existing tools to work with ontologies does not provide direct functionality to convert the code into a knowledge, so the idea proposed in the article has novelty. The research explores the use of the Web Ontology Language (OWL) as the primary ontology representation language due to its expressiveness, reasoning capabilities, and compatibility with semantic web standards. The research proposes the creation of ontology representations for various code entities, with classes representing main entity types and individuals representing specific instances within the codebase. To validate the concept and demonstrate the expected results, a proof-of-concept system is built, consisting of a parsing client, a RESTful API for communication, and an ontology manager. The system utilizes libraries such as SwiftSyntax for parsing Swift code, Alamofire for HTTP communication, and OWL manipulation libraries (such as OWL-API and ONT-API) for working with ontologies. The system aims to extract knowledge from the source code, convert it into ontology entities and axioms, and reason over the ontology using a reasoner (such as HermiT). The research concludes that ontologies can effectively store knowledge about source code and enable various further manipulations on that knowledge. However, further investigation is needed to determine the optimal set of properties and entities that should be supported by the code ontology extraction system to infer more knowledge about the source code.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call