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. Printing and management of other document components, such as text and graphics, is provided by Tioga. For computation, 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.
CaminoReal is structured in accordance with a recently proposed standard architecture for Mathematical Systems. We summarize this architecture in this paper.
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.
1. Introduction
Since the 1950's, many researchers have worked to realize the vision of natural and powerful computer systems for interactive mathematical work. Nowadays this vision can be expressed as the goal of an integrated system for symbolic, numerical, graphical, and documentational mathematical work. One aspect of this vision of particular interest to us is the idea of "living" notebooks and technical papers. We want a system that supports both the exploration of technical ideas through computations, and the production of an evolving technical document that describes them. Recently the development of personal computers (with high resolution screens, window systems, and mice), high-speed networks, electronic mail, and electronic publishing, have created a technological base that is more than adequate for the realization of these integrated systems. However, the growth of separate Mathematical Typesetting, Multimedia Electronic Mail, Numerical Computation, and Computer Algebra communities, each with its own standards, is tending to impede their realization.
CaminoReal is a prototype system for the integration of documents, editing, and computation involving mathematics. Its design is an instance of an architecture for Standard Mathematical Systems that we recommend be adopted by others. The thrust of this architecture is to provide a standard means for combining diverse system components, namely communication by means of mathematical expressions expressed in a pure functional notation.
CaminoReal 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. 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 (nicely typeset) draft of a technical document on the workstation screen, select, edit and compute with mathematical expressions in it (besides editing text and graphics, of course), and insert the resulting expressions back into the document. One can extend this to the notion of a "computed document", i.e. a document with imbedded computations. Two particularly useful flavors of computed documents are spreadsheets and mathematical form letters.
2. Standard Mathematical Systems - a Proposed Architecture
This material is adapted form the Report of the Workshop on Environments for Computational Mathematics.
We postulate that there is an "Abstract Syntax" for any mathematical expression. A piece of Abstract Syntax consists of an Operator and a list of Arguments, where each Argument is (recursively) a piece of Abstract Syntax. Functional Notation, Lisp S—Expressions, Directed Acyclic Graphs, and N-ary Trees are equivalent representations of Abstract Syntax. For example, the functional expression "Plus[Times[a,b],c]" represents the Abstract Syntax of an expression that would commonly be written "a*b+c".
A "Standard Mathematical Component" (abbreviated SMC) is a collection of software and hardware modules, with a single function, which if it reads mathematical expressions, reads them as Abstract Syntax, and if it writes mathematical expressions, writes them as Abstract Syntax. A "Standard Mathematical System" (abbreviated SMS) is a collection of SMC's which are used together, and which communicate with each other in Abstract Syntax.
We may identify at least four possible types of components in an SMS. Any particular SMS may have zero, one, or several instances of each component type. The connection between two particular components of an SMS, of whatever type, is via Abstract Syntax passed over a "wire" joining them.
EDs - Math Editors
These edit Abstract Syntax to Abstract Syntax. It's fine to have an editor in your particular system that works on some other representation, e.g. bitmap, particular formatting language, however it does not qualify as an ED component of an SMS. An ED may be WYSIWYG or language-oriented.
DISPs - Math Displayers
These are suites of software packages, device drivers, and hardware devices that take in an expr in Abstract Syntax and render it. For example, (1) the combination of an Abstract Syntax->TeX translator, TeX itself, and a printer, or (2) a plotting package plus a plotting device. A DISP component may or may not support "pointing" (i.e. selection), within an expression it has displayed, e.g. a printer probably doesn't, but terminal screen may. If pointing is supported, then a DISP component must be able to pass back the selected subexpression in Abstract Syntax. An example of an acceptable Abstract Syntax expression for indicating a subexpression of "expr" is Child[Child[expr,2],3].
COMPs - Computation systems
Examples are numerical libraries and computer algebra systems. There are questions as to the state of a COMP component at the time it receives an expression. For example, what global flags are set or what previous expressions have been computed, that the current expression may refer to. However we don't delve into these hard issues at this time.
DOCs - Document systems
These are what would typically called "text editors", "document editors", or "electronic mail systems". We are interested in their handling of math expressions. In reality they manage other document constituents as well, e.g. text and graphics. The design of the user interface for the interaction of math, text, and graphics is a nontrivial problem, and will doubtless be the subject of further research.
A typical SMS will have an ED and a DISP that are much more closely coupled than is suggested here. For example, the ED's internal representation of Abstract Syntax, and the DISP's internal representation (e.g. a tree of boxes), may have pointers back and forth, or perhaps may even share a common data structure. This is acceptable, but it should always be possible to access the two components in the canonical, decoupled way. For example, the ED should be able to receive a standard Abstract Syntax representation for an expression, plus an editing command in Abstract Syntax (e.g.. Edit[expr, cmd]), and return an Abstract Syntax representation for the result. Similarly the DISP should be able to receive Abstract Syntax over the wire and display it, and if it supports pointing, be able to return selected subexpressions in Abstract Syntax.
The boundaries between the component types are not hard and fast, e.g. an ED might support simple computations (e.g. simplification, rearrangement of subexpressions, arithmetic), or a DOC might contain a facility for displaying mathematical expressions. The key thing for a given software, or software/hardware module to qualify as an SMS component of one of these four types is its ability to read and write Abstract Syntax.
Miscellaneous notes:
1. COMPs, e.g. Computer Algebra systems, should be able to communicate in Abstract Syntax. Thus existing systems should have translators to/from Abstract Syntax added to them.
To really have this work nicely, we need standard function names. A particular algebra system may recognize nonstandard Abstract Syntax, e.g. Polynomial[Variables[x,y,z], List[Term[coeff,xExp, yExp, zExp], ... but it must know that to truly make this standard, it needs to translate into something like Sum[Product[coeff, Pow[x,xExp], ...
2. A DOC must store the Abstract Syntax representations of the expressions it contains. Thus it's easy for it to pass its expressions to EDs, COMPs, or DISPs. A DOC is free to store additional expression representations, for example, a tree of Boxes, a bitmap, or a TeX description.
3. DISPs will typically have local databases of formatting information. To actually render the Abstract Syntax, the DISP checks for display rules in its database. If none are found, it paints the Abstract Syntax in some standard way. Local formatting databases can be overridden by formatting rules passed over the wire, expressed in Abstract Syntax.
It is these local databases, or knowledge of the display environment in which you happen to be at the moment (e.g. typesetting for a particular journal). The paradigm is the genetic code: a mathematical expression is like a particular instance of DNA. You consult your local database to see if you understand it, and if not, just "pass it through unchanged". An expression sent over the wire may be accompanied by explicit directives or explanatory information. Again, these may or may not be meaningful to a particular DISP.
4. With the use of the SMC's specificed above, it becomes easy to use any DOC as a logging facility for a session with a COMP. Thus improvements in DOCs, e.g. browsers, level structuring, active documents, audit trails, will automatically give us better logging mechanisms for sessions with algebra systems.
5. Note that Abstract Syntax is human-readable. Thus any text editor can be used as an ED. However as M. Spivak said - you shouldn't have to look at it if you don't want to. Many users will only want to interact with mathematics that has a textbook-like appearance; they should not need to know that their system may talk Abstract Syntax within itself, or to the outside world.
6. A. Katz's RFC (cited above) distinguishes the form (i.e. appearance) of a mathematical expression from its content (i.e. meaning, value). We do not agree that such a distinction can be made. We claim that Abstract Syntax can convey form, meaning, or both, and that its interpretation is strictly in the eye of the beholder. Meaning is just a handshake between sender and recipient.
References
Selected References on Mathematical Typesetting
Bell Telephone Laboratories, "The Preparation and Typing of Mathematical Manuscripts", Third Revised Edition, 1979.
Knuth, Donald, "Mathematical Typography", Bull. AMS (New Series), March 1979, V. 1, No. 2, 337-372.
Palais, Richard, Column on Technical Wordprocessing, Notices of the AMS, ongoing.
Swanson, E., "Mathematics into Type: Copying, Editing, and Proofreading of Mathematics for Editorial Assistants and Authors", American Mathematical Society, Revised Edition, 1979.
Markup Languages for Representation of Mathematics (Form-focused)
Association of American Publishers, Electronic Manuscript Series, "Markup of Mathematical Formulas", 1985.
Kernighan, B.L., Cherry, L, "A system for typesetting mathematics", CACM, 18 (March 1975), 151-157.
Knuth, D.E., "The TeXBook", Addison-Wesley, 1984.
Algebraic Languages for Representation of Mathematics (Content-focused)
Foderaro, J.K., "The Design of a Language for Algebraic Computation Systems", Report No. UCB/CSD 83/160, Computer Science Division (EECS), UC Berkeley, August 1983, 81pp. (Ph.D. Thesis)
Jenks, R., "A language for computational algebra", Proc. ACM 1981 Symposium on Symbolic and Algebraic Computation, Snowbird, Utah, Aug 5-7, 1981, pp. 6-13. Report RC8930, Math. Science Dept., IBM TJ Watson Research Center, July 14, 1981.
Martin, William, "Symbolic Mathematical Laboratory", Ph.D. thesis, MIT, Jan. 1967.
Old work on Computer Input and Output of Mathematics
Anderson, Richard, "Computer Recognition of Hand-Drawn Math" (not quite right), Harvard Ph.D. thesis, 1965?
Martin, William, "Symbolic Mathematical Laboratory", Ph.D. thesis, MIT, Jan. 1967.
Martin, William, "Computer input/output of mathematical expressions.", Proc. Second Symp. on Symbolic and Algebraic Manipulation (SIGSAM '71), ACM, pp. 78-89.
Selected References on Technical Document Production Systems
Knuth, D., "The TeXBook", Addison-Wesley, 1984.
M. Spivak, "The Joy of TeX", Addison-Wesley, 1986.
Selected References on Computer Algebra
Fenichel, An online system for mathematics (?), Harvard Ph.D., 60's.
Hearn, A., The Personal Algebra Machine, Proc. IFIP '80, North-Holland, Amsterdam, 1980, pp. 620-628.
R. Pavelle, M. Rothstein, and J. Fitch, "Computer Algebra", Scientific American, 245, 6 (December 1981), pp. 136-152.
S. Watt, Parallel algorithms for computer algebra, Ph.D., University of Waterloo, 1984
Selected References on Numerical Computation
Dongarra, J., and Grosse, E., "Distribution of Mathematical Software via Electronic Mail", Comm. ACM, 30,5 (May 1987), pp. 403-407.
Selected References on Mathematical Hardware
Hewlett-Packard HP-28C Reference Manual
Report on the Interset 2000 System, Seybold Report on Publishing Systems, February 2, 1987, pp. 1-18.
Selected References on Cedar
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.
Selected References on Object-Oriented programming
Bobrow D. et al, "CommonLoops: Merging Lisp and Object-Oriented Programming", OOPSLA Proceedings, 1986.
M. Stefik and D. Bobrow, "Object-oriented programming: themes and variations", AI Magazine, VI, 4, Winter 1986, pp. 40-62.
Selected References on User Interfaces
S. Card and T. Moran, "User technology: from pointing to pondering", ACM Conf. on Personal Workstations, 1986, pp. 183-197
Shneiderman, B., "The Future of Interactive Systems and the Emergence of Dirct Manipulation", Behav. Inf. Technol. 1, 2 (1982), 237-256.
Furnas, G., "Generalized Fisheye Views", "Human Factors in Computing Systems", CHI-86 Conference Proceedings, ACM, 1986, 16-23.
Selected References on Integrated Systems for Mathematical Work
Calmet, J. and Lugiez, D., "A Knowledge-Based System for Computer Algebra", ACM SIGSAM Bulletin, V. 21, No. 1, Issue #79, pp. 7-13.
Bloomberg, D. and Hogg, T., "Engineering/Scientific Workstation Project", Internal Report GSL-87-01, P87-00001, Xerox Palo Alto Research Center, January 1987.
Klerer, M. and Reinfelds, J., "Interactive Systems for Experimental Applied Mathematics", Academic Press, New York, 1968, 472 pp
Martin, William, "Symbolic Mathematical Laboratory", Ph.D. thesis, MIT, Jan. 1967.
PC Magazine, The Scientific PC: Software for Problem Solving", April 14, 1987, pp. 155ff.
Wells, M. B. and Morris, J. B. (eds.), Proceedings of a Symposium on Two-Dimensional Man-Machine Communication, ACM SIGPLAN notices, Vol 7, No 10, October 1972.
Evaluation of Mathematical Expressions
MathLab Group, "Macsyma Reference Manual", Version 9, Laboratory for Computer Science, MIT, December 1977, Chapter 3.
Domain and/or Object-oriented Computer Algebra Systems
Abdali, S.K., Cherry, G.W., Soiffer, N., "An Object-Oriented Approach to Algebra System Design", Proc. 1986 Symp. Symbolic and Algebraic Computation (B. Char, ed.), ACM, pp. 24-30.
A. Fortenbacher et al, "An Overview of the Scratchpad Language and System", Document Number Pre-Release V0M11, Mathematical Sciences Department, Knowledge Systems, Computer Algebar group, IBM TJ Watson Research Center, April 1987, 116pp.
Soiffer, N., "A Perplexed User's Guide to Andante", MS, UC Berkeley, 12+1 pp, November, 1981.
User Interfaces for Computer Algebra Systems
Abdali, S.K., Cherry, G.W., Soiffer, N., "On the Road to Better Computer Algebra System Interfaces", TR #CR-87-26, Computer Research Laboratory, Tektronix Laboratories, Beaverton OR, March 1987, 10pp.
Foderaro, J.K., "Typesetting MACSYMA Equations", in Proc. of the 1979 MACSYMA Users Conf, V.E. Lewis (ed), Washington DC 345-361, also, UCB MS Project Rpt. EECS Dept. 1978.
Fateman, R., "TeX Output from Macsyma-like systems", MS, 5pp, University of California, Berkeley, May 1987.
Foster, G., "User interface considerations for algebraic manipulation systems", Report No. UCB/CSD 84/192, Computer Science Division (EECS), University of California, Berkeley, June 1984.
Foster, G., "DREAMS: Display REpresentation for Algebraic Manipulation Systems", Report No. UCB/CSD 84/193, Computer Science Division (EECS), University of California, Berkeley, April 1984.
Leong, B. "Iris: Design of a User Interface Program for Symbolic Algebra", Proc. 1986 Symp. Symbolic and Algebraic Computation (B. Char, ed.), ACM, pp. 1-6.
C.J. Smith 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.
User Interfaces for Technical Document Production; Mathematical Expression Editing
Kimball, R., "Formula User Interface Issues", Internal memo, Xerox PARC, March 8, 1978.
McGregor, S., "Desktop Formula Frames Implementation", Xerox Office Products Division Internal Memo, November 1978, 13pp.
McGregor, S., "Star Formula Implementation", Xerox Office Products Division Internal Memo, November 1978, 3pp.
McGregor, S., "Tasks for Implementing Formulae in Star", Xerox Office Products Division Internal Memo, August 1980, 4pp.
Quint, V., "An interactive system for Mathematical Text Processing", Technology and Science of Informatics, V. 2, #3, (1983), pp. 169-179.
Quint, V., "Interactive Editing of Mathematics", Proc. First International Conference on Text Processing Systems, 24-26 October 1984, Dublin, Ireland, Boole Press, Dublin, 1984, pp. 55-68.
Schelter, W.F., "Sample INFOR Display", MS, Department of Mathematics, University of Texas-Austin, August 1986, 11pp.
User Interfaces for Numerical Systems
G. Culler, "Mathematical laboratories: a new tool for the physical and social sciences", ACM Conf. on Personal Workstations, 1986, pp. 59-72, reprinted from Klerer and Reinfelds 1968 (op. cit.)
Rice, J. and Rosen, S., "NAPSS, Numerical Analysis and Problem Solving System", Proc. ACM 21st National Conference, Los Angeles, 1966, ACM Publication P-66, (1966), p. 51ff.