{'fraction_non_alphanumeric': 0.010033444816053512, 'fraction_numerical': 0.0, 'mean_word_length': 5.894009216589862, '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}}
Modularity and optimization in synergy

As with traditional software, the complexity of a programming language implementation is faced with modularization which favors the separation of concerns, independent development, maintainability and reuse. However, modularity interferes with language optimization as the latter requires context information that crosses over the single module boundaries and involves other modules. This renders hard to provide the optimization for a single language concept to be reusable with the concept itself. Therefore, the optimization is in general postponed to when all language concepts are available. We defined a model for modular language development with a multiple semantic actions dispatcher based on condition guards that are evaluated at runtime. The optimization can be implemented as context-dependent extensions applied a posteriori to the composed language interpreter without modifying a single component implementation. This renders effective the defined optimization within the language concept boundaries according to the context provided by other language concepts when available and eases its reuse with the language concepts implementation independently of its usage context. The presented model is integrated into the Neverlang development framework and is demonstrated on the optimization of a Javascript interpreter written in Neverlang. We also discuss the applicability of our model to other frameworks for modular language development.