Details

Implementacija dvosmerne tipizacije
ID Šveigl, Luka (Author), ID Slivnik, Boštjan (Mentor) More about this mentor... This link opens in a new window, ID Pretnar, Matija (Comentor)

.pdfPDF - Presentation file, Download (428,46 KB)
MD5: 75C450BEB0EACF0B5E674FB25FCC63F4

Abstract
Magistrsko delo obravnava implementacijo dvosmernega tipiziranja v programskem jeziku Millet. Obstoječa implementacija temelji na Hindley–Milnerjevem sistemu tipov, ki tipe izpeljuje z generiranjem enačb med tipi in njihovim poenotenjem. Dvosmerno tipiziranje ta pristop nadomesti z ločenima postopkoma sinteze tipa iz izraza in preverjanja izraza glede na pričakovani tip. Delo predstavi prilagoditev tipnega sistema in implementacijo ključnih postopkov za sintezo in preverjanje tipov. Posebna pozornost je namenjena obravnavi izrazov, funkcijskih abstrakcij in aplikacij. Delo obravnava tudi vpliv spremembe na potrebo po eksplicitnih anotacijah tipov in na sporočila o napakah. Rezultati pokažejo, da dvosmerni pristop omogoča natančnejšo obravnavo nekaterih napak pri tipiziranju. Medtem ko je prvotna implementacija večino neujemanj poročala kot neuspeh poenotenja tipov, nova implementacija za nekatere primere poda specifičnejša sporočila, ki so povezana s konstrukcijo, pri kateri je prišlo do napake.

Language:Slovenian
Keywords:Prevajalniki, preverjanje tipov, dvosmerna tipizacija, izpeljava tipov, tipizirano funkcijsko programiranje, semantična analiza
Work type:Master's thesis/paper
Typology:2.09 - Master's Thesis
Organization:FRI - Faculty of Computer and Information Science
Year:2026
PID:20.500.12556/RUL-190892 This link opens in a new window
COBISS.SI-ID:305450243 This link opens in a new window
Publication date in RUL:06.11.2026
Views:89
Downloads:20
Metadata:XML DC-XML DC-RDF
:
Copy citation
Share:Bookmark and Share

Secondary language

Language:English
Title:Implementing bidirectional typing
Abstract:
This thesis presents the implementation of bidirectional typing in the programming language Millet. The existing implementation is based on the Hindley–Milner type system, which infers types by generating type equations and solving them through unification. Bidirectional typing replaces this approach with two distinct procedures: type synthesis, which derives a type from an expression, and type checking, which checks an expression against an expected type. The thesis describes the adaptation of the type system and the implementation of the core procedures for type synthesis and checking. Particular attention is given to expressions, function abstractions and applications. The thesis also examines how this change affects the need for explicit type annotations and the reporting of typing errors. The results show that the bidirectional approach enables more precise reporting of certain typing errors. Whereas the original implementation reported most type mismatches as unification failures, the new implementation provides more specific error messages for selected cases, identifying the construct in which the error occurred.

Keywords:Compilers, type checking, bidirectional typing, type inference, typed functional programming, semantic analysis

Similar documents

Similar works from RUL:
Similar works from other Slovenian collections:

Back