laser-lovers@uw-beaver (03/04/85)
From: mendelson.es@XEROX.ARPA I've been scooped!! I was about to send the message that is presented below the dotted line when Brian Reid's masterful message "PostScript and Interpress: a comparison", appeared in my mail. So I'll preface my original message with these remarks. I want to compliment Brian on a piece of work of outstanding excellence. I appreciate its objectivity. I agree almost completely with his technical characterizations of the differences between the two languages. I believe that that agreement will show up clearly in what I wrote, but my characterization is not nearly so scholarly as his. I hope it is as objective as his. We do have some differences of opinion and of knowledge, but I do not propose to address them here. We'll leave them for another day, after both comparisons have been presented. Jerry Mendelson --------------------------- The following information was prepared by Jerry Mendelson, and is submitted to Laser Lovers as a contribution to the general discussion of the characteristics of the two printing languages, Interpress and PostScript. Let me state up front that I am a retired Xerox Engineering Fellow, and that I am currently working as a consultant to Xerox. This report was commissioned by Xerox, but these are my observations, not those of Xerox. Xerox did not exercise technical control over the content, nor editorial control over the presentation, of the following information. I have tried to be as analytic, objective, and honest as I possibly could, but I know far more about Interpress than I do about PostScript. I welcome equally honest and objective responses to this discussion containing corrections, additions, other perspectives, what have you. I trust that these discussions will lead to well reasoned recommendations on a standard for the description of documents for representation on imaging devices. INTRODUCTION A comparison of Interpress and PostScript is perhaps most appropriately begun by recounting the history of the development of the two languages. The following additional material on the history of the developments of Interpress and PostScript is based on my first hand knowledge of events that have transpired within Xerox during the past ten years, plus direct conversations with the key participants in the developments of these two languages. It is factual and complete to the best of my knowledge. Others might be able to provide additional information of which I am unaware. MORE ON HISTORY A FORTH like graphics/printing language was developed by, among others, John Warnock before coming to Xerox/PARC. After coming to Xerox, John put together another similar language which he called JaM. Long before JaM was developed another printing format (Press) had been developed and placed in use at Xerox. It was largely the brainchild of Bob Sproull who is now at Carnegie-Mellon. Variants of this effort run most of the Xerox internal printers on the original 3 MBit/Second Ethernet which is still operational within Xerox. A graphics research program known as Cedar Graphics was also pursued at PARC during this same time frame. Finally, leveraging off of all of these earlier activities, what I designate as Research Interpress was created as a combined effort of a number of people at PARC under the management direction of Chuck Geschke. The principal developers were Bob Sproull, Butler Lampson, John Warnock, and Brian Reid, with significant participation from Bob Ayers. (There may have been others whom I have unintentionally slighted because I am simply unaware of their roles.) The resulting Interpress language contains benefits which derive from all of those very talented people. During the course of these developments Xerox permitted publication of some of the Cedar Graphics research effort in a paper authored by John Warnock and Douglas Wyatt titled "A Device Independent Graphics Imaging Model for Use with Raster Devices", in the July 1982 Computer Graphics Volume 16, number 3, pp. 313-320. Xerox also permitted Dr. Leo Guibas, a Stanford professor, to use some of the Interpress related research work as course material for a course at Stanford. I led the engineering effort that extracted a suitable subset of the Research Interpress language, and pushed it through the corporate standards activity and into the product line. The first subset of this language was published internal to Xerox in a Xerox System Integraton Standard (XSIS 048201), titled Interpress 82 Electronic Printing Standard, dated January 1982. Subsequent backward compatible revisions have been internally released. The current externally released version of of Interpress is designated as Interpress Electronic Printing Standard (XSIS 048404), Version 2.1, dated April 1984, and is contained in the documentation set available from Xerox. The Printing Instructions portion of Interpress were added to Research Interpress, and included in the internally published Version 2.0 in June, 1983. After Interpress 82 had been extracted, pushed through the corporate standards process, and incorporated into products, but before Interpress, Version 2.0 had been created, Chuck Geschke and John Warnock left PARC and formed Adobe Systems. They developed PostScript by extending a combination of the work that Warnock had done prior to his work at Xerox, plus the material that Xerox had permitted to enter the public domain through the publication of the above referenced paper, plus the material that Xerox had released to the Stanford course. They carefully avoided including any of the advanced features that Sproull, Lampson, and Warnock had incorporated in Interpress but that Xerox had not publicly released. GENERAL OVERVIEW Again, some caveats about this general overview. It is not presented as fact, but rather as a set of observations as interpreted by one reviewer who has more familiarity with Interpress than with PostScript. Another reviewer might reach a quite different set of conclusions. Also, please note that this discussion deals with attributes of the languages, and does not address issues related to particular implementations of the language. With their thread of common history it is quite natural that Interpress and PostScript turn out to be very similar languages. Their fundamental concepts and structures are substantially the same. I can only speculate about the causes for their differences, but it appears to me that the following issues are fundamental: 1. The developers of the two languages had different perceptions of the application environments in which they were intended to operate. 2. Adobe was precluded from pursuing some of the elegant Xerox proprietary techniques that were not part of the public domain. As a consequence Interpress appears to be richer in higher level structure. PostScript appears to be richer in its more basic structures. These issues are discussed below. Application Environment Considerations The languages appear to have distinctively different viewpoints of their application environments, and of how they properly fit into those environments. The designers of Interpress took the position that the functions of creation and composition are properly the role of creation devices. Printers should print, and should do so in a highly efficient and productive manner. Interpress was designed to describe the results of the creation process to printers in a printer independent fashion. The language recognized that there were some things in the printing domain that the printer could best deal with, and that the creator would not necessarily have knowledge about. It, therefore, made provision for the creator to describe how the document description should adapt itself to the specifics of what it finds in the printer's environment, without knowing a priori what that environment would be. Interpress can be used with a single printer that is tightly coupled to the creator source, but it is also designed so that it can operate in a networked environment in which there may be a multiplicity of printer/servers. In this latter environment the creator may be highly decoupled from the destination printer. Further, in such an environment the printer/server must at all times be in control of its own actions, and an Interpress document may not be allowed to cause the execution of operations that interfere with that control. Interpress is designed for machine to machine communication with no human interaction. In fact, Interpress is designed under the assumption that the document may be printed on a wide variety of printers over an extended period of time, i.e. stored over an extended period of time, later retrieved, and then printed. The designers of PostScript appear to have taken a different viewpoint. PostScript appears to assume an environment in which there is not so clear a separation between the creator and the printer. The creator appears to be in much closer contact with a specific target printer, and possesses much more information on the details of that printer's environment. In fact, a PostScript master appears to have the ability practically to take over complete control of the printer's resources, e.g. open, close, read, and write files. PostScript enables an almost interactive environment with a human creator in the loop. While the language is printer independent, a specific PostScript master appears to be more closely coupled to a target printer than does an Interpress master. PostScript enables much greater print time program control to the PostScript master, and relies on that master to perform many of the actions that Interpress defers to the printer. Further, Adobe has chosen to enrich the more basic aspects of their language to make it a more general purpose composition language. An example of an ideal application for PostScript would be that of a fully functioned Graphics Composition station working in conjunction with a designated printer of known characteristics. It would clearly be a better language for that application than would Interpress. Computing Load Allocation The printing of any complex page creates a significant computing task. Interpress's design tends to force this task to the creator side. PostScript's design tends to push this task to the printer side. As a result Interpress masters tend to enable a high printer throughput capability. PostScript masters tend to impose higher computing loads that lead to slower throughput capabilities at the printer. Note the use of the word "tends" in those last two sentences. What I am trying to say is that the normal use of the natural characteristics of the two languages would lead to the suggested results. However, these are very general observations about the inherent characteristics of the languages. It is clearly possible to create a PostScript master that is highly efficient, and that does not force heavy computation loads on the printer. It is also clearly possible to create an Interpress master that does force heavy computation loads on the printer. IDENTITIES AND STRONG SIMILARITIES The two languages are strongly similar in so many ways that an exhaustive presentation is beyond the scope of this brief analysis. Here are some major points of identity: Both Interpress and PostScript are document description languages. They use a language to describe how to construct the image they want printed on the page. They are device-independent. The description of the page image is in terms of the image, not of the device that the image is to be created on. It is up to the printer to interpret this description, and to create an image that matches it to the best of the printer's capability to do so. Both languages contain two distinct parts, a general purpose programming portion, and a special purpose image generating portion. They both use a FORTH-like postfix notation language, i.e. a reverse Polish notation in which the operands precede their associated operators in the presentation sequence. They both use a stack-oriented processing structure. Operands are pushed into a stack when they are received. Operands are popped from the stack when their associated operator is received. Operator execution results are generally pushed back onto the stack. They both transmit their document representations to the printer in byte streams. These bytes streams are broken down into "tokens", explicitly defined in the Interpress implementation, implicitly defined in the PostScript implementation. Both token streams can be generated on the generator side, and executed on the printer side, in one pass implementations. Both language operate on "typed" operands. Operand types are generally equivalent in the two languages. Both languages have a generalized array processing capability. Such an array is a collection of objects, not necessarily of the same type. Both languages provide means to access arrays by an integer index that designates a specific array entry by its relative position in the array. Arrays may also be organized by using key, value pairs in arbitrary, but paired locations. A value is then located by designating its associated key. Both languages use a universal coordinate system as a reference framework. Both languages are heavily dependent on the use of identical forms of transformation matrices. These are matrices that represent the transformation from a user coordinate system to the reference framework coordinates, and thence to the printer coordinate system. Both use transformations to rotate, scale, and position objects on the page. Both languages enable the construction of procedures that can be repetitively invoked. Procedures can be invoked by mechanisms that save and restore the printer environment so that their effects can be isolated from the rest of the page. Both languages use very similar imaging models. The model is one in which the image is incrementally built starting with a blank page. A page image element, e.g. a character, a pixel array, or a geometrically defined graphic structure, is added to the page by the following process. A "stencil" representing the object is obtained, scaled to size, rotated for orientation, and positioned at a desired location on the page. An opaque "ink" of any color is then "painted" through the stencil, overwriting anything that is currently present on the page. Colors do not mix, they overwrite. Both languages maintain a set of imaging control parameters in an array. Both provide operators that are used to change the state of these parameters. Both languages provide for formally structured representations of fonts. These representations include font name and font metrics as well as font shapes. Both languages enable the creation of fonts with arbitrary character generation techniques, subject only to the constraint that the generation process is describable within the language. PostScript includes language mechanisms for the control and use of a font cache which dynamically stores raster encoded character instances. MAJOR DIFFERENCES In spite of their common ancestry the two languages do contain some major and significant differences. These are catalogued in the following paragraphs. The general sequence of presentation is to present the strengths of Interpress first, followed by those of PostScript. Interpress Strengths Total Environment Interpress has all of the essential qualities of a stand-alone language. However, Interpress has been designed so that it also fits well into an applications and network environment such as the total XNS environment. PostScript is a purely stand-alone language. It makes little, if any, explicit provision to deal with its environment. However, it does contain a number of capabilities which would enable it to do so. Their explicit use for this purpose is not described within the available Adobe documentation. Examples of the integrability of Interpress with its environment abound. It contains a sequenceInsertFile function that enables the inclusion of files accessible to the printer within its total environment. Such files can contain Interpress masters, fragments of interpress masters, or even printer dependent object code that represent previously decomposed Interpress masters, e.g. forms. The printer can utilize the full XNS path name so that an Interpress master can reach out into the entire XNS universe that is attached to the printer network. Interpress takes explicit steps to establish a universal name space and to provide for a central registry mechanism for the distribution and control of names in this space. This provides a means for establishing a uniform environment for an extended family of distributed printers. Interpress contains printer instructions (see below) that are merged with those transmitted by the Printing Protocol that is used to invoke the printing of a document. This enables the document to contain some printing instructions that are document dependent, and the transmission protocol to provide some printing instructions that are user dependent. Interpress makes provision for the interrogation of the printer environment from the master so that the master can adapt itself to that environment. Page Independence Probably the most important difference between the two languages is the fact that an Interpress document possesses a well-defined structure. Among the attributes of this structure is that it guarantees page independence. Page independence means that the language description of each page is totally independent of that of any other page. Ensuring page independence is critically important for a number of reasons. It enables the decomposition and printing of documents in arbitrary page order. (Many printers find it desirable to print last page first. Full duplex printing may require unusual page printing sequences.) It enables the creation of utility routines to manipulate Interpress documents. Such routines can perform such tasks as creating a new Interpress master by pulling together pieces from existing masters, or creating two-up, head-to-toe, or signature masters from existing masters. Because of page independence these operations can be executed without any consideration of the Interpress representation of the document. They need only parse the Interpress master to locate the page breaks which are clearly delimited. PostScript documents are specifically free form and unstructured. The language enables page independence to be achieved through externally imposed programming disciplines, but the language itself provides no such guarantee. In fact, in the absence of a carefully controlled programming discipline it is practically certain that PostScript defined documents will not exhibit page independence. Printer Instructions Interpress contains an extensive set of Printing Instructions. These instructions enable the master to control the actions of the printer, e.g. to invoke two-sided printing or special finishing such as stapling. They also provide information necessary for the effective use of the printer within a multi-user environment, e.g. who printed the document, what its name is, whom to charge for the printing, the provision of passwords to control who can authorize the final printing, and so on. Printing Instructions also enable the declaration of resources that the document will require, e.g. the files that it will use, the fonts and font sizes that it will use. Not only do Printing Instructions enable the control of the printing environment, they also enable an up-front determination of the ability of a given printer to print a document and/or enable it to gather the resources it needs to do so in the most efficient fashion. These might be used by the printer itself, or by a printing environment manager/dispatcher who determines which of a number of printers should receive the document for printing. PostScript makes no explicit provision for any of these functions. Priority Important The availability of multiple colors with opaque printing quality means that rules must be established for the printing of overlapping objects of different colors. PostScript takes no explicit cognizance of this fact. The unambiguous appearance of the final page can only be obtained if one assumes that PostScript defined objects are printed in the sequence in which they are generated. Some printers may not find it convenient to print objects in the order in which they are created within the master. Interpress contains an imaging parameter, priorityImportant, that is used to designate when the printing sequence must match the Interpress presentation sequence. When priorityImportant is not true the printer is free to image objects in a sequence of its own choosing. This can increase printer performance in many cases. Compactness Interpress specifies a compact encoding for the transmission of a document. This encoding reduces to one or two bytes the number of bytes required to designate an Interpress operator. It also includes special encoding notations for compact representations of sequences of literals. These encoding techniques substantially reduce the number of bits required to either store or transmit a document. Simple utility routines are available for the bi-directional translation from this compact format to full English language form ASCII character representations suitable for human usage. PostScript only employs this latter form of more verbose representation. PostScript Strengths File Handling PostScript contains a much more extensive and more powerful set of file handling capabilities than those provided within Interpress. This reflects the viewpoint of the language that the creator is closely coupled to a dedicated printer. It permits the master to take over control of the printer's file resources at print time. The Interpress philosophy of multiple printers, highly decoupled in space and time, and possibly with different file handling techniqes precludes this capability. The Interpress philosophy of not letting the document take over the machine resources also precludes this capability. General Purpose Programming Capability PostScript provides a much richer set of general purpose processing capabilities. It provides a programmer wth a rich set of arithmetic, control, looping, string processing, conversion between object types, signalling, etc., operations. Its use of full ASCII text representation makes it convenient for human programmers to write programs in the language. All of this is in keeping with the PostScript viewpoint previously described. Use of these capabilities can impose heavy processing loads on the printer. Interpress provides a sufficiently rich set of general purpose processing capabilities to meet the needs of the environment for which it was designed. It has been explicitly constrained in these capabilities so as to reduce the processing load on the printer, and, in keeping with the Interpress philosophy, force the processing load to the creator. Procedure Calling Both PostScript and Interpress provide procedure calling capabilities. Both make provision for the establishment of a working space containing local variables for the procedure. Both make provision for saving and restoring the state of the imager control parameters so that the side effects of procedures can be well controlled. Interpress very tightly couples all of these effects in its procedure creation and calling mechanisms. PostScript provides a more flexible, and in many cases more efficient, capability by separating these effects. Graphic Imaging Capabilities PostScript has a much greater set of graphic image creating capabilities than that of the currently released version of Interpress. These include the ability to invoke circles and Bezier curves in either solid or dashed representations. PostScript also includes a clipping region capability, i.e. a defined curve whose interior defines the region in which the current imaging is permitted to occur. PostScript contain a richer set of line joining constructs, including mitering, bevelling, and rounding. The currently released version of Interpress only contains the ability to generate straight line bounded graphic constructs with mitering and rounding at line joins. Circles, conics, and Bezier curves are included in Research Interpress, and are scheduled for later releases of the published language. Thus, the two languages will ultimately be brought into much closer alignment in their graphic imaging capabilitapabilities now, and Interpress won't do so until later. SUMMARY In summary, Interpress was designed for use by a large variety of document creation and document output devices, to be suitable as a general purpose electronic printing standard, a language for printers capable of high performance. It was not designed as a general purpose composition language to be used directly by a programmer. The Interpress model assumes that the user creates Interpress Masters via any variety of document editing and composition systems, including graphics composition languages. It is clearly meant to be a printing standard with emphasis on an organization that presents a clear separation between theprocesses that Xerox believes belong in the creation domain, and processes that Xerox believes belong in the printer's domain. Postscript, on the other hand, appears to have been designed for use both as a programmers composition language and as a language for printers in a tightly coupled stand-alone configuration. It does not draw clear distinctions between creation domain processes and printer domain processes. It is an excellent language for full capability graphics composition applications.