{'fraction_non_alphanumeric': 0.010408921933085501, 'fraction_numerical': 0.0, 'mean_word_length': 5.146118721461187, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Extensible Code Contracts for Scala

Code contracts is a way to attribute the programs with formal the specifications, based on which the verification of those programs can be performed. The focus on software verification is increasing and the mainstream languages start to adopt this technique. Scala is an object oriented and functional programming language that is very expressive and has a strong type system. Hence, developing a code contracts solution for Scala is both interesting and challenging. In this thesis we build the basic contracts library for Scala which provides the means to express preand post-conditions for the methods. The main work is done in the compiler plugin which performs compile time rewriting of the program in order to support the inheritance of contracts and old expressions. Providing contracts the traditional way for a compiled library is not possible without the recompilation and redistribution. To solve this problem our rewriting tool enables the separation of contracts from the corresponding implementation. Such contracts can then be edited, distributed and used separately from the implementation. Code contracts for Scala is a starting point for further research so it has been designed with the extensibility in mind and could be supplemented with new types of contracts such as object invariants.