National Repository of Grey Literature 2 records found  Search took 0.00 seconds. 
Type inference and polymorphism for C
Klepl, Jiří ; Kratochvíl, Miroslav (advisor) ; Šefl, Vít (referee)
The C language, despite its age, is one of the main languages in systems development. It is valued for giving the user almost complete control over the memory management and the computations the program written in it performs. However, a large portion of criticism of C arises from the lack of generic programming features. C compensates that by utilizing preprocessor macros, which are prone to user errors. This problem has been addressed in the early stages of the development of the C++ language, but many systems developers refuse C++ because of its complexity and non-transparency of the code. We propose a simpler solution by applying the Hindley-Milner type sys- tem extended by Haskell type classes and type constructors. We will show that this approach is viable even with minimal changes to the syntax of C, but giving it much higher expressiveness. 1
C++ linter based on linear types
Beneš, Jiří ; Kratochvíl, Miroslav (advisor) ; Šefl, Vít (referee)
Low-level programming requires careful management of system resources, most notably memory. In C++ programmers are encouraged to follow idioms like RAII and smart pointers to handle resources correctly as violating them leads to unsafe code. Typed functional programming languages guarantee safe automatic mem- ory management, but are often sub-optimal in handling system resources. A nice, formal solution to handling resources naturally is linear types. Unfortu- nately, existing languages that support linearity are cumbersome and require explicit, complicated annotations from the programmer. We bridge the two worlds by exploring a novel combination of C++ and linear types. We describe a new type system with linearity for C++ by using constrained qualified types, while requiring no additional input from the programmer. The applied result of our work is called Lily, a static analysis tool for C++ using the Clang compiler infrastructure. Lily can statically detect large, general classes of issues, some of which are not detected by common state-of-the-art tools for C++. 1

Interested in being notified about new results for this query?
Subscribe to the RSS feed.