Towards safer programming language constructs

Áron Baráth · Eötvös Loránd Tudományegyetem · 2019

Current mainstream programming languages suffer numerous safety issues that originally introduced to be convenient and practical, but later turned out these features can be harmful. Although, these programming languages continuously evolving, they usually have a limitation due to backward compatibility. New languages are being created today to fix issues or introduce new paradigms. In thesis 1 we describe various software issues related to language syntax based on real industrial experiences. To avoid these problems we suggest strict coding conventions for existing languages and rigorous syntactical rules for new languages. Rules include to prefer immutable memory as default function arguments, more expressive control flow and better ways to define operators. Current mainstream languages also suffer some semantical problems what we discuss in thesis 2. Implicit conversions usually allowed in this languages but they may lead to unwanted behavior. To avoid such cases in C++ we introduced a wrapper class based solution. The C++11 move semantics may reduce copy operations when implemented properly. We specified an algorithm and implemented a prototype tool to detect possible misuse of the move semantics. It is well-known that the costs of software development is only the fragment of its all maintenance cycle. In order to reduce maintenance costs, we may demand various services from the programming languages. We analyze such features in thesis 3. As an example, mainstream languages give no support for handle the binary compatibility issues among different library versions. Compile time testing is also rarely supported. We suggest solutions for these problems. In order to prove that the design decisions we proposed in the earlier theses viable, we implemented Welltype, a prototype programming language that designed according our findings. Our language, is imperative with additional multi-paradigm language elements and available as open source with a full development tool-chain.

Read the paper · More papers on PaperTik