Mary (programming language)

Mary (programming language)
Mary
Paradigm(s) imperative
Appeared in 1970s
Developer RUNIT
Typing discipline static, strong
Influenced by ALGOL 68
OS Cross-platform: Kongsberg Våpenfabrikk SM-4, Norsk Data Nord-10/ND-100, Univac-1100 series, ND-100/SINTRAN-III, i386, SPARC

Mary was a programming language designed and implemented by RUNIT at Trondheim, Norway in the 1970s. It borrowed many features from ALGOL 68 but was designed for machine-oriented programming.

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. 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 programmers to produce 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.
  • 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).

A book describing Mary was printed in 1974 (Fourth and last edition in 1979): Mary Textbook by Reidar Conradi & Per Holager.

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.

Mary is no longer maintained.

Example

BEGIN
   INT i := 10;          %% Variable with initial value.
   REF INT ri := i;      %% Pointer initialized to point to i.
   INT j := 11;
   j :- REF INT =: ri;   %% Type conversion and assignment
                         %% ri now points to j.
   i =: (ri :- VAL REF INT);     
                         %% Assignment and type conversion
                         %% ri points to j so j is changed.
   IF j > 10             %% Conditional statement with result
   THEN                  %% used inside an arithmetic expression.
      1
   ELSE
      2
   FI + j =: j;
END

See also


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • Programming Language Design and Implementation — (PLDI) is one of the ACM SIGPLAN s most important conferences. The precursor of PLDI was the Symposium on Compiler Optimization, held July 27–28, 1970 at the University of Illinois at Urbana Champaign and chaired by Robert S. Northcote. That… …   Wikipedia

  • Escher (programming language) — Escher is a declarative programming language that supports both functional programming and logic programming models, developed by J.W. Lloyd in the mid 1990s. It was designed mostly as a research and teaching vehicle. The basic view of… …   Wikipedia

  • Miranda (programming language) — Miranda Paradigm(s) lazy, functional, declarative Appeared in 1985 Designed by David Turner Developer …   Wikipedia

  • History of the Dylan programming language — Dylan programming language history first introduces the history with a continuous text. The second section gives a timeline overview of the history and present several milestones and watersheds. The third section presents quotations related to… …   Wikipedia

  • Mary (disambiguation) — Mary may refer to:People with the name MaryMusic* Bloody Mary (band), Italian musical group * Mary (album), a 1999 album by R B singer Mary J. Blige * Mary from Dungloe (festival), the music festival held in Dungloe, Ireland * Mary Mary, gospel… …   Wikipedia

  • Mary — is a female given name. Mary may also refer to: This section lists people commonly referred to solely by this name. Contents 1 Religious contexts 2 Royalty …   Wikipedia

  • language — /lang gwij/, n. 1. a body of words and the systems for their use common to a people who are of the same community or nation, the same geographical area, or the same cultural tradition: the two languages of Belgium; a Bantu language; the French… …   Universalium

  • Mary Ann Horton — For other people named Mark Horton, see Mark Horton (disambiguation). Mary Ann Horton Mary Ann Horton, formerly Mark R. Horton (born November 21, 1955), is a Usenet and Internet pioneer. Horton contributed to Berkeley UNIX (BSD), including the vi …   Wikipedia

  • Mary Whitehouse — For the British comedy show, see The Mary Whitehouse Experience. Mary Whitehouse, CBE (born Constance Mary Hutcheson, 13 June 1910 – 23 November 2001) was a British campaigner against the permissive society particularly as the media portrayed and …   Wikipedia

  • List of programming languages — Programming language lists Alphabetical Categorical Chronological Generational The aim of this list of programming languages is to include all notable programming languages in existence, both those in current use and historical ones, in… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”