{'fraction_non_alphanumeric': 0.015215553677092139, 'fraction_numerical': 0.0, 'mean_word_length': 5.198952879581152, '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}}
Choosing among alternative pasts

The main problem with testing concurrent programs is their non-determinism: two executions of such a program may yield different results. The traditional solution is to identify and examine the race conditions. A different approach is that of generating different interleavings at runtime using embedded sleep statements. Advantages of this approach over the traditional one include its ability to identify more problems, and the absence of the false alarms. This paper proposes a totally different technique for the generation of interleavings. Operations on shared variables are tracked. Every time a shared variable is read, the read value is chosen among the values that the variable could hold in some interleaving consistent with the past observed events. The event timing restrictions are then updated based on the value chosen. The problem of identifying legal read values is far from simple due to the fact that past value substitutions affect future ones. Our solution is computationally intensive and, therefore, impractical as is. However, insights gained from it lead to practical heuristics for operating the embedded sleep statements.