{'fraction_non_alphanumeric': 0.024311183144246355, 'fraction_numerical': 0.0, 'mean_word_length': 5.569148936170213, '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}}
A heap‐based implementation of the programming language Pascal

The implementation of Pascal known as Pascal ‘P’ was modified so that activation records for blocks (procedures and functions) were no longer allocated on a stack, but were instead allocated on a heap. This was done partly to test the feasibility of using Pascal ‘P’ for experimenting with extensions to Pascal, and partly to assess the efficiency of implementing Pascal procedures and functions in this way. The necessary changes to Pascal ‘P’ are described; where alternative strategies were possible, these are outlined and the reasons for the final choice given. The heap management algorithms used are presented and, in particular, their behaviour when managing the activation records of Pascal programs which do not involve dynamic variables is explained. Quantitative comparisons are made between Pascal ‘P’ and the version with heap‐allocated activation records, to assess their relative efficiencies; these comparisons indicate that the modified system uses more storage, but it gives rise to only slightly longer execution times. Alternative heap management algorithms are discussed. Finally, some advantages of heap‐allocated activation records are presented.