Abstract
We present an approach to generating incremental threaded code for language-based programming environments from the specification of the runtime semantics of the programming language. Language-based environments (LBEs) that support incremental code generation have usually done so using ad hoc techniques for incremental recompilation. Our aim is to provide one uniform operational model based on attribute grammars that allows the specification of the runtime semantics, and thus code generation, to be incorporated with the specification of the syntax and static semantics of the language.
The proposed semantic model of incremental code generation allows specification of compact code. It severely limits the repropagation of semantic information in the program tree due to changes in the code caused by modifications to the source program. Extended with interactive execution, this representation also facilitates the implementation of such debugging features as control-flow tracing, single-stepping and value-monitoring at the source level.
We have demonstrated the feasibility of the proposed model by implementing a program editor for Pascal. The specification is written in the Synthesizer Specification Language (SSL) and forms the input to the Cornell Synthesizer Generator (CSG).
This work was partially supported by the Norwegian Research Council of Sciences and Humanities.
This paper is based on excerpts from the author's dr. scient thesis [Mughal 1988].
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
8 References
Alberga, C.N., Brown, A.L., Leeman, Jr. G.B., Mikelsons, M., and Wegman, M.N. A Program Development Tool. IBM J. Res. Develop., Vol. 28, No. 1, January 1984, 60–73.
Bahlke, R. and Snelting, G. The PSG — Programming System Generator. In Proceedings of the ACM SIGPLAN '85 Symposium on Language Issues in Programming Environments, Seattle, WA., June 25–28, 1985, 28–33. (SIGPLAN Notices 20, 7, July 1985.)
Bell, J.R. Threaded Code. Communications of the ACM 16, 6 (June 1973), 370–372.
Delisle, N. M., Menicosy, D. E., and Schwartz, M. D. Viewing a Programming Environment as a Single Tool. In Proceedings of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, Pittsburgh, Penn., April 23–25, 1984, 49–56. (Joint issue: SIGPLAN Notices 19, 5, May 1984, and Software Engineering 9, 3, May 1984.)
Dewar, R.B.K. Indirect Threaded Code. Communications of the ACM, 18, 6 (June 1975), 330–331.
Fischer, C.N., Pal, A., Stock, D.L., Johnson, G.F., and Mauney, J. The POE Language-based Editor Project. In Proceedings of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, Pittsburgh, Penn., April 23–25, 1984, 21–29. (Joint issue: SIGPLAN Notices 19, 5, May 1984, and Software Engineering 9, 3, May 1984.)
Ford, R. and Sawamiphakdi, D. A Greedy Concurrent Approach to Incremental Code Generation. In Proceedings of the 12th Annual ACM Symposium on Principles of Programming Languages, New Orleans, Louisiana, January 14–16, 1985, 165–178.
Fritzson, P. Preliminary Experience from the DICE system: a Distributed Incremental Compiling Environment. In Proceedings of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, Pittsburgh, Penn., April 23–25, 1984, 113–123. (Joint issue: SIGPLAN Notices 19, 5, May 1984, and Software Engineering 9, 3, May 1984.)
Habermann, A. N., Ellison, R., Medina-Mora, R., Feiler, P., Notkin, D.S., Kaiser, G.E., Garlan D.B., and Popvich, S. The Second Compendium of Gandalf Documentation. Dept. of Computer Science, Carnegie-Mellon University, 1982.
Henson, M.C.and Turner, R. Completion Semantics and Interpreter Generation. In Conference Record of the 9th. ACM Symposium on Principles of Programming Languages, Albuquerque, N.M., January 25–27, 1982, 242–254.
Kaiser, G.E. Generation of Runtime Environments. In Proceedings of the SIGPLAN '86 SYMPOSIUM ON COMPILER CONSTRUCTION, Palo Alto, Calif., June 25–27, 1986, 51–57. (SIGPLAN Notices 21, 7, July 1986.)
Kastens, U., Hutt, B., and Zimmermann, E. Lecture Notes in Computer Science, vol.141: GAG: A Practical Compiler Generator. Springer-Verlag, New York, 1982.
Knuth, D.E. Semantics of context-free languages. Mathematical Systems Theory 2, 2 (June 1968), 127–145.
Milos, D., Pleban, U., and Loegel, G. Direct Implementation of Compiler Specifications or The Pascal P-Code Compiler Revisited. In Conference Record of the 11th. ACM Symposium on Principles of Programming Languages, Salt Lake City, Utah, January 15–18, 1984, 196–207.
Mosses, P.D. Compiler Generation Using Denotational Semantics. Mathematical Foundations of Computer Science, Lecture Notes in Computer Science, Springer-Verlag, New York, 1976, 536–441.
Generation of Runtime Facilities for Program Editors. Dr.scient. thesis, Dept. of Informatics, University of Bergen, Norway, May 1988.
Nori, K.V., Amman, U., Jensen, K., Nageli, H.H., and Jacobi, Ch. The Pascal 〈P〉 Compiler: Implementation Notes. Revised Edition.Instituts fur Informatik, Eidgenossische Technishe Hochschule, Zurich, 1975.
Pal, A.A. Generating Execution Facilities for Integrated Programming Environments. Ph.D. dissertation, Dept. of Computer Science, University of Wisconsin-Madison, Wisc., 1986.
Paulsen, L. A compiler generator for semantic grammars. Ph.D. dissertation, Dept. of Computer Science, Stanford University, Calif., 1981.
Reiss, S. P. Graphical Program Development with the PECAN Program Development Systems. In Proceedings of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, Pittsburgh, Penn., April 23–25, 1984, 30–41. (Joint issue: SIGPLAN Notices 19, 5, May 1984, and Software Engineering 9, 3, May 1984.)
Reiss, S. P. An Approach to Incremental Compilation. In Proceedings of the SIGPLAN '84 SYMPOSIUM ON COMPILER CONSTRUCTION, Montreal, Canada, June 17–22, 1984, 144–156. (SIGPLAN Notices 19, 6, June 1984).
Reppy, J.H. and Kintala, C.M.R. Generating Execution Facilities for Integrated Programming Environments. Technical Memorandum, AT&T Bell Laboratories, Murray Hill, 1984.
Reps, T. Static-semantic analysis in language-based editors. In Digest of Papers of the IEEE Spring CompCon 83, San Francisco, Calif., Mar. 1983., 411–414.
Reps, T. Generating Language-Based Environments. M.I.T.Press, Cambridge, Mass., 1984.
Reps, T. and Teitelbaum, T. The Synthesizer Generator Reference Manual. 2nd Ed., Dept. of Computer Science, Cornell University, Ithaca, N.Y., July 1987.
Reps, T. and Teitelbaum, T. The Synthesizer Generator. Springer-Verlag. To be published in fall 1988.
Räihä, K.J. Attribute Grammar Design Using the Compiler Writing System HLP. Methods and Tools for Compiler Construction, B. Lorho (ed.), Cambridge University Press, 1984.
Schwartz, M. D., Delisle, N. M., and Begwani, V. S. Incremental Compilation in Magpie. In Proceedings of the SIGPLAN '84 SYMPOSIUM ON COMPILER CONSTRUCTION, Montreal, Canada, June 17–22, 1984, 122–131. (SIGPLAN Notices 19, 6, June 1984).
Sethi, R. Control Flow Aspects of Semantic Directed Compiling. ACM TOPLAS 5, 4 (October 1983), 554–595.
Stoy, J.E. Denotational Semantics. MIT Press, Cambridge, Mass., 1977.
Teitelbaum, T. and Reps, T. The Cornell Program Synthesizer: a syntax-directed programming environment. Communications of ACM 24, 9 (September, 1981) 563–573.
Teitelbaum, T., Mughal, K., and Ball, T. A Pascal editor with full static-semantic checking. Included with the Cornell Synthesizer Generator, Release 2.0. Dept. of Computer Science, Cornell University, Ithaca, N.Y., July 1987.
Teitelbaum, T., Mughal, K., and Ball, T., Belmonte, M. and Schoaff, P. A Pascal editor with execution and debugging facilities. To be included with the Cornell Synthesizer Generator release. Dept. of Computer Science, Cornell University, Ithaca, N.Y., fall 1988.
Watt, D.A., and Madsen, O.L. Extended Attribute Grammars The Computer Journal, Vol. 26, No. 2, 1983, 142–153.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1989 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
mughal, K.A. (1989). Generation of incremental indirect threaded code for language-based programming environments. In: Hammer, D. (eds) Compiler Compilers and High Speed Compilation. CCHSC 1988. Lecture Notes in Computer Science, vol 371. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-51364-7_18
Download citation
DOI: https://doi.org/10.1007/3-540-51364-7_18
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-51364-3
Online ISBN: 978-3-540-46200-2
eBook Packages: Springer Book Archive