Towards a Modular Program Derivation via Fusion and Tupling
Towards a Modular Program Derivation via Fusion and Tupling
复制标题
通过融合和元组推导模块化程序
DOI:
10.1007/3-540-45821-2_9
复制
发表时间:
2002
期刊:
影响因子:
--
通讯作者:
Zhenjiang Hu
中科院分区:
文献类型:
--
作者:
W. Chin;Zhenjiang Hu
We show how programming pearls can be systematically derived via fusion, followed by tupling transformations. By focusing on the elimination of intermediate data structures (fusion) followed by the elimination of redundant calls (tupling), we systematically realise both space andtime efficient algorithms from naive specifications. We illustrate our approach using a well-known maximum segment sum (MSS) problem, anda less-known maximum segment product (MSP) problem. While the two problems share similar specifications, their optimisedco des are significantly different. This divergence in the transformed codes do not pose any difficulty. By relying on modular techniques, we are able to systematically reuse both code and transformation in our derivation.