{'fraction_non_alphanumeric': 0.018499486125385406, 'fraction_numerical': 0.0, 'mean_word_length': 5.493333333333333, '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}}
Encapsulation, Operator Overloading, and Error Class Mechanisms in OCL

Checking models for correctness or compatibility using standard formal modeling techniques such as OCL has merits in abstraction and compactness. However, it is inconvenient for developers, since there are no standard mechanisms how to handle large and complex OCL constraints. Therefore, this paper presents an approach how to split complex OCL constraints into multiple ones by defining helper functions and pack these into an OCL/P library with encapsulation mechanisms. Another drawback of using complex OCL constraints at present is the lack of descriptive and user-friendly error messages. Hence, this paper introduces an OCL extension that allows specifying error classes by synthesizing witnesses pointing directly to constraint violations. All approaches are shown on Component & Connector model examples, where OCL/P is used on the meta-level to verify backwards compatibility of interfaces.