View Item 
        •   Utrecht University Student Theses Repository Home
        • UU Theses Repository
        • Theses
        • View Item
        •   Utrecht University Student Theses Repository Home
        • UU Theses Repository
        • Theses
        • View Item
        JavaScript is disabled for your browser. Some features of this site may not work without it.

        Browse

        All of UU Student Theses RepositoryBy Issue DateAuthorsTitlesSubjectsThis CollectionBy Issue DateAuthorsTitlesSubjects

        Use it or Lose it: A Kotlin Static Analysis for Identifying Unused Values

        Thumbnail
        View/Open
        thesis_v1.0-fix_faiz_5231981.pdf (419.7Kb)
        Publication date
        2025
        Author
        Faiz Ilham Muhammad, Faiz
        Metadata
        Show full item record
        Summary
        Unused values found in source code may be a source of potential bugs. This is especially true for some types of values that must be eventually used by a certain set of functions. For example, an asynchronous call must be eventually awaited or canceled, otherwise it is likely a mistake. This pattern of usage is called utilization, and the types that must be utilized are the utilizable types. We present a formalization of a data-flow analysis for statically analyzing value utilization in Kotlin programs and implement a prototype of the analysis as a Kotlin compiler plugin. We extend the function signature type in Kotlin to include annotations for utilization status requirements and status-changing effects. The annotations may also be parametric in the case of higher-order functions and special types such as collections. The analysis method checks and infers the functions' utilization annotations, in addition to warning of any incomplete utilization in the functions.
        URI
        https://studenttheses.uu.nl/handle/20.500.12932/48506
        Collections
        • Theses
        Utrecht university logo