A metamorphism is an unfold after a fold, consuming an input by the fold then generating an output by the unfold. It is typically useful for converting data representations, e.g., radix conversion of numbers. (Bird and Gibbons, Lecture Notes in Computer Science, vol. 2638, 2003, pp. 1-26) have shown that metamorphisms can be incrementally processed in streaming style when a certain condition holds because part of the output can be determined before the whole input is given. However, whereas radix conversion of fractions is amenable to streaming, radix conversion of natural numbers cannot satisfy the condition because it is impossible to determine part of the output before the whole input is completed. In this paper, we present a jigsaw model in which metamorphisms can be partially processed for outputs even when the streaming condition does not hold. We start with how to describe the 3-to-2 radix conversion of natural numbers using our model. The jigsaw model allows us to process metamorphisms in a flexible way that includes parallel computation. We also apply our model to other examples of metamorphisms. Copyright © Cambridge University Press 2012.
CITATION STYLE
Nakano, K. (2013). Metamorphism in jigsaw. Journal of Functional Programming, 23(2), 161–173. https://doi.org/10.1017/S0956796812000391
Mendeley helps you to discover research relevant for your work.