Mary (programming language)

Mary
Paradigmimperative
FamilyALGOL
DeveloperRUNIT
First appeared1971 (1971)
Typing disciplinestatic, strong
OSCross-platform: Kongsberg Våpenfabrikk SM-4, Norsk Data Nord-10/ND-100, Univac-1100 series, ND-100/Sintran-III, i386, SPARC
Influenced by
ALGOL 68

Mary is a programming language designed and implemented by Mark Rain[1] at RUNIT in Trondheim, Norway during the 1970s. It borrowed many features from ALGOL 68 but was designed for systems programming (machine-oriented programming), with a subset of operations being reserved for higher-level usage.[2]

An unusual feature of its syntax was that expressions were constructed using the conventional infix operators, but all of them had the same precedence and evaluation went from left to right unless there were brackets.[3] Assignment had the destination on the right and assignment was considered just another operator.

Similar to C, several language features appear to have existed to allow producing reasonably well optimised code, despite a quite primitive code generator in the compiler. These included operators similar to the += et alter in C and explicit register declarations for variables.

Notable features:

  • Dataflow syntax – values flow from left to right, including assignment
  • Expression-based;[4] most constructs could be used in expressions: blocks, IF, CASE, etc.
  • Text-based recursive macros
  • Overloaded user-defined operators, not constrained to predefined identifiers as in C++
  • Automatic building and dereferencing of pointers from type context
  • Scalar range types
  • Array and set enumeration in loop iterators
  • Dynamic array descriptors (ROW)

Compilers were made for Kongsberg Våpenfabrikk's SM-4 and Norsk Data Nord-10/ND-100 mini-computers. The original Mary compiler was written in NU ALGOL, ran on the Univac-1100 series and was used to bootstrap a native compiler for ND-100/Sintran-III. RUNIT implemented a CHILL compiler written in Mary which ran on ND-100 and had Intel 8086 and 80286 targets. When this compiler was ported to the VAX platform, a common backend for Mary and CHILL was implemented. Later, backends for i386 and SPARC were available. Since the Mary compiler was implemented in Mary, it was possible to run the compiler on all these platforms. An improved version, Mary/2, was developed using a new compiler in the United States.[5]

Mary is no longer maintained.

  1. ^ Cite error: The named reference van der Meulen was invoked but never defined (see the help page).
  2. ^ Cite error: The named reference gjessing was invoked but never defined (see the help page).
  3. ^ Cite error: The named reference maryassign was invoked but never defined (see the help page).
  4. ^ Cite error: The named reference hills was invoked but never defined (see the help page).
  5. ^ Cite error: The named reference mary2 was invoked but never defined (see the help page).

© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search