Advertisement

Generation of incremental indirect threaded code for language-based programming environments

  • Khalid Azim mughal
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 371)

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).

Keywords

Code Fragment Denotational Semantic Loop Body Joint Issue Attribute Grammar 
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

  1. [Alberga et al. 1984]
    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.Google Scholar
  2. [Bahlke & Snelting 1985]
    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.)Google Scholar
  3. [Bell 1973]
    Bell, J.R. Threaded Code. Communications of the ACM 16, 6 (June 1973), 370–372.Google Scholar
  4. [Delisle et al. 1984]
    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.)Google Scholar
  5. [Dewar 1975]
    Dewar, R.B.K. Indirect Threaded Code. Communications of the ACM, 18, 6 (June 1975), 330–331.Google Scholar
  6. [Fischer et al. 1984]
    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.)Google Scholar
  7. [Ford & Sawamiphakdi 1985]
    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.Google Scholar
  8. [Fritzson 1984]
    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.)Google Scholar
  9. [Habermann et al. 1982]
    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.Google Scholar
  10. [Henson & Turner 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.Google Scholar
  11. [Kaiser 1986]
    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.)Google Scholar
  12. [Kastens et al. 1982]
    Kastens, U., Hutt, B., and Zimmermann, E. Lecture Notes in Computer Science, vol.141: GAG: A Practical Compiler Generator. Springer-Verlag, New York, 1982.Google Scholar
  13. [Knuth 1968]
    Knuth, D.E. Semantics of context-free languages. Mathematical Systems Theory 2, 2 (June 1968), 127–145.Google Scholar
  14. [Milos et al. 1984]
    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.Google Scholar
  15. [Mosses 1976]
    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.Google Scholar
  16. [Mughal 1988]
    Generation of Runtime Facilities for Program Editors. Dr.scient. thesis, Dept. of Informatics, University of Bergen, Norway, May 1988.Google Scholar
  17. [Nori et al. 1975]
    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.Google Scholar
  18. [Pal 1986]
    Pal, A.A. Generating Execution Facilities for Integrated Programming Environments. Ph.D. dissertation, Dept. of Computer Science, University of Wisconsin-Madison, Wisc., 1986.Google Scholar
  19. [Paulsen 1981]
    Paulsen, L. A compiler generator for semantic grammars. Ph.D. dissertation, Dept. of Computer Science, Stanford University, Calif., 1981.Google Scholar
  20. [Reiss 1984a]
    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.)Google Scholar
  21. [Reiss 1984b]
    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).Google Scholar
  22. [Reppy & Kintala 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.Google Scholar
  23. [Reps 1983]
    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.Google Scholar
  24. [Reps 1984]
    Reps, T. Generating Language-Based Environments. M.I.T.Press, Cambridge, Mass., 1984.Google Scholar
  25. [Reps & Teitelbaum 1987]
    Reps, T. and Teitelbaum, T. The Synthesizer Generator Reference Manual. 2nd Ed., Dept. of Computer Science, Cornell University, Ithaca, N.Y., July 1987.Google Scholar
  26. [Reps & Teitelbaum 1988]
    Reps, T. and Teitelbaum, T. The Synthesizer Generator. Springer-Verlag. To be published in fall 1988.Google Scholar
  27. [Räihä 1984]
    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.Google Scholar
  28. [Schwartz et al. 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).Google Scholar
  29. [Sethi 1983]
    Sethi, R. Control Flow Aspects of Semantic Directed Compiling. ACM TOPLAS 5, 4 (October 1983), 554–595.Google Scholar
  30. [Stoy 1977]
    Stoy, J.E. Denotational Semantics. MIT Press, Cambridge, Mass., 1977.Google Scholar
  31. [Teitelbaum & Reps 1981]
    Teitelbaum, T. and Reps, T. The Cornell Program Synthesizer: a syntax-directed programming environment. Communications of ACM 24, 9 (September, 1981) 563–573.Google Scholar
  32. [Teitelbaum et al. 1987]
    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.Google Scholar
  33. [Teitelbaum et al. 1988]
    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.Google Scholar
  34. [Watt & Madsen 1983]
    Watt, D.A., and Madsen, O.L. Extended Attribute Grammars The Computer Journal, Vol. 26, No. 2, 1983, 142–153.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1989

Authors and Affiliations

  • Khalid Azim mughal
    • 1
  1. 1.Department of InformaticsUniversity of BergenBergenNorway

Personalised recommendations