The Concatenate Vanishes
The Concatenate Vanishes
复制标题
连接消失
DOI:
--
复制
发表时间:
1987
期刊:
影响因子:
--
通讯作者:
P. Wadler
中科院分区:
文献类型:
--
作者:
P. Wadler
This note presents a trivial transformation that can eliminate many calls of the concatenate (or “append”) operator from a program. The general form of the transformation is well known, and one of the examples, transforming the reverse function, is a classic. However, so far as I am aware, this style of transformation has not previously been systematised in the way done here. The transformation is suitable for incorporation in a compiler, and improves the asymptotic time complexity of some programs from quadratic to linear. There is a syntactic test that determines when the transformation will succeed in eliminating a concatenate operation. Section 1 describes the transformation. Section 2 presents examples. Section 3 characterises the transformation’s benefits. Section 4 describes related work. Section 5 concludes.