This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Language Design for Program Manipulation
January 1992 (vol. 18 no. 1)
pp. 19-32

The design of procedural and object-oriented programming languages is considered with respect to how easily programs written in those languages can be formally manipulated. Current procedural languages such as Pascal, Modula-2 and Ada; generally support such program manipulations, except for some annoying anomalies and special cases. Three main areas of language design are identified as being of concern from a manipulation viewpoint: the interface between concrete and abstract syntax; the relationship between the abstract syntax and static semantics naming, scoping and typing; and the ability to express basic transformations (folding and unfolding). Design principles are suggested so that the problems identified for current languages can be avoided in the future.

[1] D. E. Knuth, "Structured programming with GOTO statements,"Comput. Surveys, vol. 6, pp. 261-301, Dec. 1974.
[2] H. Partsch and R. Steinbrüggen, "Program transformation systems,"ACM Comput. Surveys, vol. 15, no. 3, pp. 199-236, Sept. 1983.
[3] T. Teitelbaum and T. Reps, "The Cornell Program Synthesizer: A syntax directed programming environment,"Commun. ACM, vol. 24, no. 9, pp. 563-573, Sept. 1981.
[4] R. Bahkle and G. Snelting, "The PSG system: From formal language definitions to interactive programming environment,"ACM Trans. Program. Lang. Syst., vol. 8, pp. 547-576, Oct. 1986.
[5] L. R. Dykes and R. D. Cameron, "Toward high-level editing in syntax-based editors,"Software Eng. J., vol. 5, pp. 237-244, July 1990.
[6] J. Bentley, "Programming pearls--profilers,"Commun. ACM, vol. 30, pp. 587-592, July 1987.
[7] J. Huang, "Program instrumentation and software testing,"Computer, vol. 11, pp. 25-32, Apr. 1978.
[8] E. Bush, "The automatic restructuring of COBOL," inProc. Conf. On Software Maintenance-1985. Los Alamitos, CA: IEEE Computer Soc., 1985, pp. 35-41.
[9] M. Weiser, "Program slicing,"IEEE Trans. Software Eng., vol. SE-10, pp. 352-357, July 1984.
[10] R. A. Freak, "A Fortran to Pascal translator,"Software Practice and Experience, vol. 11, pp. 717-732, July 1981.
[11] B. Krieg-Brückner, "Language comparison and source-to-source translation," inProgram Transformation and Programming Environments, P. Pepper, Ed. New York: Springer-Verlag, 1984, pp. 299-304.
[12] R. D. Cameron, "Software reuse with metaprogramming systems," inProc. 5th Ann. Pacific Northwest Software Quality Conf. 1987, Oct. 1987, pp. 223-232.
[13] B. W. Terry and R. D. Cameron, "Software maintenance using metaprogramming systems," inProc. Conf. on Software Maintenance 1987. Los Alamitos, CA: IEEE Computer Soc., 1987, pp. 115-119.
[14] "Specification for computer programming language Pascal," Int. Standards Organization, ISO 7185, 1983.
[15] B. W. Kernighan and D. M. Ritchie,The C Programming Language. Englewood Cliffs, NJ: Prentice-Hall, 1978.
[16] N. Wirth,Programming in Modula-2, 3rd ed. Berlin: Springer-Verlag, 1985.
[17] "Reference manual for the Ada Programming Language," U.S. Dept. of Defense, ANSI/MIL-STD-1815A-1983, Feb. 1983.
[18] B. Meyers,Object Oriented Software Construction. Englewood Cliffs, NJ: Prentice-Hall, 1988.
[19] L. Cardelliet al., "Modula-3 report," Digital Equip. Corp. Syst. Res. Ctr., Palo Alto, CA, Aug. 1988.
[20] R. M. Burstall, D. B. MacQueen, and D. T. Sannella, "HOPE: an experimental applicative language," inConf. Rec. 1980 Lisp Conf., Jan. 1980, pp. 136-143.
[21] D. A. Turner, "An overview of Miranda,"SIGPLAN Not., vol. 21, pp. 158-166, Dec. 1986.
[22] R. M. Burstall and J. Darlington, "A transformation system for developing recursive programs,"J. ACM, vol. 24, no. 1, pp. 44-67, Jan. 1977.
[23] T. W. Reps and T. Teitelbaum,The Synthesizer Generator: A System For Constructing Language-Based Editors. New York: Springer-Verlag, 1988.
[24] A. V. Aho and J. D. Ullman,The Theory of Parsing, Translation, and Compiling, Vol. 1: Parsing. Englewood Cliffs, NJ: Prentice-Hall, 1972.
[25] S. C. Johnson, "YACC: yet another compiler-compiler," Bell Labs., Murray Hill, NJ, Tech. Rep. 32, 1978.
[26] R. D. Cameron and M. R. Ito, "Grammar-based definition of metaprogramming systems,"ACM Trans. Program. Languages Syst., vol. 6, pp. 20-54, Jan. 1984.
[27] O. L. Madsen and C. Norgaard, "An object-oriented metaprogramming system," inProc. 21st Ann. Hawaii Int. Conf. on Software Track, B. Shriver, Ed. Los Alamitos, CA: IEEE Computer Soc., 1988, pp. 406-415.
[28] G. Goos, W. A. Wulf, A. Evans, Jr., and K. J. Butler,28: An Intermediate Language for Ada(Lecture Notes in Computer Sci., vol. 161). Berlin: Springer-Verlag, 1983.
[29] T. Reps and T. Teitelbaum, "The synthesizer generator," inProc. ACM SIGSOFT/SIGPLAN Software Eng. Symp., 1984, pp. 41-48.
[30] E. A. T. Merks, "Acer: manipulation principles applied to language design," Ph.D. degree work in progress, School of Comput. Sci., Simon Fraser Univ., Burnaby, BC, Can.
[31] L. Cardelli, "Typeful programming," Digital Equip. Corp. Syst. Res. Ctr., Palo Alto, CA, Tech. Rep. 45, May 1989.
[32] P. Grogono, "32, assertions, and pragmas,"SIGPLAN Not., vol. 24, pp. 79-84, Mar. 1989.
[33] M. J. Kaelbling, "Programming languages should not have comment statements,"SIGPLAN Not., vol. 23, pp. 59-60, Oct. 1988.
[34] B. Stroustrup,The C++ Programming Language. Reading, MA: Addison-Wesley, 1986.
[35] V. Donzeau-Gouge, G. Kahn, B. Lang, and B. Melese, "Documents structure and modularity in mentor," inACM SIGSOFT/SIGPLAN Software Engineering Symp. Practical Software Development Environments, Pittsburgh, PA, Apr. 1984, pp. 141-148; see alsoSIGSOFT Eng. Notes, vol. 9, no. 3, May 1984, see alsoSIGPLAN Notices, vol. 19, no. 5, May 1984.
[36] D. E. Knuth, "Semantics of context-free languages,"Math. Syst. Theory, vol. 2, no. 2, pp. 127-145, 1968.
[37] J. M. Dyck, "Syntactic manipulation systems for context-dependent languages," Master's thesis, School of Comput. Sci., Simon Fraser Univ., Burnaby, BC, Can., Aug. 1990.
[38] T. Reps,Generating Language-Based Environments. Cambridge, MA: MIT Press, 1984.
[39] B. Liskovet al., CLU Reference Manual(Lecture Notes in Computer Sci., vol. 114). Berlin: Springer-Verlag, 1981.
[40] L. Cardelli and P. Wegner, "On understanding types, data abstraction, and polymorphism,"ACM Comput. Surveys, vol. 17, pp. 472-522, Dec. 1985.
[41] F. Baueret al., Toward a Wide Spectrum Language to Support Program Specification and Program Development(Lecture Notes in Computer Sci.). Berlin: Springer-Verlag, 1979.
[42] E. A. T. Merks, "Compilation using multiple source-to-source stages," Master's thesis, School of Comp. Sci., Simon Fraser Univ., Burnaby, BC, Can., Apr. 1987.
[43] R. Kelsey and P. Hudak, "Realistic compilation by program transformation," inProc. 16th Ann. ACM Symp. on Principles of Program. Languages, Jan. 1989, pp. 281-292.

Index Terms:
program manipulation; object-oriented programming languages; procedural languages; Pascal; Modula-2; Ada; program manipulations; language design; abstract syntax; static semantics; naming; scoping; typing; unfolding; high level languages; object-oriented programming; software engineering
Citation:
E.A.T. Merks, J.M. Dyck, R.D. Cameron, "Language Design for Program Manipulation," IEEE Transactions on Software Engineering, vol. 18, no. 1, pp. 19-32, Jan. 1992, doi:10.1109/32.120313
Usage of this product signifies your acceptance of the Terms of Use.