{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,5,26]],"date-time":"2026-05-26T23:05:15Z","timestamp":1779836715098,"version":"3.53.1"},"reference-count":28,"publisher":"Cambridge University Press (CUP)","issue":"4","license":[{"start":{"date-parts":[[2008,11,7]],"date-time":"2008-11-07T00:00:00Z","timestamp":1226016000000},"content-version":"unspecified","delay-in-days":5151,"URL":"https:\/\/www.cambridge.org\/core\/terms"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["J. Funct. Prog."],"published-print":{"date-parts":[[1994,10]]},"abstract":"<jats:title>Abstract<\/jats:title>\n                  <jats:p>Large functional programs are often constructed by decomposing each big task into smaller tasks which can be performed by simpler functions. This hierarchical style of developing programs has been found to improve programmers' productivity because smaller functions are easier to construct and reuse. However, programs written in this way tend to be less efficient. Unnecessary intermediate data structures may be created. More function invocations may be required.<\/jats:p>\n                  <jats:p>\n                    To reduce such performance penalties, Phil Wadler proposed a transformation algorithm, called\n                    <jats:italic>deforestation<\/jats:italic>\n                    , which could automatically\n                    <jats:italic>fuse<\/jats:italic>\n                    certain composed expressions together to eliminate intermediate tree-like data structures. However, his technique is currently safe (terminates with no loss of efficiency) for only a subset of first-order expressions.\n                  <\/jats:p>\n                  <jats:p>\n                    This paper will generalise the deforestation technique to make it safe for all first-order and higher-order functional programs. Our generalisation is explained using a model for\n                    <jats:italic>safe fusion<\/jats:italic>\n                    which views each function as a producer and its parameters as consumers. Through this model, syntactic program properties are proposed to classify producers and consumers as either safe or unsafe. This classification is used to identify sub-terms that can be safely fused\/eliminated. We present the generalised transformation algorithm, illustrate it with examples and provide a termination proof for the transformation algorithm of first-order programs. This paper also contains a suite of additional techniques to further improve the basic safe fusion method. These improvements could be viewed as enhancements to compensate for some inadequacies of the syntactic analyses used.\n                  <\/jats:p>","DOI":"10.1017\/s0956796800001179","type":"journal-article","created":{"date-parts":[[2008,11,7]],"date-time":"2008-11-07T11:12:40Z","timestamp":1226056360000},"page":"515-555","source":"Crossref","is-referenced-by-count":35,"title":["Safe fusion of functional expressions II: Further improvements"],"prefix":"10.1017","volume":"4","author":[{"given":"Wei-Ngan","family":"Chin","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"56","published-online":{"date-parts":[[2008,11,7]]},"reference":[{"key":"S0956796800001179_ref027","first-page":"344","volume-title":"Euro. Symposium on Programming","author":"Wadler","year":"1988"},{"key":"S0956796800001179_ref025","first-page":"282","volume-title":"Workshop on Programs as Data Objects","author":"Wadler","year":"1985"},{"key":"S0956796800001179_ref022","doi-asserted-by":"publisher","DOI":"10.1145\/5956.5957"},{"key":"S0956796800001179_ref020","first-page":"361","volume-title":"3rd Euro. Symposium on Programming: LNCS 432","author":"Sands","year":"1990"},{"key":"S0956796800001179_ref019","unstructured":"Runciman C , Firth M. & Jagger N. (1989) Transformation in a non-strict language: An approach to instantiation. In: Glasgow Functional Programming Workshop, 08."},{"key":"S0956796800001179_ref026","volume-title":"The Implementation of Functional Programming Languages","author":"Wadler","year":"1987"},{"key":"S0956796800001179_ref017","doi-asserted-by":"publisher","DOI":"10.1016\/0022-0000(78)90014-4"},{"key":"S0956796800001179_ref013","first-page":"39","volume-title":"Proc. Glasgow Workshop on Functional Programming","author":"Ferguson","year":"1988"},{"key":"S0956796800001179_ref010","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-57264-3_35"},{"key":"S0956796800001179_ref005","unstructured":"Chin W.-N. (1990) Automatic Methods for Program Transformation. PhD thesis, Imperial College, University of London, 03."},{"key":"S0956796800001179_ref004","unstructured":"Chin W.-N. & Darlington J. (1992) Higher-order removal transformation technique for functional programs. In: 15th Australian Computer Science Conf., Hobart, Tasmania. Australian CS Comm., 141:181\u2013194.)"},{"key":"S0956796800001179_ref003","volume-title":"Workshop on Partial Evaluation and Mixed Computations","author":"Bjorner","year":"1988"},{"key":"S0956796800001179_ref011","unstructured":"Consel C (1990) Binding time analysis for higher-order untyped functional languages. In: 6th ACM Conf. on Lisp and Functional Programming, pp. 264\u2013272, 06."},{"key":"S0956796800001179_ref012","doi-asserted-by":"publisher","DOI":"10.1145\/357153.357154"},{"key":"S0956796800001179_ref028","doi-asserted-by":"publisher","DOI":"10.1145\/114005.102806"},{"key":"S0956796800001179_ref009","unstructured":"Chin W.-N. (1993) Towards an automated tupling strategy. In: 3rd ACM Symposium on Partial Evaluation and Semantics-Based Program Manipulation,ACM Press, pp. 119\u2013132, Copenhagen, Denmark, 06."},{"key":"S0956796800001179_ref018","first-page":"347","volume-title":"Proc. PLILP'91; LNCS 528","author":"Proietti","year":"1991"},{"key":"S0956796800001179_ref024","first-page":"45","volume-title":"ACM Symposium on Lisp and Functional Programming","author":"Wadler","year":"1984"},{"key":"S0956796800001179_ref015","first-page":"225","volume-title":"Workshop on Partial Evaluation and Mixed Computations","author":"Jones","year":"1988"},{"key":"S0956796800001179_ref008","first-page":"201","volume-title":"Proc. JSPS Seminar on Parallel Programming Systems","author":"Chin","year":"1992"},{"key":"S0956796800001179_ref023","first-page":"531","volume-title":"Workshop on Partial Evaluation and Mixed Computations","author":"Turchin","year":"1988"},{"key":"S0956796800001179_ref006","first-page":"173","volume-title":"Workshop on Static Analysis of Equational, Functional and Logic Programming Languages, BIGRE 74","author":"Chin","year":"1991"},{"key":"S0956796800001179_ref021","first-page":"485","volume-title":"Workshop on Partial Evaluation and Mixed Computations","author":"Sestoft","year":"1988"},{"key":"S0956796800001179_ref014","doi-asserted-by":"crossref","unstructured":"Holst C. K. (1991) Finiteness analysis. In: 5th ACM Conf. on Functional Programming Languages and Computer Architecture, pp. 473\u2013495, Cambridge, MA, 08.","DOI":"10.1007\/3540543961_23"},{"key":"S0956796800001179_ref016","doi-asserted-by":"publisher","DOI":"10.1007\/BF01806312"},{"key":"S0956796800001179_ref002","doi-asserted-by":"publisher","DOI":"10.1145\/321992.321996"},{"key":"S0956796800001179_ref001","doi-asserted-by":"crossref","unstructured":"Augustsson L (1985) Compiling pattern-matching. In: Conference on Functional Programming and Computer Architecture (LNCS 201, ed Jouannaud), pp. 368\u2013381, Nancy, France.","DOI":"10.1007\/3-540-15975-4_48"},{"key":"S0956796800001179_ref007","doi-asserted-by":"crossref","unstructured":"Chin W.-N. (1992 a) Safe fusion of functional expressions. In: 7th ACM Lisp and Functional Programming Conf. pp. 11\u201320, San Francisco, CA, 06.","DOI":"10.1145\/141478.141494"}],"container-title":["Journal of Functional Programming"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.cambridge.org\/core\/services\/aop-cambridge-core\/content\/view\/S0956796800001179","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,5,26]],"date-time":"2026-05-26T22:35:16Z","timestamp":1779834916000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.cambridge.org\/core\/product\/identifier\/S0956796800001179\/type\/journal_article"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[1994,10]]},"references-count":28,"journal-issue":{"issue":"4","published-print":{"date-parts":[[1994,10]]}},"alternative-id":["S0956796800001179"],"URL":"https:\/\/doi.org\/10.1017\/s0956796800001179","relation":{},"ISSN":["0956-7968","1469-7653"],"issn-type":[{"value":"0956-7968","type":"print"},{"value":"1469-7653","type":"electronic"}],"subject":[],"published":{"date-parts":[[1994,10]]}}}