# Program transformation system based on generalized partial computation

Special Feature

First Online:

Received:

Revised:

- 43 Downloads
- 4 Citations

## Abstract

Generalized Partial Computation (GPC) is a program transformation method utilizing partial information about input data, abstract data types of auxiliary functions and the logical structure of a source program. GPC uses both an inference engine such as a theorem prover and a classical partial evaluator to optimize programs. Therefore, GPC is more powerful than classical partial evaluators but harder to implement and control. We have implemented an experimental GPC system called WSDFU (Waseda Simplify-Distribute-Fold-Unfold). This paper demonstrates the power of the program transformation system as well as its theorem prover and discusses some future works.

## Keywords

Partial Evaluation Program Transformation Theorem Proving Program Optimization Recursion Removal Algebraic Manipulation## Preview

Unable to display preview. Download preview PDF.

## References

- 1).Amtoft, T., Consel, C., Danvy, O. and Malmkjaer, K., “The Abstraction and Instantiation of String-matching Programs,” Personal Communication, May, 2001.Google Scholar
- 2).Bird, R. S., “Improving Programs by the Introduction of Recursion,”
*Comm. ACM 20, 11*, pp. 856–863, 1977.MathSciNetCrossRefGoogle Scholar - 3).Boyer, R. S. and Moore, J. S., “A Fast String Searching Algorithm,”
*Comm. ACM 20, 10*, pp. 761–772, 1977.CrossRefGoogle Scholar - 4).Burstall, R. M. and Darlington, J. A., “Transformation System for Developing Recursive Programs,”
*JACM, 24, 1*, pp. 44–67, 1977.MathSciNetCrossRefGoogle Scholar - 5).Chang, C. and Lee, R. C.,
*Symbolic Logic and Mechanical Theorem Proving*, Academic Press, 1973.CrossRefGoogle Scholar - 6).Cormen, T. H., Leiserson, C. E. and Rivest, R. L.,
*Introduction to Algorithms*, The MIT Press, 1990.Google Scholar - 7).“Partial Evaluation,” in
*Proc. of Lecture Notes in Computer Science 1110*, (Danvy, O., Glück, R. and Thiemann, P., eds.) Springer-Verlag, 1996.Google Scholar - 8).Futamura, Y. and Nogi, K., “Generalized Partial Computation,” in
*Partial Evaluation and Mixed Computation*(Bjørner, D., Ershov, A. P. and Jones, N. D. eds.), North-Holland, Amsterdam, pp. 133–151, 1988.Google Scholar - 9).Futamura, Y., Nogi, K. and Takano, A., “Essence of Generalized Partial Computation,”
*Theoretical Computer Science, 90*, pp. 61–79, 1991.CrossRefGoogle Scholar - 10).Futamura, Y. and Nogi, K.,
*Program Transformation Based on Generalized Partial Computation*, 5241678, US-Patent, Aug. 31, 1993.Google Scholar - 11).Futamura, Y. and Otani, H., “Recursion Removal Rules for Linear Recursive Programs and Their Effectiveness,”
*Computer Software, JSSST 15, 3*, pp. 38–49, 1998. (in Japanese)Google Scholar - 12).Futamura, Y., “Partial Evaluation of Computation Process — An approach to a Compiler-Compiler,”
*Higher-Order and Symbolic Computation, 12, 4*, pp. 381–391, 1999.CrossRefGoogle Scholar - 13).Futamura, Y., “Partial Evaluation of Computation Process Revisited,”
*Higher-Order and Symbolic Computation, 12, 4*, pp. 377–380, 1999.CrossRefGoogle Scholar - 14).Futamura, Y., Konishi, Z. and Glück, R., “Implementation of an Experimental System for Automatic Program Transformation Based on Generalized Partial Computation,”
*The 3rd International Workshop on Intelligent Software Engineering*, Limerick, Ireland, June 2000.Google Scholar - 15).Glück, R. and Klimov, A. V., “Occam’s Razor in Metacomputation: the Notion of a Perfect Process Tree,” in
*Static Analysis, Lecture Notes in Computer Science 724*(Cousot, P., et al. eds.), Springer-Verlag, pp. 112–123, 1993.CrossRefGoogle Scholar - 16).Graham, R. L., Knuth, D. E. and Patashnik, O.,
*Concrete Mathematics*, Addison-Wesley, 1989.Google Scholar - 17).Hearn, A. C., “REDUCE — A Case Study in Algebra System Development,”
*Lecture Notes in Computer Science, 144*, Springer-Verlag, Berlin, 1982.Google Scholar - 18).Jones, N. D., “An Introduction to Partial Evaluation,”
*ACM Computing Surveys, 28, 3*, pp. 480–503, 1996.CrossRefGoogle Scholar - 19).Konishi, Z. and Futamura, Y., “A Theorem Proving System and a Terminating Process for Generalized Partial Computation (GPC),”
*RIMS Workshop on Program Transformation, Symbolic Computation and Algebraic Manipulation*, pp. 59–64, 1999. (in Japanese)Google Scholar - 20).Konishi, Z. and Futamura, Y., “Recursion Removal on Generalized Partial Computation (GPC),” in
*Proc. of the 17th National Conference*, C5-2, JSSST, 2000. (in Japanese)Google Scholar - 21).Matsuya, M. and Futamura, Y., “Program Transformation and Algebraic Manipulation,”
*RIMS Workshop on Program Transformation, Symbolic Computation and Algebraic Manipulation*, pp. 115–122, 1999. (in Japanese)Google Scholar - 22).Pettorossi, A. and Proietti, M., “Rules and Strategies for Transforming Functional and Logic Programs,”
*ACM Computing Surveys, 28, 2*, pp. 360–414, 1996.CrossRefGoogle Scholar - 23).Sørensen, M. H., Glück, R. and Jones, N. D., “A Positive Supercompiler,”
*Journal of Functional Programming, 6, 6*, pp. 811–838, 1996.CrossRefGoogle Scholar - 24).Takano, A., Nogi, K. and Futamura, Y., “Termination Conditions of Generalized Partial Computation,” in
*Proc. of the 7th National Conference*, C8-1, JSSST, 1990. (in Japanese)Google Scholar - 25).Turchin, V. F., “The Concept of a Supercompiler,” ACM T
*OPLAS, 8, 3*, pp. 292–325, 1986.CrossRefGoogle Scholar

## Copyright information

© Ohmsha, Ltd. and Springer 2002