{'fraction_non_alphanumeric': 0.01549865229110512, 'fraction_numerical': 0.0, 'mean_word_length': 5.012145748987854, '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 virtual file system for source program editing

In this paper we propose a virtual file system, "SPDFS," which provides global declarations in source programs as virtual files to programmers. Global declarations means objects which declare identifiers in external scope, such as function definition and variable declaration. On SPDFS, programmers can edit virtual files directly by their favorite editors. Changes to declarations in a virtual file are to be applied to real source files automatically. SPDFS can also provide a set of relevant declarations distributed in different source files as a virtual file. Relevancy of declarations in this paper means references among declarations. SPDFS retrieves declarations which are referred by or refer to the target declaration and combine them in a virtual file. The depth of references can be specified in a file path by programmers. SPDFS reduces the amount of source programs which programmers need to read for editing and the amount of programmers' works for searching relevant declarations. We show an implementation of SPDFS using the portal file system on FreeBSD. The portal file system invokes commands for reading and writing a virtual file respectively. These commands work as user-land process. Because no modification of kernel is required, it is easy to customize the behavior of SPDFS. We also show the effectiveness of SPDFS by comparing numbers of lines of source programs which programmers need to read for editing.