skip to main content
article
Free Access

The Pan language-based editing system

Published:02 January 1992Publication History
Skip Abstract Section

Abstract

Powerful editing systems for developing complex software documents are difficult to engineer. Besides requiring efficient incremental algorithms and complex data structures, such editors must accommodate flexible editing styles, provide a consistent, coherent, and powerful user interface, support individual variations and projectwide configurations, maintain a sharable database of information concerning the documents being edited, and integrate smoothly with the other tools in the environment. Pan is a language-based editing and browsing system that exhibits these characteristics. This paper surveys the design and engineering of Pan, paying particular attention to a number of issues that pervade the system: incremental checking and analysis, information retention in the presence of change, tolerance for errors and anomalies, and extension facilities.

References

  1. 1 ACM. Proceedings of the ACM SIGPLAN SIGOA Symposium on Text Manipulation. SIGPLAN Not. (ACM) 16, 6 (June 1981).Google ScholarGoogle Scholar
  2. 2 AMBRAS, J., AND O'DAY, V. Microscope: A knowledge-based programming environment IEEE Softw. 5, 3 (May 1988), 50-58. Google ScholarGoogle Scholar
  3. 3 ATTALI, I. Compiling TYPOL with attribute grammars In Programming Languages Implementation and Logic Programmzng, P. Deransart, B. Lorho, and J. Maluszfiski, Eds. Lecture Notes in Computer Science, vol. 348. Springer-Verlag, New York, 1988, pp. 252-272. Google ScholarGoogle Scholar
  4. 4 BAECKER, R. M, AND MARCUS, A. Human Factors and Typography for More Readable Programs. ACM Press, New York, 1990 Google ScholarGoogle Scholar
  5. 5 BA~LKE, R., AND SNELTIN~, G. 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
  6. 6 BALLANCE, R. A. Syntactic and semantic checking in language-based editing systems. Ph D. dissertation, Computer Science Division--EECS, Univ of Cahfornia, Berkeley, Dec. 1989. (Available as Tech. Rep. UCB/CSD 89/548.) Google ScholarGoogle Scholar
  7. 7 BALLANCE, R. A., AND GRAHAM, S I~. Incremental consistency maintenance for interactive applicatlons. In Procee&ngs of the 8th Internatmual Conference on Logic Programming, K Furukawa. Ed. MIT Press, Cambridge, Mass, 1991, pp 895-909.Google ScholarGoogle Scholar
  8. 8 BALLANCE, R A., BUTCHER, J., AND GRAHAM, S.L. Grammatical abstraction and incremental syntax analyms in a language-based editor In Proceedings of the SIGPLAN 88 Conference on Programming Language Design and Implementation. SIGPLAN Not. (ACM) 23, 7 (July 1988), 185-198. Google ScholarGoogle Scholar
  9. 9 BALLANCE, R. A., VAN DE VANTER, M. L., AND GRAHAM, S. L. The architecture of Pan I. Tech. Rep. UCB/CSD 88/409, Computer Science Division--EECS, Univ. of California, Berkely, Mar. 1988. Google ScholarGoogle Scholar
  10. 10 BORRAS, P., CLEMENT, D., DESPI~YROUX, T., INCERPI, J., KAHN, G., LANG, B., AND PASCUAL, V CENTAUR: The system. In {27}, pp. 14-24. Google ScholarGoogle Scholar
  11. 11 BUDINSKY, F. J., HOLT, R. C., AND ZAKY, S. G. SRE--A syntax-recognizing editor. Softw. Pract. Exper. 15, 5 (May 1985), 489-497.Google ScholarGoogle Scholar
  12. 12 BUTCHER, J. Ladle. Master's thesis, Computer Science Division--EECS, Univ. of California, Berkeley, Nov. 1989. (Available as Tech. Rep. UCB/CSD 89/519:) Google ScholarGoogle Scholar
  13. 13 CnEN, P., AND HARRISON, M.A. Multiple representation document development. Computer 21, 1 (Jan. 1988), 15-31. Google ScholarGoogle Scholar
  14. 14 CHEN, P., COKER, J., HARRISON, M. A., MCCARRELL, J., AND PROCTER, S. The VORTEX document preparation environment. In Proceedings of the 2nd European Conference on TEX for Scientific Documentation, J. Desarm~nien, Ed., Lecture Notes in Computer Science, vol. 236. Springer-Verlag, New York, 1986, pp. 45-54. Google ScholarGoogle Scholar
  15. 15 COHEN, J. Constraint logic programming languages. Commun. ACM 33, 7 (July 1990), 52-68. Google ScholarGoogle Scholar
  16. 16 CONRADI, R., DIDRIKSEN, W. M., AND WANVIK, D., EDS. Advanced Programming Environments. Lecture Notes in Computer Science, vol. 244. Springer-Verlag. New York, 1986. Google ScholarGoogle Scholar
  17. 17 CORBETT, n.P. Static semantics and compiler error recovery. Ph.D. dissertation, Computer Science Division--EECS, Univ. of California, Berkeley, June 1985. (Available as Tech. Rep. UCB/CSD 85,/251.) Google ScholarGoogle Scholar
  18. 18 DERANSART, P., JOURDAN, M., AND LORHO, B. Attribute Grammars: Definitions, Systems, and Bibliography. Lecture Notes in Computer Science, vol. 323. Springer-Verlag, New York, 1988. Google ScholarGoogle Scholar
  19. 19 DESPEYROUX, T. Executable specification of static semantics. In Semantics of Data Types, G. Kahn, D. B. MacQueen, and G. D. Plotkin, Eds. Lecture Notes in Computer Science, vol. 173. Springer-Verlag, New York, 1984, pp. 215-233.Google ScholarGoogle Scholar
  20. 20 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
  21. 21 DOWNS, L. M., AND VAN DE VANTER, M.L. Pan I version 4.0: An introduction for users. Tech. Rep. UCB/CSD 91/659, Computer Science Division--EECS, Univ. of California, Berkeley, Nov. 1991. Google ScholarGoogle Scholar
  22. 22 DOYLE, J. A truth maintenance system. In Readings in Artificial Intelligence, B. L. Webber and N. J. Nilsson, Eds. Tioga, Palo Alto, Calif., 1981, pp. 496-516.Google ScholarGoogle Scholar
  23. 23 FORSTALL, B.T. Experience with language description mechanisms in Pan. Master's thesis, Computer Science Division--EECS, Univ. of California, Berkeley, Nov. 1991.Google ScholarGoogle Scholar
  24. 24 GARLAN, D. Flexible unparsing in a structure editing environment. Tech. Rep. CMU-CS-85- 129, Dept. of Computer Science, Carnegie-Mellon Univ., Pittsburgh, Pa., Apr. 1985.Google ScholarGoogle Scholar
  25. 25 GOLDBERG, A. Programmer as reader. IEEE Softw. 4, 5 (Sept. 1987), 62-70.Google ScholarGoogle Scholar
  26. 26 H&BERMANN, A. N., AND NOTKIN, D. Gandalf: Software development environments. IEEE Trans. Softw. Eng. SE-12, 12 (Dec. 1986), 1117-1127. Google ScholarGoogle Scholar
  27. 27 HENDERSON, P., ED. ACM SIGSOFT 88: 3rd Symposium on Software Development Environments (Boston, Nov. 28-30, 1988). ACM, New York, 1988. Google ScholarGoogle Scholar
  28. 28 HILFINGER, P. N., AND COLELLA, P. Fidil: A language for scientific programming. In Symbolic Computatmn: Apphcations to Scientific Computing, R. Grossman, Ed. SIAM, Philadelphia, Pa., 1989, pp. 97-138.Google ScholarGoogle Scholar
  29. 29 HOLT, R. W., BOEHM-DAvIS, D. A., AND SCHULTZ, A.C. Mental representations of programs for student and professional programmers. In Empirical Studies of Programmers: Second Workshop, G. M. Olson, S. Sheppard, and E. Soloway, Eds. Ablex, Norwood, N.J., 1987, p, 33. Google ScholarGoogle Scholar
  30. 30 HOOVER, R., AND TEITELBAUM, T. Efficient incremental evaluation of aggregate values in attribute grammars. In Proceedings of the SIGPLAN 86 Symposium on Compiler Construction. SIGPLAN Not. (ACM) 21, 7 (July 1986), 39-50. Google ScholarGoogle Scholar
  31. 31 HORTON, M.R. Demgn of a multi-language editor with static error detection capabilities. Ph.D dissertation, Computer Science Divlsion--EECS, Univ. of Califorma, Berkeley, 1981. Google ScholarGoogle Scholar
  32. 32 Ho~wiTz, 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
  33. 33 JALmI, F., AND GALLIER, J H. Bmlding friendly parsers. In Proceedings of the 9th Annual ACM Symposium on Principles of Programming Languages (Albuquerque, N.M , Jan. 25-27). ACM, New York, 1982, pp. 196-206. Google ScholarGoogle Scholar
  34. 34 KAHN, G. Natural semantics. Tech. Rap. 601, INRIA, Feb. 1987.Google ScholarGoogle Scholar
  35. 35 KAHN, G., LANG, B., MI~LI~SE, B., AND MORCOS, E Metal: A formalism to specify formalisms Sci. Comput. Program. 3, 2 (Aug 1983), 151-188.Google ScholarGoogle Scholar
  36. 36 KAISER, G.E. Semantics for structure editing environments. Ph.D. dmsertation, Dept. of Computer Science, Carnegie-Mellon Univ., Pittsburgh, Pa., May 1985. Google ScholarGoogle Scholar
  37. 37 KmsLIS, P. A C. The SAGA editor: A language-oriented editor based on an incremental LR(1) parser. Ph.D. dissertation, Dept. of Computer Science, Umv. of Illinois at Urbana- Champaign, Dec. 1985.Google ScholarGoogle Scholar
  38. 38 KNUTH, D.E. Literate programming Computer J. 27, 2 (May 1984), 97-111. Google ScholarGoogle Scholar
  39. 39 LAMPSON, B.W. Bravo Users Manual. Palo Alto, 1978.Google ScholarGoogle Scholar
  40. 40 LANG, B. On the usefulness of syntax directed editors. In {t6}, pp 47-51. Google ScholarGoogle Scholar
  41. 41 LETOVSKY, S. Cognitive processes in program comprehension In Empirical Studies of Programmers, E. Soloway and S. Iyengar, Eds. Ablex, Norwood, N J., 1986, pp. 58-79 Google ScholarGoogle Scholar
  42. 42 LETOVSKY, S., AND SOLOWAY, E. Delocalized plans and program comprehension. IEEE Soflw. 3, 3 (May 1986), 41-49Google ScholarGoogle Scholar
  43. 43 LEwIs, C., AND NORMAN, D.A. Demgning for error. In User Centered System Design: New Perspectwes on Human-Computer Interaction, D. A. Norman and S. W. Draper, Eds. Erlbaum, Hillsdale, N J., 1986, pp. 411-432.Google ScholarGoogle Scholar
  44. 44 MASINTER, L. M. Global program analysis in an interactive environment. Tech Rep. SSL-80-1, Xerox Palo Alto Research Center, Palo Alto, Calif., 1980.Google ScholarGoogle Scholar
  45. 45 MEDINA-MORA, R., AND FEILER, P. H. An incremental programming environment IEEE Trans. Soflw. Eng. SE-7, 5 (Sept. 1981), 472-481.Google ScholarGoogle Scholar
  46. 46 NEAL, L.R. Human factors m computing systems and graphical interfaces. In CHI + GI 1987 Conference Proceedings (Toronto, Apr. 5-9, 1987). ACM, New York, 1987, pp. 99-102. Google ScholarGoogle Scholar
  47. 47 NORD, R. L., AND PFENNING, F. The Ergo attribute system. In {27}, pp. 110-120 Google ScholarGoogle Scholar
  48. 48 OMAN, P., AND COOK, C.R. Typographic style ~s more than cosmetic. Commun. ACM 33, 5 (May 1990), 506-520 Google ScholarGoogle Scholar
  49. 49 PLOTK~N, G D. A structural approach to operational semantics Tech. Rep. DAIMI FN-19, Computer Science Dept., Aarhus Univ., Aarhus, Denmark, Sept. 1981.Google ScholarGoogle Scholar
  50. 50 PRAWITZ, D. Natural Deduction: A Proof-Theoretic Study. Almquist and Wlksell, Stockholm, 1965.Google ScholarGoogle Scholar
  51. 51 REIss, S.P. Graphical program development with PECAN program development system. In Proceedings of the A CM SIGSOFT/SIGPLAN Software Engineerzng Symposium on Practical Software Development Environments (Pittsburgh, Pa., Apr. 23-25, 1984). ACM, New York, 1984, pp. 30-41. Google ScholarGoogle Scholar
  52. 52 REPS, T., AND TEITELBAUM, T. The Synthesizer Generator Reference Manual, Second Edition. Dept. of Computer Science, Cornell Univ., Ithaca, N.Y., 1987. Google ScholarGoogle Scholar
  53. 53 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
  54. 54 RICH, C., AND WATERS, R.C. The programmers apprentice: A research overview Computer 21, 11 (Nov. 1988), 10-25. Google ScholarGoogle Scholar
  55. 55 SMITH, B., AND KELLEHER, G., EDS. Reason Maintenance Systems and Their Applications Series in Artificial Intelligence. Ellis Norwood, Chichester, 1988. Google ScholarGoogle Scholar
  56. 56 SOLOWAY, E., AND EHRLICH, K. Empirical studies of programming knowledge. IEEE Trans. Soflw. Eng. SE-10, 5 (Sept. 1984), 595-609.Google ScholarGoogle Scholar
  57. 57 STALLMAN, R. M EMACS: The extensibte, customizable, self-documenting display editor.Google ScholarGoogle Scholar
  58. 58 STEELE, G. L., JR., AND S~JSSMAN, G.J. Constraints. AI Memo 502, Massachusetts Institute of Technology Artificial Intelligence Laboratory, Cambridge, Mass., Nov. 1978.Google ScholarGoogle Scholar
  59. 59 STERLING, L., AND SHAPIRO, E. The Art of Prolog: Advanced Programming Techniques. MIT Press, Cambridge, Mass., 1986. Google ScholarGoogle Scholar
  60. 60 STROMFORS, O. Editing large programs using a structure-oriented text editor. In {16}, pp. 39-46. Google ScholarGoogle Scholar
  61. 61 TEITELBAUM, T., AND REPS, T. The Cornell program synthesizer: A syntax-directed programming environment. Commun. ACM 24, 9 (Sept. 1981), 563-573. Google ScholarGoogle Scholar
  62. 62 TEITELBAUM, T., REPS, T., AND HORWITZ, S. The why and wherefore of the Cornell program synthesizer. In {1}, pp. 8-16. Google ScholarGoogle Scholar
  63. 63 TEITELMAN, W. A tour through Cedar. IEEE Trans. Soflw. Eng. SE-11, 3 (Mar. 1985). Google ScholarGoogle Scholar
  64. 64 VAN DE VANTER, M.L. Error management and debugging in Pan I. Tech. Rep. UCB/CSD 89/554, Computer Science Division--EECS, Univ. of California, Berkeley, Dec. 1989. Google ScholarGoogle Scholar
  65. 65 VAN DE VANTER, M. L. User interface design for language-based editing systems. Ph.D. dissertation, Computer Science Division--EECS, Univ. of California, Berkeley. To be published.Google ScholarGoogle Scholar
  66. 66 VAN DE VANTER, M. L., BALLANCE, R. A., AND GRAHAM, S.L. Coherent user interfaces for language-based editing systems. Int. J. Man-Mach. Stud. (1992). To appear. Google ScholarGoogle Scholar
  67. 67 WATERS, R. C. Program editors should not abandon text oriented commands. SIGPLAN Not. (ACM) 17, 7 (July 1982), 39-46. Google ScholarGoogle Scholar
  68. 68 WINOGRAD, T. Beyond programming languages. Commun. ACM22, 7 (July 1979), 391-401. Google ScholarGoogle Scholar
  69. 69 WOOD, S.R. Z--The 95% program editor. In {1}, pp. 1-7. Google ScholarGoogle Scholar

Index Terms

  1. The Pan language-based editing system

        Recommendations

        Reviews

        Paul W. Abrahams

        An editor is a programmer's most vital tool. Programmers have strong feelings about the editors they use and are sensitive to the quality of those editors. The Pan editor is designed for experienced programmers—software professionals proficient with their primary tools, intimately familiar with their programming languages, and skilled at creating programs in those languages. Judging by the description in this paper, Pan ought to be a programmer's delight. Pan is a syntax-recognizing editor—it combines the freedom and flexibility of a purely textual editor with the contextual awareness of a syntax-directed editor. Its linguistic knowledge is derived from a collection of language descriptions that include both syntactic and semantic information, so it is not inherently limited to a particular language. It can perform syntactic analysis even when the program text is syntactically ill-formed; it views such a program as merely a variant of a correct program, treating the variance as no more important than a spelling error and maintaining a syntactic view of those parts of the document that are not affected by the variance. It provides many of the same key bindings and text services as Emacs, including generalized undo, kill rings, text filling, customization, extension, and self-documentation. Even at the textual level, it has advantages over Emacs; for instance, it provides visual highlighting of selected regions. Lexical and syntactic analysis is handled by the Ladle (Language Description Language) component of Pan, while the checking of contextual semantic constraints is handled by the Colander (Constraint Language and Interpreter) component. Both components have two parts: an online part that is part of the editor itself and an offline part that generates the tables needed by the online part. An editing interface coordinates the analysis and makes derived information accessible to users and client programs. Ladle represents a language grammar as an abstract syntax augmented by additional productions that make it possible to derive the concrete syntax from the abstract syntax. The two syntaxes are related by grammatical abstraction, which ensures that a straightforward and reversible transformation exists between them. Grammatical abstraction is purely structural; it does not use semantic information to identify corresponding structures. Colander is based on the notion of logical constraint grammars, expressed in a Prolog-like language. Using the abstract syntax as a base, Colander provides for annotating production with goals (logical propositions) that must be satisfied if the document is semantically correct. An incremental evaluator monitors changes to the document and the derived information in Colander's database in order to maintain consistency between them. Users typically understand document structure in terms of structural components rather than syntax trees, naming those components using the specific terminology of the document's language. Pan therefore uses operand classes to designate kinds of document components. An operand class is an arbitrary collection of document components; operand classes may overlap. Operand classes define the textual units used for structure-oriented selection, navigation, highlighting, and editing. Expression and Statement are examples of language-specific operand classes. Examples of language-independent operand classes are Syntactic Error and Query Result . Text-oriented and structure-oriented operations combine naturally; for instance, you can move to the next expression and then make arbitrary textual changes to that expression. Despite my favorable impression of Pan, I did not find this paper easy reading. The description of Colander and its constraint grammars, which relies on a knowledge of Prolog, is particularly impenetrable; although I got the general idea of what was going on, I could not make sense of the details. Some of my difficulty was caused by the use of unexplained notations that are not standard Prolog. It is too bad that the authors were not more careful about defining their terminology and notation, since the content of the paper is so clearly worthwhile.

        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

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader