DESCRIBING THE KNOWLEDGE ABOUT THE SOURCE CODE USING AN ONTOLOGY

Andrii Tkachuk, Bogdan Bulakh
{"title":"DESCRIBING THE KNOWLEDGE ABOUT THE SOURCE CODE USING AN ONTOLOGY","authors":"Andrii Tkachuk, Bogdan Bulakh","doi":"10.36994/2788-5518-2023-01-05-14","DOIUrl":null,"url":null,"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.","PeriodicalId":165726,"journal":{"name":"Інфокомунікаційні та комп’ютерні технології","volume":"21 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Інфокомунікаційні та комп’ютерні технології","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.36994/2788-5518-2023-01-05-14","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

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.
使用本体描述关于源代码的知识
本研究的重点是使用本体作为表示自动化系统中源代码的正式知识库。通过创建表示源代码元素的概念、关系和属性的本体,就可以捕获和组织关于代码库的知识。这支持各种功能,例如自动代码分析和代码结构和行为推理。本研究的目的是验证在自动化系统中使用本体作为源代码的正式知识库的能力。对最近文章的回顾表明,用于处理本体的现有工具没有提供将代码转换为知识的直接功能,因此文章中提出的想法具有新颖性。由于Web本体语言(OWL)的表达能力、推理能力和与语义Web标准的兼容性,本研究探索了将OWL作为主要的本体表示语言的使用。该研究建议为各种代码实体创建本体表示,类代表主要实体类型,个体代表代码库中的特定实例。为了验证概念并演示预期的结果,需要构建一个概念验证系统,该系统由解析客户端、用于通信的RESTful API和本体管理器组成。该系统利用SwiftSyntax等库来解析Swift代码,Alamofire用于HTTP通信,OWL操作库(如OWL- api和ONT-API)用于处理本体。该系统旨在从源代码中提取知识,将其转换为本体实体和公理,并使用推理器(如HermiT)对本体进行推理。研究得出结论,本体可以有效地存储有关源代码的知识,并允许对该知识进行各种进一步的操作。然而,需要进一步的研究来确定代码本体提取系统应该支持的最优属性和实体集,以推断更多关于源代码的知识。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信