This Article 
 Bibliographic References 
 Add to: 
Program Translation Via Abstraction and Reimplementation
August 1988 (vol. 14 no. 8)
pp. 1207-1228

An abstraction-and-reimplementation paradigm is presented in which the source program is first analyzed in order to obtain a programming-language-independent abstract understanding of the computation performed by the program as a whole. The program is then reimplemented in the target language based on this understanding. The key to this approach is the abstract understanding obtained. It allows the translator to benefit from an appreciation of the global features of the source program without being distracted by what are considered irrelevant details. Knowledge-based translation via abstraction and reimplementation is described as one of the goals of the Programmer's Apprentice project. A translator which translates Cobol programs into Hibol (a very-high-level business data processing language) has been constructed. A computer which generates extremely efficient PDP-11 object code for Pascal programs has been designed.

[1] A. V. Aho, R. Sethi, and J. D. Ullman,Compilers: Principles, Techniques, and Tools. Reading, MA: Addison-Wesley, 1986.
[2] J.R. Allen and K. Kennedy, "Automatic loop interchange," inProc. SIGPLAN '84 Symp. Comp. Construct., Montreal, Canada, July 1984.
[3] R. Balzer, "Transformational implementation: An example,"IEEE Trans. Software Eng., vol. SE-7, no. 1, Jan. 1981.
[4] R. K. Boxer, "A translator from structured Fortran to Jovial/J73," inProc. IEEE Nat. Aerospace Electron. Conf. (NAECON-83), 1983.
[5] J. M. Boyle and M. N. Muralidharan, "Program reusability through program transformation,"IEEE Trans. Software Eng., vol. SE-10, no. 5, September 1984.
[6] D. C. Brotsky, "An algorithm for parsing flow graphs," M.S. thesis, Mass. Inst. Technol., Cambridge, MA, MIT/AI/TR-704, Mar. 1984.
[7] E. Bush, "The automatic restructuring of COBOL," inProc. Conf. On Software Maintenance-1985. Los Alamitos, CA: IEEE Computer Soc., 1985, pp. 35-41.
[8] J. Carbonell, R. Cullingford, and A. Gershman, "Knowledge-based machine translation,"IEEE Trans. Pattern Anal. Math. Intell., vol. PAMI-3, no. 4, 1981.
[9] R. D. Duffey lI, "Formalizing the expertise of the assembler language programmer," Mass. Inst. Technol., Cambridge, MA, MIT/ AI/WP-203, Sept. 1980.
[10] G. G. Faust, "Semiautomatic translation of Cobol into Hibol," M.S. thesis, Mass. Inst. Technol., Cambridge, MA, MIT/LCS/TR-256, Mar. 1981.
[11] S. M. Freudenberger, J. T. Schwartz, and M. Sharir, "Experience with the SETL optimizer,"ACM Trans. Programming Lang. Syst., vol. 5, no. 1, Jan. 1983.
[12] R. S. Gaines, "On the translation of machine language programs,"Commun. ACM, vol. 8, no. 12, Dec. 1965.
[13] K. Jensen and N. Wirth, "Pascal user manual and report,"Lecture Notes in Computer Science. New York: Springer-Verlag, 1974, vol. 18, 2nd corrected ed., 1976.
[14] E. Kant, "On the efficient synthesis of efficient programs,"Artif. Intell., vol. 20, no. 3, May 1983.
[15] M. King, "Eurotra: A European system for machine translation," ISSCO, Univ. Geneva, Switzerland, 1980.
[16] K. M. Pitman, "A Fortran→Lisp translator," inProc. 1979 Macsyma Users' Conf., Washington, DC, June 1979.
[17] C. Rich, "Inspection methods in programming," Ph.D. dissertation, Mass, Inst. Technol., Cambridge. MA, MIT/AI/TR-604, June 1981.
[18] C. Rich, "A formal representation for plans in the Programmer's Apprentice," inProc. 7th Int. Joint Conf. Artif. Intell., Vancouver, B.C., Canada, Aug. 1981.
[19] C. Rich, The layered architecture of a system for reasoning about programs," inProc. 9th Int. Joint Conf. Artif. Intell., Los Angeles, CA, Aug. 1985.
[20] G. G. Ruth, S. Alter, and W. A. Martin, "A very high level language for business data processing," Mass. Inst. Technol., Cambridge, MA, MIT/LCS/TR-254, 1981.
[21] H. Samet, "Experience with software conversion,"Software--Practice Experience, vol. 11, no. 10, 1981.
[22] J. T. Schwartz, "On programming," Interim Rep. SETL Project, Courant Inst. Math. Sci., New York Univ., New York, June 1975.
[23] D.R. Smith, G. B. Kotik, and S. J. Westfold, "Research on knowledge-based software environments at Kestrel Institute,"IEEE Trans. Software Eng., vol. SE-11, no. 11, pp. 1278-1295, Nov. 1985.
[24] M. F. Smith and B. E. Luff, "Automatic assembler source translation from the Z80 to the MC6809,"IEEE Micro, vol. 4, no. 2, Apr. 1984.
[25] G. L. Steele, Jr.,Common Lisp The Language. Burlington, MA: Digital Press, 1984.
[26] R. Taylor and P. Lemmons, "Upward migration part 1: Translators,"Byte, vol. 7, no. 4, June 1983.
[27] A. B. Tucker, Jr., "A perspective on machine translation: Theory and practice,"Commun. ACM, vol. 27, no. 4, Apr. 1984.
[28] R. C. Waters, "A method for analyzing loop programs,"IEEE Trans. Software Eng., vol. SE-5, no. 3, May 1979.
[29] R. C. Waters, "The programmers' apprentice: A session with KBEmacs,"IEEE Trans Software Eng., vol. SE-11, no. 11, pp. 1296-1320, Nov. 1985.
[30] L. M. Zelinka, "Automated program recognition," Mass. Inst. Technol., Cambridge, MA, MIT/AI/WP-279, Dec. 1985.
[31] Proc. ACM SIGPLAN Symp. Compiler Construction, SIGPLAN Notices, vol. 19, no. 4, June 1984.
[32] Brochures describing various translation products, Cap Gemini Dasd Inc., New York, 1985.
[33] Brochures describing various translation products, Dataware Inc., Orchard Park, NY, 1985.
[34] PDP-11/34 Processor Handbook, Digital Equipment Corp., Maynard, MA, 1976.
[35] Fortran IV Language, pub. C28-6515-6, IBM, White Plains, NY, 1966.
[36] Scientific Subroutine Package Version III Programmer's Manual, pub. GH20-0205-4, IBM, White Plains, NY, 1970.
[37] American National Standard Cobol, pub. GC28-6396-5, IBM, White Plains, NY, 1973.
[38] Military Standard Ada Programming Language, ANSI/MIL-STD- 1815A, U.S. Dep. Defense, Washington, DC, Jan. 1983.

Index Terms:
compilers; knowledge based system; data structures; abstract understanding; reimplementation; Programmer's Apprentice; translator; Cobol; Hibol; business data processing language; PDP-11 object code; Pascal programs; COBOL; data structures; expert systems; Pascal; program compilers; program interpreters
R.C. Waters, "Program Translation Via Abstraction and Reimplementation," IEEE Transactions on Software Engineering, vol. 14, no. 8, pp. 1207-1228, Aug. 1988, doi:10.1109/32.7629
Usage of this product signifies your acceptance of the Terms of Use.