A Pushdown Machine for Recursive XML Processing

A Pushdown Machine for Recursive XML Processing
复制标题

用于递归 XML 处理的下推机

DOI:
10.1007/11924661_21
复制
发表时间:
2006
期刊:
--
影响因子:
--
通讯作者:
Shin
Shin
中科院分区:
--
文献类型:
--
作者:
Keisuke Nakano;Shin

文献摘要

参考文献

被引文献

相似文献

最自然地将XML转换定义为树上的递归函数。然而,一个简单的实现会在处理之前将整个输入XML树加载到内存中。相比之下,流处理风格的程序可以最大限度地减少内存使用,因为它可以释放由输入的已处理前缀占用的内存,但它们更难编写,因为程序员需要承担维护状态的负担。在本文中,我们提出了一个XML流处理模型,并证明了所有在XML树上用特定风格的递归函数编写的程序--宏森林换能器--都可以自动翻译到我们的流处理器上。流处理器在风格上是声明性的,但可以通过下推机器高效地实现。因此,我们得到了两全其美--程序清晰度和执行效率。
XML transformations are most naturally defined as recursive functions on trees. A naive implementation, however, would load the entire input XML tree into memory before processing. In contrast, programs in stream processing style minimise memory usage since it may release the memory occupied by the processed prefix of the input, but they are harder to write because the programmer is left with the burden to maintain a state. In this paper, we propose a model for XML stream processing and show that all programs written in a particular style of recursive functions on XML trees, themacro forest transducer, can be automatically translated to our stream processors. The stream processor is declarative in style, but can be implemented efficiently by a pushdown machine. We thus get the best of both worlds — program clarity, and efficiency in execution.
DOI: --
发表时间: 2008
期刊: Journal of Functional Programming (出版決定)
影响因子: --
作者:
Koichi Kodama;Kohei Suenaga and Naoki Kobayashi
通讯作者: Kohei Suenaga and Naoki Kobayashi