CaminoReal is a system for integrated, interactive, technical documents and computations. It lives in Cedar, the programming environment of Xerox PARC's Computer Science Laboratory, and is used in conjunction with Tioga, Cedar's multimedia document editor. CaminoReal offers a small builtin algebra package based on the notions of Domains and Objects, plus access to "Algebra Servers" on a network. Mathematical expressions are passed between CaminoReal, Tioga, and Algebra Servers in pure functional notation. Our current Algebra Servers are the Reduce, SMP, and SAC-2 Computer Algebra systems.
1. Introduction
1.1 Background
In the 27 years since J.C.R. Licklider presented the notion of Man-Computer Symbiosis [Licklider 1960], there have been continuous efforts to define and build such "symbiotic systems" for mathematical work. Clapp and Kain's Magic Paper system (1963), Minsky's MATHSCOPE proposal (1963). and Martin's Symbolic Mathematical Laboratory (1967) appear to be the earliest. The papers of Sammet (1966), Griesmer/Jenks (1971), Sundblad (1974), Ng (1979), Berman/Kulp (1979), Hearn (1980, 1982), Foster (1984), Engeler (1985), and Fich (1986) chronicle subsequent progress and offer pointers to the future. MathScribe (Smith/Soiffer 1986), MathCAD (MathSOFT 1986), the Engineering/Scientific Workstation (Bloomberg/Hogg 1987), and the Dynamicist's Workbench (Abelson 1987) are representative examples of the (large amount of) work that has begun recently.
Following Licklider and the works just cited, when we speak of environments for mathematical work in this paper, we exclude from consideration those aspects of mathematical computing that pertain to intelligence, learning, and automated reasoning. These are topics of the greatest importance, but we believe that more mundane aspects of mathematical environments are of greater short-run urgency. In fact, much remains to be done before we have satisfactory "mundane" systems, and we must have good "dumb" systems before we can hope to have good "smart" ones.
Our work on CaminoReal, leverages off certain recent hardware developments, such as: High-Resolution Screens and Printers, Pointing Devices, High-speed Networks, and Personal Computers. It also use recent software developments such as: sophisticated symbolic and numerical software, high-quality Electronic Publishing systems that utilize the new hardware devices , and the broad acceptance of certain User Interface paradigms for interactive software, such as WYSIWYG editing, Direct Manipulation, Menus, Windows, Holophrasting (Koved/Shneidermann 1986), Iconification, and Browsers.
CaminoReal, together with other components of Cedar, provides a working system for the creation, display, editing, transmittion and "execution" of Interactive Mathematical Notebooks. We began work with some very specific targets but without a coherent overall design. As we have uncovered CaminoReal's strengths and weaknesses, we believe we have developed the system design we previously lacked. This paper is as much about this design as it is about the working prototype.
CaminoReal has much in common with other recent work, but we do believe it to have two unique features These are:
1. The accessibility from CaminoReal of a variety of different computational "Math Servers" on our local network (details in Section 4 below).
2. The coupling of computation facilities with a sophisticated document system, thereby opening interesting new opportunities for computed and interactive documents.
To a large extent, these novel capabilities are made possible by the rich facilities of the Cedar environment. In turn, the richness of Cedar reflects thorough its incorporation of the hardware and software developments we identified above. Given that many of these developments originated at Xerox PARC (Crecine 1986), it is not surprising that they are well integrated into Cedar.
1.2. To be more specific ...
CaminoReal lives in Cedar, the programming environment of Xerox PARC's Computer Science Laboratory (Swinehart et al 1986, Donahue 1986), and is used in conjunction with Tioga, Cedar's multimedia document editor. Actual document production (e.g. printing, management of other document constituents such as text and graphics) is provided by Tioga. The screen, mouse actions and keyboard input is managed by the Cedar viewers package. A viewer is a window that can be scrolled and resized. A viewer can have buttons and pop-up menus that invoke commands. The mouse is used to point and select text or expressions. CaminoReal supports interactive, syntax-directed, two-dimensional, WYSIWYG editing of mathematical expressions, placing/fetching such expressions in/from Tioga documents, and algebraic manipulation of expressions. Algebraic computation can be performed using either a small builtin package, or using well-known algebra systems such as Reduce, SMP, and SAC-2 over a network. The internal algebra package is based on an object-oriented paradigm that supports polymorphic procedures. For example, one can easily create and do simple arithmetic on matrices of polynomials with complex number coefficients, or matrices of such matrices, etc.
CaminoReal supports the creation of "interactive" technical documents. For example, the user can browse a typeset draft of a technical document on the workstation screen, select, edit and compute with the mathematical expressions in it. The resulting expressions can be inserted back into the document. One can extend this to the notion of a computed document, that is a document with imbedded computations. Two particularly useful flavors of computed documents are spreadsheets and mathematical form letters.
This paper combines an exposition of CaminoReal as it currently is, with suggestions for desirable changes or extensions. The current version of CaminoReal has at least touched on most issues we consider to be within our scope, so we will typically describe the existing features, and then how they might be altered.
Previous work on Man-Computer Symbiosis in Mathematics (such as that we cited above) has largely ignored the issue of documents. Although a number of interactive mathematical systems, e.g. MathCAD (MathSoft 1986), MILO (Avitzur 1987), and INFOR (Schelter 1987), allow the production of some sort of document, only INFOR could be said to support professional-quality typesetting for text and mathematics, and it does not have provision for other media such as voice or complex graphics. Multimedia document systems such as Diamond (Crowley 1987) and Andrew (Morris 1986) support a range of media, but they are only beginning to support math in documents, and they do not address the issue of computations with math expressions in a document. Spreadsheet systems can be said to integrate documents and computation, but they are typically limited in the types of documents that can be created, and the media that those documents can contain. For us, such documents as automatically generated logs, audit trails, or newly written technical papers, are a crucial part of a mathematical system. Furthermore, we want all documents in our system to be "active", in the sense that the user should be able to select a math expression in a document and compute with it, and to place the result of any computation at any place in a document. CaminoReal provides these capabilities. That CaminoReal provides a professional-quality document system may be gauged by the fact that this document is produced using it. At PARC, a reader who is browsing the electronic version of this document can select any mathematical expression in it, and edit it or compute with that expression. Hence we call CaminoReal a system for Interactive Mathematical Notebooks.
3. CaminoReal as a prototype SMS: Expression Editing and Basic Documents
3.1. Introduction
CaminoReal is a prototype of a standard mathematical system, where one can edit mathematical notation interactively, display mathematics in traditional two-dimensional appearance, compute symbolically or numerically with mathematical expressions, and format and organize documents containing such mathematical objects.
There are three major components of CaminoReal, Meddle, an interactive mathematics expression editor (combining the functions of an ED and DISP), AlgebraStructures, an exploratory domain-based algebra system (COMP) with remote access to other algebra services via distributed network protocols, and Tioga, the integrated multimedia document production system (DOC).
We believe that such a prototype reveals interesting architectural issues, many of which were described in the previous section, and provides opportunities for exploring new directions for active documents described later in this paper. CaminoReal also provides a testbed for exploring user interface issues concerning manipulating mathematics within documents.
3.2. The Expression Editor (ED and DISP)
The expression editor in CaminoReal combines the math editor and display components of a standard mathematical system to manipulate two-dimensional math notation interactively. The editor was modeled after the Tioga document editor in Cedar, utilizing multiple selections, accepting input actions from either the keyboard or menu buttons, and processing input actions through an incremental pseudo-parser. The editor updates the display incrementally after each key stroke.
The editing paradigm is based on expression trees, with operators as interior nodes and atoms as leaves. Each operator is represented by a template that defines the notation for that operator by determining the symbol representing the operator and the structure and appearance of the subexpressions. For example, the summation template defines that a Greek sigma, S, be used for the operator and that there be three subexpressions: a lower bound, an upper bound and a summand. Such templates are written in the Cedar language and registered to CaminoReal. When templates are first presented, any unfilled expressions are represented by placeholders (X). Thus, the addition template first appears as X.
3.3. Selecting Expressions
One may select subexpressions corresponding to subtrees by pointing at the relevant object. This strategy helps ensure that structurally correct expressions are created at the expense of freedom to manipulate individual operators. The intention is that additional operator templates be added to accommodate new notation rather than permitting the editor to arbitrarily rearrange subexpressions. To facilitate keyboard entry, a complete set of navigational commands are provided, such as select parent, sibling or child of the current selection.
CaminoReal depends on four types of selections: primary, copy, move, and the keyboard caret. The primary selection, made by pointing and clicking with the mouse, establishes the focus of most operations. The copy selection, made by chording the keyboard SHIFT key and clicking the mouse, supplies the argument for copying a subexpression to replace the primary selection. A move selection, made by chording the keyboard CTRL key and clicking the mouse, supplies the argument for moving a subexpression to replace the primary selection. The keyboard caret identifies the expression most recently entered by a keyboard input action and determines where the next keyboard input will be directed.
3.4. Entering Expressions
All editing operations are available from menu buttons and several common ones are mapped onto keyboard keys. CaminoReal uses a pseudo-parser in the Cedar user interface management system to map key presses into editing operations. This provides a feel similar to an operator precedence grammar, but is unfortunately not very natural. For example, the keyboard sequence x^2<CTRL-P>+1<CTRL-P>=0 requires the embedded `select parent' operations to get the proper associations for the expression X .
Modifications to the primary selection may occur either by a replace operation or a wrap operation. In a replace operation, the subexpression in the primary selection is deleted and a new subexpression, determined by either a keyboard input action or a menu choice, is inserted in the expression tree. In a wrap operation, the primary selection appears as one of the placeholders in the new subexpression. For example, consider the first placeholder in the addition expression X as the primary selection. Typing the letter `r' replaces the first placeholder with X resulting in the new expression X , and subsequently typing the key `^' wraps a superscript template around the X to produce X (replacing the X with a subscript template would produce X ).
The math expression editor provides several `creature comforts' suited to interactive editing of complex notation, especially the undo command and various scaling operations to improve the readability on low resolution display screens.
3.5. Character sets
An interesting challenge for other mathematical expression editors is the treatment of special symbols. This issue is finessed in CaminoReal through the use of the Xerox character code standard, in which a unique code (a 1-, 2-, or 3-byte code) has been assigned to all multilingual and technical symbols in the standard. Therefore, mathematical notation symbols and foreign language symbols are known in each type font at specific character code locations. The Xerox character code standard is comprehensive and incorporates many international standards, such as ISO and JIS, and several de facto standards, such as the AMS TeX math symbols.
Nonetheless, there remains the challenge of identifying and inputing symbols beyond the standard keyboard keys. CaminoReal employs a tenatative solution by using menus for special symbols and Greek letters. Other Xerox systems use virtual keyboards to map the keys into arbitrary character codes and abbreviation name lookup translations to map token identifiers into symbols.
3.6. The Integrated Document Formatter (DOC and DISP)
desire is to integrate mathematical content into document as a document object
CaminoReal implementation limited by Tioga to creating passive artwork objects
artwork objects require procedures to return a bounding box for layout, to paint in an imaging context (device independent, might be display or an Interpress master)
objects may be in-line expressions or displayed notation
DOC component relies on DISP component to format notation (true?)
strategy is to have several CaminoReal tools for editing and manipulating mathematical objects
tool operations to manipulate math objects in Tioga documents
send math expression to document
extract math expression from document
evaluate math expression in document
References
Abelson, H., "The Dynamicist's Workbench", Department of Electrical Engineering & Computer Science, Massachusetts Institute of Technology (talk at Xerox PARC, May 1987)
Arnon, D., "Report of the Workshop on Environments for Computational Mathematics", held at ACM SIGGRAPH Conference, Anaheim, CA, July 27, 1987. Submitted for publication to the ACM SIGSAM Bulletin.
Avitzur, Ron, "MILO System", Palo Alto, CA 1987.
Berman, R. and Kulp, J., "A new environment for computational physics", Proc. 1979 MACSYMA Users Conf., Washington D.C., June 20-22, 1979, pp. 622-632.
Bloomberg, D. and Hogg, T., "Engineering/Scientific Workstation Project", Internal Report GSL-87-01, P87-00001, Xerox Palo Alto Research Center, January 1987.
Crecine, J., "The next generation of personal computers", Science, 231 (28 Feb. 1986), pp. 935-943.
Crowley T. et al, "The Diamond Multimedia Editor", Proc. USENIX 1987, pp. 1-17.
Donahue, J., "Integration Mechanisms in Cedar"
Engeler, E., "Scientific computation: the integration of symbolic, numeric and graphic computation", Proc. EUROCAL '85, (B.F. Caviness, ed.), Linz, Austria, April 3-5, 1985, Springer-Verlag, Lecture Notes in Computer Science, 203 (1985), pp. 185-200
Fich, F, "Mathematics notepad", Internal Document, Xerox Corporation, 1986.
Griesmer, J. and Jenks, R., "Scratchpad/I - an interactive facility for symbolic mathematics.", Proc. Second Symp. on Symbolic and Algebraic Manipulation (SIGSAM '71), ACM, pp. 42-58.
Hearn, A., The Personal Algebra Machine, Proc. IFIP '80, North-Holland, Amsterdam, 1980, pp. 620-628.
Hearn, A., "REDUCE - a case study in algebra system development", Proc. EUROCAM '82, Marseille, France, April 1982, Lecture Notes in Computer Science, 144, Springer-Verlag, New York, 1982, pp. 263-272.
Knuth, D.E., "The TeXBook", Addison-Wesley, 1984.
Knuth, Donald, "Mathematical Typography", Bull. AMS (New Series), March 1979, V. 1, No. 2, 337-372.
Koved L., Shneidermann B., "Embedded menus: selecting items in context", Comm. ACM, 29, 4 (April 1986), pp. 312-318.
Licklider, JCR, "Man-Computer Symbiosis", IRE Trans. on Human Factors in Electronics, HFE-1, 4-11 (1960).
Martin, W., "Symbolic Mathematical Laboratory", Ph.D. thesis, MIT, Jan. 1967.
Martin, W., "Computer input/output of mathematical expressions.", Proc. Second Symp. on Symbolic and Algebraic Manipulation (SIGSAM '71), ACM, pp. 78-89.
Martin, W. and Fateman, R., "The MACSYMA System.", Proc. Second Symp. on Symbolic and Algebraic Manipulation (SIGSAM '71), ACM, pp. 59-75.
MathSoft Inc, "MathCAD System", 1 Kendall Square, Cambridge, MA 02139
Minsky, M., "MATHSCOPE, part I - a proposal for a mathematical manipulation-display system", Memo MAC-M-118, Artificial Intelligence Project, Project MAC, MIT, November 1963, 13pp.
Morris, J. et al, "Andrew: A Distributed Personal Computing Environment", Comm. ACM 29, 3 (March 1986), pp. 184-201)
Ng, E., "Symbolic-numeric interface: a review", Proc. EUROSAM '79, Marseille, France, June 1979, Lecture Notes in Computer Science, 72, Springer-Verlag, New York, 1979, pp. 330-345.
R. Pavelle, M. Rothstein, and J. Fitch, "Computer Algebra", Scientific American, 245, 6 (December 1981), pp. 136-152.
Sammet, J., "Survey of formula manipulation", Comm. ACM, 9, 8 (August 1966), pp. 555-569.
Schelter, W.F., "INFOR Display Editor", MS, Department of Mathematics, University of Texas-Austin, July 1987, 11pp.
Shneiderman, B., "Direct Manipulation: A Step Beyond Programming Languages", IEEE Computer, August 1983, pp. 57-69.
Smith, C.J. and N. Soiffer, "MathScribe: A User Interface for Computer Algebra Systems", Proc. 1986 Symp. Symbolic and Algebraic Computation (B. Char, ed.), ACM, pp. 7-12.
Spivak, M., "The Joy of TeX", Addison-Wesley, 1986.
Sundblad, Y., "Symbolic mathematical systems now and in the future", Proc. EUROSAM '74, ACM SIGSAM Bulletin, 8, 3 (August 1974), pp. 1-8.
Swinehart, D.C., Zellweger, P.T., Beach, R.J., Hagmann, R.B., "A Structural View of the Cedar Programming Environment", Report CSL-86-1, Xerox Palo Alto Research Center, June 1986, 74pp., also ACM Trans. on Programming Lang. and Systems (TOPLAS), 1986.