Typová inference a polymorfismus pro jazyk C
Thesis title in Czech: | Typová inference a polymorfismus pro jazyk C |
---|---|
Thesis title in English: | Type inference and polymorphism for C |
Key words: | překladače, programovací jazyky, typové systémy |
English key words: | compilers, programming languages, type systems |
Academic year of topic announcement: | 2019/2020 |
Thesis type: | Bachelor's thesis |
Thesis language: | čeština |
Department: | Department of Software Engineering (32-KSI) |
Supervisor: | RNDr. Miroslav Kratochvíl, Ph.D. |
Author: | hidden - assigned and confirmed by the Study Dept. |
Date of registration: | 07.10.2019 |
Date of assignment: | 18.10.2019 |
Confirmed by Study dept. on: | 26.11.2019 |
Date and time of defence: | 14.09.2020 09:00 |
Date of electronic submission: | 31.07.2020 |
Date of submission of printed version: | 31.07.2020 |
Date of proceeded defence: | 14.09.2020 |
Opponents: | Mgr. Vít Šefl |
Guidelines |
Despite the remarkable age, the C language and its derivatives remain a tool of choice for programming various low-level, embedded and high-performance systems. A large portion of criticism of C arises from its lack of type system and generic-programming features, which complicate programming of large software and create significant space for programming errors. Although this problem has been sufficiently addressed in C++, simpler approaches exist. This thesis aims to explore the implementation of a data-oriented subset of the Hindley-Milner type system extended with Haskell-style typeclasses in a C-style programming language, with minimal changes to syntax and same run-time behavior and imperative semantics as in C. Such system should provide an interesting benefit of type inference in the whole program, together with a practical model of polymorphism and overloading that is currently used almost exclusively in functional programming. For demonstrating the results, a compiler from "C with typeclasses" to plain C will be implemented and tested on several example programs. |
References |
Jones, M. P. (1999). Typing haskell in haskell. In Haskell workshop (Vol. 7).
SC22/WG14 (2011). ISO/IEC 9899 - C programming language standard. Aho, A. V., Sethi, R., & Ullman, J. D. (1986). Compilers, principles, techniques. Addison wesley, 7(8), 9. |