{'fraction_non_alphanumeric': 0.022686025408348458, 'fraction_numerical': 0.0, 'mean_word_length': 4.994565217391305, '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}}
The final Frontier: Coping With Immutable Data in a JVM for Embedded Real-Time Systems

Managed, type-safe languages such as Java are becoming an increasingly competitive alternative for programming realtime and embedded applications, a field which has traditionally been dominated by C. However, one peculiar issue in the use of Java is the insufficient way immutable data is handled. There are some important cases, such as primitive arrays, where the final keyword is not expressive enough to declare data as truly constant. This leads to an unnecessary increase in both code size and runtime memory footprint. Moreover, it prevents the compiler from applying its optimisations as aggressively as would be possible. In this paper, we propose a set of compiler techniques to improve the handling of immutable data in embedded Java applications. Our approach includes (a) detecting constant program data that could not be declared as such by the programmer, (b) eliminating the overhead associated with it, and (c) providing an automated way to allocate that data in flash memory in order to save RAM.