Zobrazit minimální záznam

Exception flow analysis for Kotlin



dc.contributor.advisorHunka Jiří
dc.contributor.authorFilip Dolník
dc.date.accessioned2022-06-02T22:53:07Z
dc.date.available2022-06-02T22:53:07Z
dc.date.issued2022-06-02
dc.identifierKOS-1065781912005
dc.identifier.urihttp://hdl.handle.net/10467/101043
dc.description.abstractOšetřování výjimek je nezbytnou součástí vývoje softwaru, je však zároveň také jednou z nejnáročnějších. Chyby ve zpracování výjimek mohou způsobit mnoho problémů - od špatného uživatelského rozhraní až po bezpečnostní zranitelnosti. Tyto chyby se často vyskytují na rozhraní dvou systémů. Důvodem je mimo jiné to, že API těchto systémů obvykle není správně zdokumentováno, zejména pokud jde o výjimky. Ruční dokumentování výjimek v API je časově náročné, a navíc náchylné na chyby. Tato práce navrhuje řešení v podobě automatické tvorby této dokumentace. Tím řešením je statická analýza propagace výjimek, která vytvoří seznam potenciálně vyhozených výjimek z API. Výsledkem této práce je návrh této statické analýzy, konkrétně pro programovací jazyk Kotlin. Vytvořený návrh lze použít k implementaci nástroje pro automatické dokumentování API. Navržená analýza je založena na abstraktní interpretaci a klade důraz na vysokou přesnost. Analýza si poradí jak s objektově orientovanými, tak s funkcionálními aspekty Kotlinu. Návrh je modulární a používá dvě různé IR. Díky tomu lze snadno přidat podporu dalších programovacích jazyků. Součástí této práce je také implementace prototypu navržené analýzy. Vyvinutý prototyp interně používá kompilátor Kotlinu pro převod analyzovaného zdrojového kódu do IR Kotlinu. Tato IR je poté převedena na jednu ze dvou IR statické analýzy. Tento proces převodu je v práci podrobně zdokumentován spolu s významnou částí IR Kotlinu. Vzniklá dokumentace také vysvětluje sémantiku funkcí Kotlinu, zejména těch, které souvisí s propagací výjimek. Tato dokumentace může být užitečná při implementaci zásuvných modulů pro kompilátor Kotlinu nebo jiných statických analýz. Vytvořený prototyp lze použít na experimentování s většinou vzniklého návrhu analýzy. Jeho implementace však není úplná, takže jej nelze použít k analýze reálných projektů. Součástí prototypu je mnoho akceptačních testů zaměřených na propagaci výjimek. Prototyp i tyto testy lze použít při implementaci nástroje na dokumentování API.cze
dc.description.abstractException handling is one of the most challenging parts of the software development, yet it is essential. An improper exception handling can cause many problems - from bad UX to security vulnerabilities. Mistakes in exception handling frequently occur at the boundaries of two systems. Part of the reason is that the API of those systems is usually not correctly documented, especially when it comes to exceptions. Manually documenting API exceptions is a time-consuming and error-prone process. This thesis proposes a solution for creating the documentation automatically. The solution is a static analysis of exception propagation. This static analysis produces a list of potentially thrown exceptions by API endpoints. The result of this thesis is a design of such static analysis for the Kotlin programming language. The created design can be used to implement a tool for documenting APIs. The designed analysis is based on abstract interpretation, focusing on high precision. The analysis can handle both object-oriented and functional programming aspects of Kotlin. The design is modular and uses two different intermediate representations. As a result, the design can be easily extended to support other programming languages. This thesis also includes a prototype of the proposed analysis. The prototype internally uses the Kotlin compiler to parse the analyzed source code into the Kotlin IR. The produced Kotlin IR is then converted to one of the intermediate representations. The thesis describes this process in detail and, at the same time, it documents a significant part of the Kotlin IR. The documentation also explains the semantics of Kotlin features that the analysis handles. This documentation can be helpful when implementing compiler plugins or other static analyses. The created prototype can be used to experiment with most of the analysis design. However, it does not implement the entire design, so it cannot be used to analyze real-world projects. The prototype contains many acceptance tests focused on the exception propagation. Together the prototype and the tests can be used as a starting point for implementing the tool for documenting APIs.eng
dc.publisherČeské vysoké učení technické v Praze. Vypočetní a informační centrum.cze
dc.publisherCzech Technical University in Prague. Computing and Information Centre.eng
dc.rightsA university thesis is a work protected by the Copyright Act. Extracts, copies and transcripts of the thesis are allowed for personal use only and at one?s own expense. The use of thesis should be in compliance with the Copyright Act http://www.mkcr.cz/assets/autorske-pravo/01-3982006.pdf and the citation ethics http://knihovny.cvut.cz/vychova/vskp.htmleng
dc.rightsVysokoškolská závěrečná práce je dílo chráněné autorským zákonem. Je možné pořizovat z něj na své náklady a pro svoji osobní potřebu výpisy, opisy a rozmnoženiny. Jeho využití musí být v souladu s autorským zákonem http://www.mkcr.cz/assets/autorske-pravo/01-3982006.pdf a citační etikou http://knihovny.cvut.cz/vychova/vskp.htmlcze
dc.subjectstatická analýzacze
dc.subjecttok výjimekcze
dc.subjectpropagace výjimekcze
dc.subjectdoménové výjimkycze
dc.subjectdokumentace APIcze
dc.subjectKotlincze
dc.subjectkompilátor Kotlinucze
dc.subjectKotlin IRcze
dc.subjectstatic analysiseng
dc.subjectexception floweng
dc.subjectexception propagationeng
dc.subjectdomain exceptionseng
dc.subjectAPI documentationeng
dc.subjectKotlineng
dc.subjectKotlin compilereng
dc.subjectKotlin IReng
dc.titleAnalýza toku výjimek v Kotlinucze
dc.titleException flow analysis for Kotlineng
dc.typediplomová prácecze
dc.typemaster thesiseng
dc.contributor.refereeKřikava Filip
theses.degree.disciplineSystémové programovánícze
theses.degree.grantorkatedra teoretické informatikycze
theses.degree.programmeInformatikacze


Soubory tohoto záznamu




Tento záznam se objevuje v následujících kolekcích

Zobrazit minimální záznam