home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 1000s / rfc1019.txt < prev    next >
Text File  |  1987-09-24  |  21KB  |  472 lines

  1.  
  2.  
  3. Network Working Group                                           D. Arnon
  4. Request for Comments: 1019                                    Xerox PARC
  5.                                                           September 1987
  6.  
  7.  
  8.  
  9.   Report of the Workshop on Environments for Computational Mathematics
  10.                                 July 30, 1987
  11.                           ACM SIGGRAPH Conference
  12.               Anaheim Convention Center, Anaheim, California
  13.  
  14.  
  15. Status of This Memo
  16.  
  17.    This memo is a report on the discussion of the representation of
  18.    equations in a workshop at the ACM SIGGRAPH Conference held in
  19.    Anaheim, California on 30 July 1987.  Distribution of this memo is
  20.    unlimited.
  21.  
  22. Introduction
  23.  
  24.    Since the 1950's, many researchers have worked to realize the vision
  25.    of natural and powerful computer systems for interactive mathematical
  26.    work.  Nowadays this vision can be expressed as the goal of an
  27.    integrated system for symbolic, numerical, graphical, and
  28.    documentational mathematical work.  Recently the development of
  29.    personal computers (with high resolution screens, window systems, and
  30.    mice), high-speed networks, electronic mail, and electronic
  31.    publishing, have created a technological base that is more than
  32.    adequate for the realization of such systems.  However, the growth of
  33.    separate Mathematical Typesetting, Multimedia Electronic Mail,
  34.    Numerical Computation, and Computer Algebra communities, each with
  35.    its own conventions, threatens to prevent these systems from being
  36.    built.
  37.  
  38.    To be specific, little thought has been given to unifying the
  39.    different expression representations currently used in the different
  40.    communities.  This must take place if there is to be interchange of
  41.    mathematical expressions among Document, Display, and Computation
  42.    systems. Also, tools that are wanted in several communities (e.g.,
  43.    WYSIWYG mathematical expression editors), are being built
  44.    independently by each, with little awareness of the duplication of
  45.    effort that thereby occurs.  Worst of all, the ample opportunities
  46.    for cross-fertilization among the different communities are not being
  47.    exploited.  For example, some Computer Algebra systems explicitly
  48.    associate a type with a mathematical expression (e.g.,   3 x 3 matrix
  49.    of polynomials with complex number coefficients), which could enable
  50.    automated math proofreaders, analogous to spelling checkers.
  51.  
  52.    The goal of the Workshop on Environments for Computational
  53.    Mathematics was to open a dialogue among representatives of the
  54.  
  55.  
  56.  
  57. Arnon                                                           [Page 1]
  58.  
  59. RFC 1019                                                  September 1987
  60.  
  61.  
  62.    Computer Algebra, Numerical Computation, Multimedia Electronic Mail,
  63.    and Mathematical Typesetting communities.  In July 1986, during the
  64.    Computers and Mathematics Conference at Stanford University, a subset
  65.    of this year's participants met at Xerox PARC to discuss User
  66.    Interfaces for Computer Algebra Systems.  This group agreed to hold
  67.    future meetings, of which the present Workshop is the first.  Alan
  68.    Katz's recent essay, "Issues in Defining an Equations Representation
  69.    Standard", RFC-1003, DDN Network Information Center, March 1987
  70.    (reprinted in the ACM SIGSAM Bulletin May 1987, pp. 19-24),
  71.    influenced the discussion at the Workshop, especially since it
  72.    discusses the interchange of mathematical expressions.
  73.  
  74.    This report does not aim to be a transcript of the Workshop, but
  75.    rather tries to extract the major points upon which (in the Editor's
  76.    view) rough consensus was reached.  It is the Editor's view that the
  77.    Workshop discussion can be summarized in the form of a basic
  78.    architecture for "Standard Mathematical Systems", presented in
  79.    Section II below.  Meeting participants seemed to agree that: (1)
  80.    existing mathematical systems should be augmented or modified to
  81.    conform to this architecture, and (2) future systems should be built
  82.    in accordance with it.
  83.  
  84.    The Talks and Panel-Audience discussions at the Workshop were
  85.    videotaped.  Currently, these tapes are being edited for submission
  86.    to the SIGGRAPH Video Review, to form a "Video Proceedings".  If
  87.    accepted by SIGGRAPH, the Video Proceedings will be publicly
  88.    available for a nominal distribution charge.
  89.  
  90.    One aspect of the mathematical systems vision that we explicitly left
  91.    out of this Workshop is the question of "intelligence" in
  92.    mathematical systems.  This has been a powerful motivation to systems
  93.    builders since the early days.  Despite its importance, we do not
  94.    expect intelligent behavior in mathematical systems to be realized in
  95.    the short term, and so we leave it aside.  Computer Assisted
  96.    Instruction for mathematics also lies beyond the scope of the
  97.    Workshop.  And although it might have been appropriate to invite
  98.    representatives of the Spreadsheets and Graphics communities, we did
  99.    not.  Many of those who were at the Workshop have given considerable
  100.    thought to Spreadsheets and Graphics in mathematical systems.
  101.  
  102.    Financial support from the Xerox Corporation for AudioVisual
  103.    equipment rental at SIGGRAPH is gratefully acknowledged.  Thanks are
  104.    due to Kevin McIsaac for serving as chief cameraman, providing
  105.    critical comments on this report, and contributing in diverse other
  106.    ways to the Workshop.  Thanks also to Richard Fateman, Michael
  107.    Spivak, and Neil Soiffer for critical comments on this report.
  108.    Subhana Menis and Erin Foley have helped with logistics and
  109.    documentation at several points along the way.
  110.  
  111.    Information on the Video Proceedings, and any other aspect of the
  112.    Workshop can be obtained from the author of this report.
  113.  
  114.  
  115.  
  116. Arnon                                                           [Page 2]
  117.  
  118. RFC 1019                                                  September 1987
  119.  
  120.  
  121. I. Particulars of the meeting
  122.  
  123.    The Workshop had four parts: (1) Talks, (2) Panel Discussion, (3)
  124.    Panel and Audience discussion, (4) and Live demos.  Only a few of the
  125.    systems presented in the talks were demonstrated live. However, many
  126.    of the talks contained videotapes of the systems being discussed.
  127.  
  128.    The talks, each 15 minutes in length, were:
  129.  
  130.    1. "The MathCad System: a Graphical Interface for Computer
  131.       Mathematics", Richard Smaby, MathSOFT Inc.
  132.  
  133.    2. "MATLAB - an Interactive Matrix Laboratory", Cleve Moler,
  134.       MathWorks Inc.
  135.  
  136.    3. "Milo: A Macintosh System for Students", Ron Avitzur, Free Lance
  137.       Developer, Palo Alto, CA.
  138.  
  139.    4. "MathScribe: A User Interface for Computer Algebra systems", Neil
  140.       Soiffer, Tektronix Labs.
  141.  
  142.    5. "INFOR: an Interactive WYSIWYG System for Technical Text",
  143.       William Schelter, University of Texas.
  144.  
  145.    6. "Iris User Interface for Computer Algebra Systems", Benton Leong,
  146.       University of Waterloo.
  147.  
  148.    7. "CaminoReal: A Direct Manipulation Style User Interface for
  149.       Mathematical Software", Dennis Arnon, Xerox PARC.
  150.  
  151.    8. "Domain-Driven Expression Display in Scratchpad II", Stephen
  152.       Watt, IBM Yorktown Heights.
  153.  
  154.    9. "Internal and External Representations of Valid Mathematical
  155.       Reasoning", Tryg Ager, Stanford University.
  156.  
  157.    10. "Presentation and Interchange of Mathematical Expressions in the
  158.        Andrew System", Maria Wadlow, Carnegie-Mellon University.
  159.  
  160.    The Panel discussion lasted 45 minutes.  The panelists were:
  161.  
  162.       Richard Fateman, University of California at Berkeley
  163.       Richard Jenks, IBM Yorktown Heights
  164.       Michael Spivak, Personal TeX
  165.       Ronald Whitney, American Mathematical Society
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175. Arnon                                                           [Page 3]
  176.  
  177. RFC 1019                                                  September 1987
  178.  
  179.  
  180.    The panelists were asked to consider the following issues in planning
  181.    their presentations:
  182.  
  183.    1. Should we try to build integrated documentation/computation
  184.       systems?
  185.  
  186.    2. WYSIWYG editing of mathematical expressions.
  187.  
  188.    3. Interchange representation of mathematics.
  189.  
  190.    4. User interface design for integrated documentation/computation
  191.       systems.
  192.  
  193.    5. Coping with large mathematical expressions.
  194.  
  195.    A Panel-Audience discussion lasted another 45 minutes, and the Demos
  196.    lasted about one hour.
  197.  
  198.    Other Workshop participants, besides those named above, included:
  199.  
  200.       S. Kamal Abdali, Tektronix Labs
  201.       George Allen, Design Science
  202.       Alan Katz, Information Sciences Institute
  203.       J. Robert Cooke, Cornell University and Cooke Publications
  204.       Larry Lesser, Inference Corporation
  205.       Tom Libert, University of Michigan
  206.       Kevin McIsaac, Xerox PARC and University of Western Australia
  207.       Elizabeth Ralston, Inference Corporation
  208.  
  209. II. Standard Mathematical Systems - a Proposed Architecture
  210.  
  211.    We postulate that there is an "Abstract Syntax" for any mathematical
  212.    expression.  A piece of Abstract Syntax consists of an Operator and
  213.    an (ordered) list of Arguments, where each Argument is (recursively)
  214.    a piece of Abstract Syntax.  Functional Notation, Lisp SExpressions,
  215.    Directed Acyclic Graphs, and N-ary Trees are equivalent
  216.    representations of Abstract Syntax, in the sense of being equally
  217.    expressive, although one or another might be considered preferable
  218.    from the standpoint of computation and algorithms.  For example, the
  219.    functional expression "Plus[Times[a,b],c]" represents the Abstract
  220.    Syntax of an expression that would commonly be written "a*b+c".
  221.  
  222.    A "Standard Mathematical Component" (abbreviated SMC) is a collection
  223.    of software and hardware modules, with a single function, which if it
  224.    reads mathematical expressions, reads them as Abstract Syntax, and if
  225.    it writes mathematical expressions, writes them as Abstract Syntax.
  226.    A "Standard Mathematical System" (abbreviated SMS) is a collection of
  227.    SMC's which are used together, and which communicate with each other
  228.    in Abstract Syntax.
  229.  
  230.    We identify at least four possible types of components in an SMS.
  231.  
  232.  
  233.  
  234. Arnon                                                           [Page 4]
  235.  
  236. RFC 1019                                                  September 1987
  237.  
  238.  
  239.    Any particular SMS may have zero, one, or several instances of each
  240.    component type.  The connection between two particular components of
  241.    an SMS, of whatever type, is via Abstract Syntax passed over a "wire"
  242.    joining them.
  243.  
  244.    1) EDs - Math Editors
  245.  
  246.    These edit Abstract Syntax to Abstract Syntax.  A particular system
  247.    may have editors that work on some other representations of
  248.    mathematics (e.g., bitmaps, or particular formatting languages),
  249.    however they do not qualify as an ED components of a SMS.  An ED may
  250.    be WYSIWYG or language-oriented.
  251.  
  252.    2) DISPs - Math Displayers
  253.  
  254.    These are suites of software packages, device drivers, and hardware
  255.    devices that take in an expr in Abstract Syntax and render it. For
  256.    example, (1) the combination of an Abstract Syntax->TeX translator,
  257.    TeX itself, and a printer, or (2) a plotting package plus a plotting
  258.    device.  A DISP component may or may not support "pointing" (i.e.,
  259.    selection), within an expression it has displayed, fix a printer
  260.    probably doesn't, but terminal screen may. If pointing is supported,
  261.    then a DISP component must be able to pass back the selected
  262.    subexpression(s) in Abstract Syntax. We are not attempting here to
  263.    foresee, or limit, the selection mechanisms that different DISPs may
  264.    offer, but only to require that a DISP be able to communicate its
  265.    selections in Abstract Syntax.
  266.  
  267.    3) COMPs - Computation systems
  268.  
  269.    Examples are Numerical Libraries and Computer Algebra systems. There
  270.    are questions as to the state of a COMP component at the time it
  271.    receives an expression. For example, what global flags are set, or
  272.    what previous expressions have been computed that the current
  273.    expression may refer to.  However, we don't delve into these hard
  274.    issues at this time.
  275.  
  276.    4) DOCs - Document systems
  277.  
  278.    These are what would typically called "text editors", "document
  279.    editors", or "electronic mail systems".  We are interested in their
  280.    handling of math expressions.  In reality, they manage other document
  281.    constituents as well (e.g., text and graphics).  The design of the
  282.    user interface for the interaction of math, text, and graphics is a
  283.    nontrivial problem, and will doubtless be the subject of further
  284.    research.
  285.  
  286.    A typical SMS will have an ED and a DISP that are much more closely
  287.    coupled than is suggested here.  For example, the ED's internal
  288.    representation of Abstract Syntax, and the DISP's internal
  289.    representation (e.g., a tree of boxes), may have pointers back and
  290.  
  291.  
  292.  
  293. Arnon                                                           [Page 5]
  294.  
  295. RFC 1019                                                  September 1987
  296.  
  297.  
  298.    forth, or perhaps may even share a common data structure.  This is
  299.    acceptable, but it should always be possible to access the two
  300.    components in the canonical, decoupled way.  For example, the ED
  301.    should be able to receive a standard Abstract Syntax representation
  302.    for an expression, plus an editing command in Abstract Syntax (e.g.,
  303.    Edit[expr, cmd]), and return an Abstract Syntax representation for
  304.    the result.  Similarly, the DISP should be able to receive Abstract
  305.    Syntax over the wire and display it, and if it supports pointing, be
  306.    able to return selected subexpressions in Abstract Syntax.
  307.  
  308.    The boundaries between the component types are not hard and fast. For
  309.    example, an ED might support simple computations (e.g.,
  310.    simplification, rearrangement of subexpressions, arithmetic), or a
  311.    DOC might contain a facility for displaying mathematical expressions.
  312.    The key thing for a given module to qualify as an SMC is its ability
  313.    to read and write Abstract Syntax.
  314.  
  315. III. Recommendations and Qualifications
  316.  
  317.     1. It is our hypothesis that it will be feasible to encode a rich
  318.        variety of other languages in Abstract Syntax, for example,
  319.        programming constructs.  Thus we intend it to be possible to
  320.        pass such things as Lisp formatting programs, plot programs,
  321.        TeX macros, etc. over the wire in Abstract Syntax.  We also
  322.        hypothesize that it will be possible to encode all present and
  323.        future mathematical notations in Abstract Syntax (e.g.,
  324.        commutative diagrams in two or three dimensions).  For
  325.        example, the 3 x 3 identify matrix might be encoded as:
  326.  
  327.        Matrix[ [1,0,0], [0,1,0], [0,0,1] ]
  328.  
  329.        while the Abstract Syntax expression:
  330.  
  331.        Matrix[5, 5, DiagonalRow[1, ThreeDots[], 1],
  332.        BelowDiagonalTriangle[FlexZero[]],
  333.        AboveDiagonalTriangle[FlexZero[]]]
  334.  
  335.        might encode a 5 x 5 matrix which is to be displayed with a
  336.        "1" in the (1,1) position, a "1" in the (5,5) position, three
  337.        dots between them on the diagonal, a big fat zero in the lower
  338.        triangle indicating the presence of zeros there, and a big fat
  339.        zero in the upper triangle indicating zeros.
  340.  
  341.     2. We assume the use of the ASCII character set for Abstract Syntax
  342.        expressions.  Greek letters, for example, would need to be
  343.        encoded with expressions like Greek[alpha], or Alpha[].
  344.        Similarly, font encoding is achieved by the use of Abstract
  345.        Syntax such as the following for 12pt bold Times Roman:
  346.        Font[timesRoman, 12, bold, <expression>] Two SMCs are free to
  347.        communicate in a larger character set, or pass font
  348.        specifications in other ways, but they should always be able to
  349.  
  350.  
  351.  
  352. Arnon                                                           [Page 6]
  353.  
  354. RFC 1019                                                  September 1987
  355.  
  356.  
  357.        express themselves in standard Abstract Syntax.
  358.  
  359.     3. COMPs (e.g., Computer Algebra systems), should be able to
  360.        communicate in Abstract Syntax.  Existing systems should
  361.        have translators to/from Abstract Syntax added to them.  In
  362.        addition, if we can establish a collection of standard names and
  363.        argument lists for common functions, and get all COMP's to read
  364.        and write them, then any Computer Algebra system will be able to
  365.        talk to any other.  Some examples of possible standard names and
  366.        argument lists for common functions:
  367.  
  368.    Plus[a,b,...]
  369.    Minus[a]
  370.    Minus[a,b]
  371.    Times[a,b,...]
  372.    Divide[<numerator>, <denominator>]
  373.    Power[<base>, <exponent>]
  374.    PartialDerivative[<expr>, <var>]
  375.    Integral[<expr>, <var>, <lowerLimit>,<upperLimit>] (limits optional)
  376.    Summation[<<summand>, <lowerLimit>, <upperLimit>] (limits optional)
  377.  
  378.       A particular algebra system may read and write nonstandard
  379.       Abstract Syntax.  For example:
  380.  
  381.    Polynomial[Variables[x, y, z], List[Term[coeff, xExp, yExp, zExp],
  382.    ...
  383.  
  384.       but, it should be able to translate this to an equivalent standard
  385.       representation. For example:
  386.  
  387.    Plus[Times[coeff, Power[x, xExp], ...
  388.  
  389.     4. A DOC must store the Abstract Syntax representations of the
  390.        expressions it contains.  Thus it's easy for it to pass its
  391.        expressions to EDs, COMPs, or DISPs.  A DOC is free to store
  392.        additional expression representations. For example, a tree of
  393.        Boxes, a bitmap, or a TeX description.
  394.  
  395.     5. DISPs will typically have local databases of formatting
  396.        information.  To actually render the Abstract Syntax, the DISP
  397.        checks for display rules in its database.  If none are found,
  398.        it paints the Abstract Syntax in some standard way.  Local
  399.        formatting databases can be overridden by formatting rules passed
  400.        over the wire, expressed in Abstract Syntax.  It is formatting
  401.        databases that store knowledge of particular display
  402.        environments (for e.g., "typesetting for Journal X").
  403.  
  404.        The paradigm we wish to follow is that of the genetic code: A
  405.        mathematical expression is like a particular instance of DNA, and
  406.        upon receiving it a DISP consults the appropriate formatting
  407.        database to see if it understands it.  If not, the DISP just
  408.  
  409.  
  410.  
  411. Arnon                                                           [Page 7]
  412.  
  413. RFC 1019                                                  September 1987
  414.  
  415.  
  416.        "passed it through unchanged".  The expression sent over the wire
  417.        may be accompanied by directives or explanatory information,
  418.        which again may or may not be meaningful to a particular DISP.  In
  419.        reality, formatting databases may need to contain Expert
  420.        System-level sophistication to be able to produce professional
  421.        quality typesetting results, but we believe that useful results
  422.        can be achieved even without such sophistication.
  423.  
  424.     6. With the use of the SMC's specified above, it becomes easy to use
  425.        any DOC as a logging facility for a session with a COMP.  Therefore,
  426.        improvements in DOCs (e.g., browsers, level structuring, active
  427.        documents, audit trails), will automatically give us better
  428.        logging mechanisms for sessions with algebra systems.
  429.  
  430.     7. Note that Abstract Syntax is human-readable.  Thus any text
  431.        editor can be used as an ED.  Of course, in a typical SMS, users
  432.        should have no need to look at the Abstract Syntax flowing
  433.        through the internal "wires" if they don't care to.  Many will
  434.        want to interact only with mathematics that has a textbook-like
  435.        appearance, and they should be able to do so.
  436.  
  437.     8. Alan Katz's RFC (cited above) distinguishes the form (i.e.,
  438.        appearance) of a mathematical expression from its content (i.e.,
  439.        meaning, value).  We do not agree that such a distinction can be
  440.        made.  We claim that Abstract Syntax can convey form, meaning,
  441.        or both, and that its interpretation is strictly in the eye
  442.        of the beholder(s).  Meaning is just a handshake between sender
  443.        and recipient.
  444.  
  445.     9. Help and status queries, the replies to help and status queries,
  446.        and error messages should be read and written by SMC's in
  447.        Abstract Syntax.
  448.  
  449.    10. In general, it is permissible for two SMC's to use private
  450.        protocols for communication.  Our example of a tightly coupled ED
  451.        and DISP above is one example.  Two instances of a Macsyma COMP
  452.        would be another; they might agree to pass Macsyma internal
  453.        representations back and forth.  To qualify as SMC's, however,
  454.        they should be able to translate all such exchanges into
  455.        equivalent exchanges in Abstract Syntax.
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470. Arnon                                                           [Page 8]
  471.  
  472.