A. Kuleshov, Petr Trifanov, Vladislav Frolov, Guangtai Liang
{"title":"Diktat: Lightweight Static Analysis for Kotlin","authors":"A. Kuleshov, Petr Trifanov, Vladislav Frolov, Guangtai Liang","doi":"10.1109/ISSREW53611.2021.00103","DOIUrl":null,"url":null,"abstract":"Kotlin is a relatively new programming language that is becoming more and more popular year after year. As the global codebase written in Kotlin grows, developers require intelligent solutions for static analysis to prevent code issues. These tools are built on top of different Intermediate Representations (IR), provided by the Kotlin compiler: Program Structure Interface (PSI), new Intermediate Representation (new IR), and Abstract Syntax Tree (AST). However, existing code analysis tools have limitations, including complexity, low configurability, poor performance, and the small number of inspections. To address these limitations, we propose an approach of the lightweight static analysis for Kotlin, which was implemented in the Diktat project. We will also cover industrial problems of static analysis for Kotlin and will review the usage of different IRs for that purpose. Most popular open-source analyzers will be reviewed and compared by quality metrics.","PeriodicalId":385392,"journal":{"name":"2021 IEEE International Symposium on Software Reliability Engineering Workshops (ISSREW)","volume":"9 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2021-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2021 IEEE International Symposium on Software Reliability Engineering Workshops (ISSREW)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ISSREW53611.2021.00103","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1
Abstract
Kotlin is a relatively new programming language that is becoming more and more popular year after year. As the global codebase written in Kotlin grows, developers require intelligent solutions for static analysis to prevent code issues. These tools are built on top of different Intermediate Representations (IR), provided by the Kotlin compiler: Program Structure Interface (PSI), new Intermediate Representation (new IR), and Abstract Syntax Tree (AST). However, existing code analysis tools have limitations, including complexity, low configurability, poor performance, and the small number of inspections. To address these limitations, we propose an approach of the lightweight static analysis for Kotlin, which was implemented in the Diktat project. We will also cover industrial problems of static analysis for Kotlin and will review the usage of different IRs for that purpose. Most popular open-source analyzers will be reviewed and compared by quality metrics.