
A DESCRIPTION OF THE CEDAR LANGUAGE
A DESCRIPTION OF THE CEDAR LANGUAGE
A DESCRIPTION OF THE CEDAR LANGUAGE
XEROX PARC, CSL-83-15, DECEMBER, 1983
XEROX PARC, CSL-83-15, DECEMBER, 1983
XEROX PARC, CSL-83-15, DECEMBER, 1983
A Description of the Cedar Language
Butler W. Lampson
CSL-83-15    March 1986    [P83-00016]

  Copyright 1983, 1986 by Xerox Corporation. All rights reserved.

Abstract: The Cedar Language is a programming language derived from Mesa, which in turn is derived from Pascal.  It is meant to be 
used for a wide variety of programming tasks, ranging from low-level system software to large applications.  In addition to the 
sequential control constructs, static type checking and structured types of Pascal, and the modules, exception handling, and 
concurrency control constructs of Mesa, Cedar also has garbage collection, dynamic types, and a limited form of type 
parameterization.
This report describes the Cedar language.  Except for chapter 2, it is written strictly in the style of a reference manual, not a 
tutorial.  Furthermore, it describes the entire language, including a number of obsolete constructs and historical accidents.  
Hence it tells much more than you probably want to know.  A summary of the safe langauge and comments throughout the manual suggest 
which constructs should be preferred for new programs.
CR Categories and Subject Descriptors: D.3.2 [Programming Languages]: Language Classifications  Cedar, extensible languages; D.3.1 
[Programming Languages]: Formal Definitions and Theory  semantics
Additional Keywords and Phrases: kernel language, polymorphism, data types

XEROX            Xerox Corporation
                Palo Alto Research Center
                3333 Coyote Hill Road
                Palo Alto, California 94304

DRAFT  For Internal Xerox Use Only  DRAFT
PREFACE
    The work described here was completed in late 1983 but not published at that time.  It attempts to provide a reasonably formal and 
    precise definition of the Cedar programming language.  The then current version of the language was perceived as an inadequate 
    base for a number of planned extensions to the language and supporting environment; on the other hand, there was already a 
    large body of Cedar code that could not simply be abandoned.  These problems are dealt with by defining a small but powerful 
    kernel language plus a mapping of existing Cedar constructs into that kernel.  The kernel language introduces value spaces and 
    operations over them that go well beyond what has been available in any implemented version of the Cedar language; it was to 
    provide the basis for extension and simplification.  The mapping from existing Cedar into the kernel provides not only a 
    migration path for existing code but also a definitional method. 
    This report should be of interest to students of programming languages and their definitions.  Most of the interesting ideas of the 
    Cedar language appear in the kernel, which is described in Chapter 2.  Such readers should note that the formalism used to 
    describe the kernel has several known shortcomings.  Its treatment of so-called dependent types is somewhat cavalier.  A 
    subsequent report by Burstall and Lampson [1] includes a more careful treatment of such types in a language very similar to the 
    kernel.  The present treatment also glosses over most of the definitional problems raised by the possibility of concurrent 
    evaluation.
    The report should also be of interest to Cedar programmers.  Chapters 3 and 4 constitute the most complete, precise and accurate 
    definition of the implemented Cedar langauge that has appeared to date.  For a reader willing to make the effort to assimilate 
    the concepts introduced in Chapter 2, this report can serve as an interim reference manual.  The later chapters are painfully 
    honest and complete; as the abstract notes, they say much more than anyone probably wants to know.  As of March 1986, the only 
    known differences between the description and implemention, other than minor bugs in each, are the following:
The improved syntax for ENTRY and INTERNAL has not been implemented; these attributes must still precede the type in a procedure 
declaration (Section 3.5).
Sections 3.3.4 and 4.3.4 document an improved design for opaque types that was never implemented.  In current Cedar, opaque types 
behave as they do in Mesa.
According to Section 4.14, if P is a procedure taking one argument, its application to x using dot notation is written without 
brackets, as x.P.  In current Cedar, the alternative form x.P[] is also accepted.
    Both classes of readers should note that many parts of the kernel language have never been implemented in their full generality.  
    Some of the current developers and users of the Cedar language would not even agree that the directions of evolution suggested 
    by the kernel language are desirable or feasible.  The claims about long-term goals and promised improvements in this report 
    should therefore be taken as the personal opinions of the author. 
    
                    Ed Satterthwaite
                    Xerox Palo Alto Research Center
                    March 1986
                    
 
1.    R. Burstall and B. Lampson, A Kernel Language for Modules and Abstract Data Types'', vol. 19 Digital Systems Research 
Center Report 1, September 1984.
