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

        Not Too Local type inference

        Thumbnail
        View/Open
        ThesisFinal.pdf (371.9Kb)
        Publication date
        2024
        Author
        Demitraszek, Maksymilian
        Metadata
        Show full item record
        Summary
        The type inference in statically typed, object-oriented languages is local because it needs to know the type of an object when a method is called or a property accessed on it, as multiple classes can implement the method/parameter with the same name. This is necessary to determine the type of the method/parameter. We introduce a language Inferable Featherweight Java (IFJ) which models statically typed, object-oriented programs with type information inferred partially. We define the type inference progression property for IFJ programs. If a program holds this property it has sufficient information inferred, so the type inference algorithm can determine all types of methods/parameters. We prove that type variables substituting phantom type parameters and type parameters used only on contravariant positions do not have to be inferred for a program to hold this property. Furthermore, we use this result to extend the reference type inference algorithm based on the programming language Kotlin, so it does not fail if unable to infer certain type variables based only on the local context. We consolidate those results as a feature proposal for the programming language Kotlin and integrate it partially into Kotlin's compiler. The new type inference algorithm allows certain type annotations to be left out in programs, most notably when working with algebraic data types.
        URI
        https://studenttheses.uu.nl/handle/20.500.12932/47762
        Collections
        • Theses

        Related items

        Showing items related by title, author, creator and subject.

        • Using Natural Language Inference to Perform Visual Inference: the Case of Quantified Noun Phrases 

          Lipping, J. (2021)
          Evaluation of quantities in visual data remains one of the biggest challenges in the area of Visual Inference. We explore a novel approach to reasoning about quantities in visual contexts using the tools of Natural Language ...
        • Chironomid-inferred Lateglacial climatic changes in western Ireland: a chironomid record from Lurga, County Galway 

          Lutz, A.F. (2009)
        • Testing the inference of topography of the upper mantle discontinuities using synthetic seismograms 

          Koroni, M. (2014)
        Utrecht university logo