arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2110.05053cs.SE
收藏

将数据格式信息的结构化描述融入程序设计中自动生成文件读取程序

Integrating Structural Description of Data Format Information into Programming to Auto-generate File Reading Programs

Xinghua Cheng, Erjie Hu, Di Hu

摘要:

文件读取是数据共享和科学计算的基础。然而,由于数据格式是异构的和复杂的,因此用于文件读取的手动编程是劳动密集型的和耗时的。为了解决这个问题,本研究提出了一种新的方法,自动生成文件读取程序的基础上结构化和自我描述的数据格式信息。该方法提供了顺序读取和随机读取两种模式。文件数据格式由数据格式置标语言描述,从而生成DFML文档。通过对DFML文档进行语法分析而形成的数据类型序列。为特定程序设计语言生成程序,用于顺序或随机读取数据,并具有形成的数据类型序列和通用编程规则。开发了一个用于生成和编辑DFML文档的工具DFML编辑器。二进制文件的案例研究,即,ESRI点形状文件和纯文本文件,即,雨水管理模式的输入文件,进行了自动程序生成和文件读取软件开发。实验结果表明,该方法能有效地自动生成文件读取程序。本研究的思想也有助于自动写入文件。

英文摘要:

File reading is the basis for data sharing and scientific computing. However, manual programming for file reading is labour-intensive and time-consuming, as data formats are heterogeneous and complex. To address such an issue, this study proposes a novel approach for the automatic generation of file reading programs based on structured and self-described data format information. This approach provides two modes composed of sequentially and randomly reading. The file data format is described by Data Format Markup Language and thus DFML documents are generated. The formation of data type sequences by parsing those DFML documents. The generation of programs for sequential or random reading data with formed data type sequences and general programing rules for specific programming languages. A tool named DFML Editor was developed for generating and editing DFML documents. Case studies on binary files, i.e., ESRI point shapefiles and plain text files, i.e., input files of Storm Water Management Model, were conducted with the software developed for automatic program generation and file reading. Experimental results show that the proposed approach is effective for automatically generating programs for reading files. The idea in this study is also helpful for automatically writing files.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑