{'fraction_non_alphanumeric': 0.016143497757847534, 'fraction_numerical': 0.0, 'mean_word_length': 5.2, '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}}
Shared Memory Implementation of the Gamma-Operation

Abstract The Gamma scheme allows the specification of an application without introducing unnecessary sequentiality. The main idea is to simulate a chemical reaction on multisets, also called bags. Some elements of a bag which fulfil a certain predicate (also called reaction condition) may be taken from the multiset and replaced by new elements which are generated by combining the selected elements using the so-called reaction function. In the present paper, we investigate the efficient parallel implementation of the Gamma scheme. In particular, the reaction condition can be split into parts which are tested as early as possible. Possible atomic conditions are arithmetic comparisons. We use the properties of the arithmetic comparisons in order to restrict the range of bag elements which has to be considered. Reconsiderations of the same bag elements are avoided. Moreover, a sophisticated protocol is needed in order to avoid deadlocks when several processes compete for the same bag elements. Experimental results show the impact of our improvements.