Mary (programming language)

This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Mary" programming language – news · newspapers · books · scholar · JSTOR (August 2024) (Learn how and when to remove this message)

|

Mary

Paradigm| imperative
Family| ALGOL
Developer| RUNIT
First appeared| 1971; 54 years ago (1971)
Typing discipline| static, strong
OS| Cross-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.

## Example

[edit]

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.

ELSE

FI + j =: j;
END

## See also

[edit]

* ALGOL 68

## References

[edit]

This article is based on material taken from the Free On-line Dictionary of Computing prior to 1 November 2008 and incorporated under the "relicensing" terms of the GFDL, version 1.3 or later.

1. ^ van der Meulen, S. G. (June 1977). "ALGOL 68 might-have-beens". ACM SIGPLAN Notices. 12 (6): 1–18\. doi:10.1145/872738.807137.
2. ^ Gjessing, Stein; Nygaard, Kristen (1988). ECOOP '88 European Conference on Object-Oriented Programming: Oslo, Norway, August 15-17, 1988. Proceedings. Springer Science & Business Media. ISBN 978-3-540-50053-7.
3. ^ Rain, Mark (January 1973). "Operation expressions in MARY". ACM SIGPLAN Notices. 8 (1): 7–14\. doi:10.1145/986925.986927.
4. ^ Hills, Michael Turner; Kanō, Sadahiko (1976). Programming Electronic Switching Systems: Real-time Aspects and Their Language Implications. Peregrinus [for] the Institution of Electrical Engineers. ISBN 978-0-901223-80-7.
5. ^ Rain, Mark. "The Structure of the MARY/2 Compiler". Software, Practice and Experience. 11. Penobscot Research Center: Wiley: 225–235.

## Further reading

[edit]

* Conradi, Reidar; Holager, Per (1974). MARY Textbook. RUNIT. ISBN 978-82-595-0403-6.

* v
* t
* e

ALGOL

Implementations|

| Technical
standards|

* ALGOL 58
* ALGOL 60
* ALGOL 68

|

Dialects|

* ABC ALGOL
* ALCOR
* ALGO
* ALGOL 68C
* ALGOL 68-R
* ALGOL 68RS (ELLA)
* ALGOL 68S
* ALGOL N
* ALGOL W
* ALGOL X
* Atlas Autocode (Edinburgh IMP)
* Burroughs ALGOL
* CORAL 66
* Dartmouth ALGOL 30
* DASK ALGOL
* DG/L
* Elliott ALGOL
* Executive Systems Problem Oriented Language (ESPOL) → New Executive Programming Language (NEWP)
* FLACC
* IMP
* JOVIAL
* Kidsgrove Algol
* MAD
* Mary
* NELIAC
* RTL/2
* S-algol, PS-algol, Napier88
* Simula
* Small Machine ALGOL Like Language (SMALL)
* SMIL ALGOL

Formalisms|

* Jensen's device
* Van Wijngaarden grammar

Community|

| Organizations|

| Professional
associations|

* ALCOR Group
* Association for Computing Machinery (ACM)
* BSI Group
* Euro-Asian Council for Standardization, Metrology and Certification (EASC)
* International Federation for Information Processing (IFIP) IFIP Working Group 2.1
* Society of Applied Mathematics and Mechanics (GAMM)

|

Business|

* Burroughs Corporation
* Elliott Brothers
* Regnecentralen

Education|

* Case Institute of Technology
* University of Edinburgh
* University of St Andrews
* Manchester University
* Massachusetts Institute of Technology (MIT)

Government|

* Royal Radar Establishment (RRE)

People|

| ALGOL 58|

* John Backus
* Friedrich L. Bauer
* Hermann Bottenbruch
* Charles Katz
* Alan Perlis
* Heinz Rutishauser
* Klaus Samelson
* Joseph Henry Wegstein

MAD|

* Bruce Arden
* Bernard Galler
* Robert M. Graham

ALGOL 60|

* Backus^
* Roland Carl Backhouse
* Bauer^
* Richard Bird
* Stephen R. Bourne
* Edsger W. Dijkstra
* Andrey Ershov
* Robert W. Floyd
* Jeremy Gibbons
* Julien Green
* David Gries
* Eric Hehner
* Tony Hoare
* Jørn Jensen
* Katz^
* Peter Landin
* Tom Maibaum
* Conor McBride
* John McCarthy
* Carroll Morgan
* Peter Naur
* Maurice Nivat
* John E. L. Peck
* Perlis^
* Brian Randell
* Rutishauser^
* Samelson^
* Jacob T. Schwartz
* Micha Sharir
* David Turner
* Bernard Vauquois
* Eiiti Wada
* Wegstein^
* Adriaan van Wijngaarden
* Mike Woodger

Simula|

* Ole-Johan Dahl
* Kristen Nygaard

ALGOL 68|

* Bauer^
* Susan G. Bond
* Bourne^
* Robert Dewar
* Dijkstra^
* Gerhard Goos
* Michael Guy
* Hoare^
* Cornelis H. A. Koster
* Peter Landin
* Charles H. Lindsey
* Barry J. Mailloux
* McCarthy^
* Lambert Meertens
* Naur^
* Peck^
* Willem van der Poel
* Randell^
* Douglas T. Ross
* Samelson^
* Michel Sintzoff
* van Wijngaarden^
* Niklaus Wirth
* Woodger^
* Philip Woodward
* Nobuo Yoneda

* Hal Abelson
* John Barnes
* Tony Brooker
* Ron Morrison
* Peter O'Hearn
* John C. Reynolds

* ALGOL Bulletin

Comparison|

* ALGOL 58 influence on ALGOL 60
* ALGOL 68 to other languages

* ^ = full name and link in prior ALGOL version above
Category: ALGOL Category: ALGOL 60

*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template