HOME

TheInfoList



OR:

Mary is a
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
designed and implemented by Mark Rain at
RUNIT runit is an init and service management scheme for Unix-like Operating systems that initializes, supervises, and ends processes throughout the operating system. Runit is a reimplementation of the daemontools process supervision toolkit that ...
in
Trondheim Trondheim ( , , ; ), historically Kaupangen, Nidaros, and Trondhjem (), is a city and municipality in Trøndelag county, Norway. As of 2022, it had a population of 212,660. Trondheim is the third most populous municipality in Norway, and is ...
,
Norway Norway, officially the Kingdom of Norway, is a Nordic countries, Nordic country located on the Scandinavian Peninsula in Northern Europe. The remote Arctic island of Jan Mayen and the archipelago of Svalbard also form part of the Kingdom of ...
during the 1970s. It borrowed many features from
ALGOL 68 ALGOL 68 (short for ''Algorithmic Language 1968'') is an imperative programming language member of the ALGOL family that was conceived as a successor to the ALGOL 60 language, designed with the goal of a much wider scope of application and ...
but was designed for
systems programming Systems programming, or system programming, is the activity of programming computer system software. The primary distinguishing characteristic of systems programming when compared to application programming is that application programming aims t ...
(machine-oriented programming), with a subset of operations being reserved for higher-level usage. 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 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 Register or registration may refer to: Arts, entertainment, and media Music * Register (music), the relative "height" or range of a note, melody, part, instrument, etc. * ''Register'', a 2017 album by Travis Miller * Registration (organ), ...
declarations for
variables Variable may refer to: Computer science * Variable (computer science), a symbolic name associated with a value and whose associated value may be changed Mathematics * Variable (mathematics), a symbol that represents a quantity in a mathemat ...
. Notable features: *
Dataflow In computing, dataflow is a broad concept, which has various meanings depending on the application and context. In the context of software architecture, data flow relates to stream processing or reactive programming. Software architecture Dat ...
syntax – values flow from left to right, including assignment * Expression-based; 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 Norsk Data was a minicomputer manufacturer located in Oslo, Norway. Existing from 1967 to 1998, it had its most active period from the early 1970s to the late 1980s. At the company's peak in 1987, it was the second largest company in Norway and em ...
Nord-10/ND-100 mini-computers. The original Mary compiler was written in NU
ALGOL ALGOL (; short for "Algorithmic Language") is a family of imperative computer programming languages originally developed in 1958. ALGOL heavily influenced many other languages and was the standard method for algorithm description used by the ...
, ran on the Univac-1100 series and was used to bootstrap a native compiler for ND-100/ Sintran-III.
RUNIT runit is an init and service management scheme for Unix-like Operating systems that initializes, supervises, and ends processes throughout the operating system. Runit is a reimplementation of the daemontools process supervision toolkit that ...
implemented a
CHILL In computing, CHILL (an acronym for CCITT High Level Language) is a procedural programming language designed for use in telecommunication switches (the hardware used inside telephone exchanges). The language is still used for legacy systems ...
compiler written in Mary which ran on ND-100 and had
Intel 8086 The 8086 (also called iAPX 86) is a 16-bit computing, 16-bit microprocessor chip designed by Intel between early 1976 and June 8, 1978, when it was released. The Intel 8088, released July 1, 1979, is a slightly modified chip with an external 8-b ...
and
80286 The Intel 80286 (also marketed as the iAPX 286 and often called Intel 286) is a 16-bit microprocessor that was introduced on February 1, 1982. It was the first 8086-based CPU with separate, non-multiplexed address and data buses and also the fi ...
targets. When this compiler was ported to the
VAX VAX (an acronym for virtual address extension) is a series of computers featuring a 32-bit instruction set architecture (ISA) and virtual memory that was developed and sold by Digital Equipment Corporation (DEC) in the late 20th century. The V ...
platform, a common backend for Mary and CHILL was implemented. Later, backends for
i386 The Intel 386, originally released as the 80386 and later renamed i386, is the third-generation x86 architecture microprocessor from Intel. It was the first 32-bit processor in the line, making it a significant evolution in the x86 archite ...
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. 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

*
ALGOL 68 ALGOL 68 (short for ''Algorithmic Language 1968'') is an imperative programming language member of the ALGOL family that was conceived as a successor to the ALGOL 60 language, designed with the goal of a much wider scope of application and ...


References


Further reading

* {{ALGOL programming ALGOL 68 dialect Norsk Data software Kongsberg Gruppen