skip to main content
article
Open Access

Incremental dynamic semantics for language-based programming environments

Published:01 April 1989Publication History
Skip Abstract Section

Abstract

Attribute grammars are a formal notation for expressing the static semantics of programming languages—those properties that can be derived from inspection of the program text. Attribute grammars have become popular as a mechanism for generating language-based programming environments that incrementally perform symbol resolution, type checking, code generation, and derivation of other static semantic properties as the program is modified. However, attribute grammars are not suitable for expressing dynamic semantics—those properties that reflect the history of program execution and/or user interactions with the programming environment. This paper presents action equations, an extension of attribute grammars suitable for specifying the static and the dynamic semantics of programming languages. It describes how action equations can be used to generate language-based programming environments that incrementally derive static and dynamic properties as the user modifies and debugs th e program.

References

  1. 1 AMBRIOLA, V., KAISER, G. E., AND ELLISON, R.J. An action routine model for ALOE. Tech. Rep. CMU-CS-84-156, Carnegie Mellon Univ., Dept. of Computer Science, Aug. 1984.Google ScholarGoogle Scholar
  2. 2 ARCHER, J. E., JR., AND DEVLIN, U.T. Rational's experience using Ada for very large systems. In First International Conference on Ada Programming Language Applications for the NASA Space Station (Houston, Tex., June 1986). NASA, 1986, pp. B.2.5.1-B.2.5.11.Google ScholarGoogle Scholar
  3. 3 BAHLKE, R., AND SNELTING, C. The PSG system: from formal language definitions to interactive programming environments. ACM Trans. Program. Lang. Syst. 8, 4 (Oct. 1986), 547-576. Google ScholarGoogle Scholar
  4. 4 BALZER, R. A 15 year perspective on automatic programming. IEEE Trans. Softw. Eng. SE-11, 11 (Nov. 1985), 1257-1268. Google ScholarGoogle Scholar
  5. 5 BARBUTI, R., BELLIA, M., DEGANO, P., LEVI, G., DAMERI, E., SIMONELLI, C., AND MARTELL{, A. Programming environment generation based on denotational semantics. In Theory and Practice of Software Technology. North-Holland, New York, 1983.Google ScholarGoogle Scholar
  6. 6 BODWlN, J., BRADLEY, L., KANDA, K., LITLE, D., AND PLEBAN, U. Experience with an experimental compiler generator based on denotational semantics. In SIGPLAN '82 Symposium on Compiler Construction (Boston, Mass., June 1982). ACM, New York, 1982, pp. 216-229. Google ScholarGoogle Scholar
  7. 7 DELISLE, N. M., MEN1COSY, D. r., AND SCHWARTZ, M.D. Viewing a programming environment as a single tool. In SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments (Pittsburgh, Pa., April 1984), ACM, New York, 1984, pp. 49-56. Google ScholarGoogle Scholar
  8. 8 DEMERS, A., REPS, T., AND TEITELBAUM, T. Incremental evaluation for attribute grammars with applications to syntax-directed editors. In 8th Annual ACM Symposium on Principles of Programming Languages (Williamsburg, Va., Jan. 1981). ACM, New York, 1981, pp. 105-116. Google ScholarGoogle Scholar
  9. 9 DEMERS, A., ROGERS, A., AND ZADECK, F.K. Attribute propagation by message passing. In SIGPLAN '85 Symposium on Language Issues in Programming Environments (Seattle, Wash., June 1985). ACM, New York, 1985, pp. 48-59. Google ScholarGoogle Scholar
  10. 10 DESPEYROUX, V. Executable specification of static semantics. In Semantics of Data Types International Symposium, Lecture Notes in Computer Science 173. Springer, New York, 1984, pp. 215-233.Google ScholarGoogle Scholar
  11. 11 DONZEAU-GOUGE, V., HUET, G., KAHN, G., AND LANG, B. Programming environments based on structured editors: the Mentor experience. In Interactive Programming Environments, D. R. Barstow, H. E. Shrobe, and E. Sandewall, Eds. McGraw-Hill, New York, 1984, pp. 128-140.Google ScholarGoogle Scholar
  12. 12 DONZEAU=GOUGE, V., KAHN, G., LANG, l~., AND MELESE, B. Documents structure and modularity in Mentor. In SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments (Pittsburgh, Pa., April 1984). ACM, New York, 1984, pp. 141-148. Google ScholarGoogle Scholar
  13. 13 ENGELS, C., GALL, R., NAGL, M., AND SCHAFER, W. Software specification using graph grammars. Computing 31 (1983), 317-346.Google ScholarGoogle Scholar
  14. 14 FARROW, R. Generating a production compiler from an attribute grammar. IEEE Softw. 1, 4 (Oct. 1984), 77-93.Google ScholarGoogle Scholar
  15. 15 FARROW, R. Automatic generation of fixed-point-finding evaluators for circular, but welldefined, attribute grammars. In SIGPLAN '86 Symposium on Compiler Construction (Palo Alto, Calif., June 1986). ACM, New York, 1986, pp. 85-98. Google ScholarGoogle Scholar
  16. 16 FEILER, P. H. LOIPE a language-oriented interactive programming environment based on compilation technology. Ph.D. dissertation, Carnegie Mellon Univ. Tech. Rep. CMU-CS-82-117, May 1982. Google ScholarGoogle Scholar
  17. 17 FELLER, P. H., JALILI, F., AND SCHLICHTER, J.H. An interactive prototyping environment for language design. In 19th Hawaii International Conference on System Sciences (Honolulu, Hawaii, Jan. 1986). pp. 106-116.Google ScholarGoogle Scholar
  18. 18 FELLER, P. H., AND MEDINA-MORA, R. An incremental programmingenvironment. IEEE Trans. Softw. Eng. SE-7, 5 (Sept. 1981), 472-482.Google ScholarGoogle Scholar
  19. 19 FREEMAN, P. A conceptual analysis of the Draco approach to constructing software systems. IEEE Trans. Softw. Eng. SE-13, 7 (July 1987), 830-844. Google ScholarGoogle Scholar
  20. 20 GANZlNGER, H., RIPKEN, K., AND WILHELM, R. Automatic generation of optimizing multipass compilers. Information Processing 77 (New York, 1977). North-Holland, Amsterdam, 1977, pp. 535-540.Google ScholarGoogle Scholar
  21. 21 GARLAN, D. Flexible unparsing in a structure editing environment. Tech. Rep. CMU-CS-85- 129, Dept. of,Computer Science, Carnegie Mellon Univ., April 1985.Google ScholarGoogle Scholar
  22. 22 GARLAN, D. Views for tools in integrated environments. Ph.D. dissertation, Tech. Rep. CMU- CS-87-147, Carnegie Mellon Univ., May, 1987. Google ScholarGoogle Scholar
  23. 23 GHEZZI, C., AND MANDRIOLI, D. Augmenting parsers to support incrementality, d. ACM 27, 3 (July 1980), 564-579. Google ScholarGoogle Scholar
  24. 24 HABERMANN, A. N., AND NOTKIN, D. Gandalf: Software development environments. IEEE Trans. Softw. Eng. SE-12, 12 (Dec. 1986), 1117-1127. Google ScholarGoogle Scholar
  25. 25 HENDERSON, P., AND WEISER, U. Continuous execution: The VisiProg environment. In Eighth International Conference on Software Engineering (London, Aug. 1985). IEEE, New York, 1985, pp. 68-74. Google ScholarGoogle Scholar
  26. 26 HOOVER, R. Dynamically bypassing copy rule chains in attribute grammars. In Thirteenth Annual ACM Symposium on Principles of Programming Languages (St. Petersburg, Fla., Jan. 1986). ACM, New York, 1986, pp. 14-25. Google ScholarGoogle Scholar
  27. 27 HOOVER, R., AND TEITELBAUM, T. Efficient incremental evaluation of aggregate values in attribute grammars. In SIGPLAN '86 Symposium on Compiler Construction (Palo Alto, Calif., June 1986). ACM, New York, 1986, pp. 39-50. Google ScholarGoogle Scholar
  28. 28 HORWITZ, S., AND TEITELBAUM, T. Generating editing environments based on relations and} attributes. ACM Trans. Program. Lang. Syst. 8, 4 (Oct. 1986), 577-608. Google ScholarGoogle Scholar
  29. 29 HUDSON, S. E., AND KING, R. Implementing a user interface as a system of attributes. In SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments (Palo Alto, Calif., Dec. 1986). ACM, New York, 1986, pp. 143-149. Google ScholarGoogle Scholar
  30. 30 JAZ^~ERI, M., OGDEN, W. F., AND ROUNDS, W.C. The intrinsically exponential complexity of the circularity problem for attribute grammars. Commun. ACM 18, 12 (Dec. 1975), 697-706. Google ScholarGoogle Scholar
  31. 31 JOHNSON, G.F. GL--a denotational testbed with continuations and partial continuations as first-class objects. In SIGPLAN '87 Symposium on Interpreters and Interpretive Techniques (St. Paul, Minn., June 1987). ACM, New York, 1987, pp. 165-176. Google ScholarGoogle Scholar
  32. 32 JOHNSON, C. r., AND FISCHER, C~ N. Non-syntactic attribute flow in language based editors. In 9th Annual A CM Symposium on Principles of Programming Languages (Albuquerque, N. Mex. Jan. 1982). ACM, New York, 1982, pp. 185-195. Google ScholarGoogle Scholar
  33. 33 JOHNSON, G. F., AND FISCHER, C.N. A meta-language and system for nonlocal incremental attribute evaluation in language-based editors. In 12th Annual ACM Symposium on Principles of Programming Languages (New Orleans, La., Jan. 1985). ACM, New York, 1985, pp. 141-151. Google ScholarGoogle Scholar
  34. 34 JOHNSON, S. C., AND LEAK, M.E. Language development tools. Bell Syst. Tech. J. 57, 6 (July- Aug. 1978), 2155-2175.Google ScholarGoogle Scholar
  35. 35 KAmER, G. E. Semantics of structure editing environments. Ph.D. dissertation, Tech. Rep. CMU-CS-85-131, Carnegie Mellon Univ., May 1985.Google ScholarGoogle Scholar
  36. 36 KAISER, G.E. Concurrent meld. In Workshop on Object-Based Concurrent Programming (Sept. 1988). Google ScholarGoogle Scholar
  37. 37 KAISER, G. E., FEILER, P. H., JALILI, F., AND SCHLICHTER, J.H. A retrospective on DOSE: an interpretive approach to structure editor generation. Softw. Pract. Exper. 18, 8 (Aug. 1988), 733-748. Google ScholarGoogle Scholar
  38. 38 KAISER, G. E., AND GARLAN, D. Melding software systems from reusable building blocks. IEEE Softw. (July 1987), 17-24.Google ScholarGoogle Scholar
  39. 39 KAISER, G. E., AND KANT, E. Incremental parsing without a parser. J. Syst. Softw. 5, 2 (May 1985), 121-144.Google ScholarGoogle Scholar
  40. 40 KAISER, G. E., AND KAPLAN, S.M. Rapid prototyping of concurrent programming languages. In 8th International Conference on Distributed Computing Systems (San Jose, Calif., June 1988). IEEE, New York, 1988, pp. 250-255.Google ScholarGoogle Scholar
  41. 41 KAISER, G. E., KAPLAN, S. M., AND MICALLEF, J. Multiuser, distributed language-based environments. IEEE Softw. (Nov. 1987), 58-67.Google ScholarGoogle Scholar
  42. 42 KASTENS, U., HUTT, B., AND ZIMMERMANN, E. GAG: A Practical Compiler Generator. Lecture Notes in Computer Science, 141. Springer-Verlag, Heidelberg, 1982.Google ScholarGoogle Scholar
  43. 43 KNUTH, D.E. Semantics of context-flee languages. Math. Syst. Theor. 2, 2 (June 1968), 127- 145.Google ScholarGoogle Scholar
  44. 44 LAMB, D.A. IDL: sharing intermediate representations. ACM Trans. Program. Lang. Syst. 9, 3 (July 1987), 297-318. Google ScholarGoogle Scholar
  45. 45 MEDINA-MORA, R. Syntax-directed editing: towards integrated programming environments. Ph.D. dissertation, Tech. Rep. CMU-CS-82-113, Carnegie Mellon Univ., March 1982. Google ScholarGoogle Scholar
  46. 46 NOTKIN, n.S. Interactive structure-oriented computing. Ph.D. dissertation, Tech. Rep. CMU- CS-84-103, Carnegie Mellon Univ., Feb. 1984. Google ScholarGoogle Scholar
  47. 47 PARTSCH, H., AND STEINBRUGGEN, R. Program transformation systems. Comput. Surv. 15, 3 (Sept. 1983), 199-236. Google ScholarGoogle Scholar
  48. 48 PAULSON, L. A semantics-directed compiler generator. In 9th Annual ACM Symposium on Principles of Programming Languages (Albuquerque, N. Mex., Jan. 1982). ACM, New York, 1982, pp. 224-233. Google ScholarGoogle Scholar
  49. 49 RASKOVSKY, M.R. Denotational semantics as a specification of code generators. In S1GPLAN '82 Symposium on Compiler Construction (Boston, Mass., June 1982). ACM, New York, 1982, pp. 230-244. Google ScholarGoogle Scholar
  50. 50 REISS, S. P. Graphical program development with PECAN program development systems. In SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments (Pittsburgh, Pa., April 1984). ACM, New York, 1984, pp. 30-41. Google ScholarGoogle Scholar
  51. 51 REISS, S.P. An approach to incremental compilation. In S1GPLAN '84 Symposium on Compiler Construction (Montreal, June 1984). ACM, New York, 1984, pp. 144-156. Google ScholarGoogle Scholar
  52. 52 REPS, T., MARCEAU, C., AND TE1TELBAUM, T. Remote attribute updating for language-based editors. In 131h Annual ACM Symposium on Principles of Programming Languages (St. Petersburg, Fla., Jan. 1986). ACM, New York, 1986, pp. 1-13. Google ScholarGoogle Scholar
  53. 53 REPS, T., AND TEITELSAUM, T. The Synthesizer Generator. In SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments (Pittsburgh, Pa., April 1984). ACM, New York, 1984, pp. 41-48. Google ScholarGoogle Scholar
  54. 54 REPS, T., TEITELBAUM, T., AND DEMERS, A. Incremental context-dependent analysis for language-based editors. ACM Trans. Program. Lang. Syst. 5, 3 (July 1983), 449-477. Google ScholarGoogle Scholar
  55. 55 SCOTT, n., AND STRACHEY, C. Toward a mathematical semantics for computer languages. Tech. Rep. Tech. Monograph PRG-6, Oxford Univ. Computing Lab., Aug. 1971.Google ScholarGoogle Scholar
  56. 56 SHEBS, S., AND KESSLER, R. Automatic design and implementation of language datatypes. In SIGPLAN '87 Symposium on Interpreters and Interpretive Techniques (St. Paul, Minn., June 1987). ACM, New York, 1987, pp. 26-37. Google ScholarGoogle Scholar
  57. 57 SMITH, D. R., KOTIK, G. B., AND WESTFOLD, S.J. Research on knowledge-based software environments at Kestrel Institute. IEEE Trans. Softw. Eng. SE-11, 11 (Nov. 1985), 1278-1295. Google ScholarGoogle Scholar
  58. 58 SNODORASS, R., AND SHANNON, K. Supporting flexible and efficient tool integration. In Advanced Programming Environments. Lecture Notes in Computer Science, 244. R. CONRADI, T. U. DIDRIKSEN, AND n. H. WANVIK, Eds. Springer-Verlag, Berlin, 1986, pp. 290-313. Google ScholarGoogle Scholar
  59. 59 TEITELBAUM, V., AND REPS, T. The Cornell Program Synthesizer: A syntax-directed programming environment. Commun. ACM 24, 9 (Sept. 1981), 563-573. Google ScholarGoogle Scholar
  60. 60 TEITELMAN, W., AND MASINTER, L. The Interlisp programming environment. IEEE Comput. 14, 4 (April 1981), 25-34.Google ScholarGoogle Scholar
  61. 61 WALZ, J. A., AND JOHNSON, C.F. Incremental evaluation for a general class of circular attribute grammars. In SIGPLAN '88 Conference on Programming Language Design and Implementation (Atlanta, Ga., June 1988). ACM, New York, 1988, pp. 209-221. Google ScholarGoogle Scholar
  62. 62 WATERS, R.C. KBEmacs: Where's the AI?. AI Mag. VII, I (Spring 1986), 47-56. Google ScholarGoogle Scholar
  63. 63 WEGMAN, M.N. Parsing for structural editors. In 21st Annual Symposium on Foundations of Computer Science (Oct. 1980). IEEE, New York, pp. 320-327.Google ScholarGoogle Scholar

Index Terms

  1. Incremental dynamic semantics for language-based programming environments

                  Recommendations

                  Reviews

                  Carlo Ghezzi

                  This paper addresses the processing performed by language-based programming environments. In particular, it shows how attribute grammars may be used to express dynamic semantics (i.e., those properties that reflect the history of the program and user interactions with the environment). This point is quite interesting, because attribute grammars have been used in the past only to model static semantics. In order to express dynamic semantics, the author introduces the concept of action equations and shows how to use them in the generation of an environment. The paper is well written, and all those interested in language-based programming environments should read it.

                  Access critical reviews of Computing literature here

                  Become a reviewer for Computing Reviews.

                  Comments

                  Login options

                  Check if you have access through your login credentials or your institution to get full access on this article.

                  Sign in

                  Full Access

                  • Published in

                    cover image ACM Transactions on Programming Languages and Systems
                    ACM Transactions on Programming Languages and Systems  Volume 11, Issue 2
                    April 1989
                    176 pages
                    ISSN:0164-0925
                    EISSN:1558-4593
                    DOI:10.1145/63264
                    Issue’s Table of Contents

                    Copyright © 1989 ACM

                    Publisher

                    Association for Computing Machinery

                    New York, NY, United States

                    Publication History

                    • Published: 1 April 1989
                    Published in toplas Volume 11, Issue 2

                    Permissions

                    Request permissions about this article.

                    Request Permissions

                    Check for updates

                    Qualifiers

                    • article

                  PDF Format

                  View or Download as a PDF file.

                  PDF

                  eReader

                  View online with eReader.

                  eReader