Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Mary (programming language)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{more citations needed|date=August 2024}} {{Infobox programming language | name =Mary | logo = | paradigm = [[Imperative programming|imperative]] | family = [[ALGOL]] | developer =[[SINTEF|RUNIT]] | released = {{Start date and age|1971}}<!-- If known, add |mm|dd|mf=yes --> | latest_release_version = <!--{{Start date and age|198y|mm|dd|mf=yes}}--> | latest release date = | typing = [[static typing|static]], [[strong typing|strong]] | implementations = | influenced by = [[ALGOL 68]] | influenced = | operating system = [[Cross-platform]]: [[Kongsberg Defence Systems|Kongsberg Våpenfabrikk]] SM-4, [[Norsk Data]] Nord-10/ND-100, Univac-1100 series, [[Norsk Data|ND-100]]/[[Sintran]]-III, [[i386]], [[SPARC]] | license = | website = | file ext = }} '''Mary''' is a [[programming language]] designed and implemented by Mark Rain<ref name="van der Meulen"/> at [[SINTEF|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.<ref name="gjessing"/> An unusual feature of its syntax was that expressions were constructed using the conventional [[infix operator]]s, but all of them had the same precedence and evaluation went from left to right unless there were brackets.<ref name="maryassign"/> Assignment had the destination on the right and assignment was considered just another operator. Similar to [[C (programming language)|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 <code>+=</code> ''et alter'' in C and explicit [[Processor register|register]] [[Declaration (computer programming)|declarations]] for [[Variable (computer science)|variables]]. Notable features: * [[Dataflow]] syntax – values flow from left to right, including assignment * Expression-based;<ref name="hills"/> 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 Defence Systems|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 [[Norsk Data|ND-100]]/[[Sintran]]-III. [[SINTEF|RUNIT]] implemented a [[CHILL]] compiler written in Mary which ran on ND-100 and had [[Intel 8086]] and [[Intel 80286|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.<ref name="mary2"/> 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]] ==References== {{FOLDOC}} {{reflist|refs= <ref name="mary2">{{cite journal |last1=Rain |first1=Mark |title=The Structure of the MARY/2 Compiler |journal=Software, Practice and Experience |volume=11 |pages=225-235 |publisher=[[Wiley (publisher)|Wiley]] |location=Penobscot Research Center}}</ref> <ref name="van der Meulen">{{cite journal |last1=van der Meulen |first1=S. G. |title=ALGOL 68 might-have-beens |journal=ACM SIGPLAN Notices |date=June 1977 |volume=12 |issue=6 |pages=1–18 |doi=10.1145/872738.807137}}</ref> <ref name="maryassign">{{cite journal |last1=Rain |first1=Mark |title=Operation expressions in MARY |journal=ACM SIGPLAN Notices |date=January 1973 |volume=8 |issue=1 |pages=7–14 |doi=10.1145/986925.986927}}</ref> <ref name="hills">{{cite book |last1=Hills |first1=Michael Turner |last2=Kanō |first2=Sadahiko |title=Programming Electronic Switching Systems: Real-time Aspects and Their Language Implications |date=1976 |publisher=Peregrinus [for] the Institution of Electrical Engineers |isbn=978-0-901223-80-7 |language=en}}</ref> <ref name="gjessing">{{cite book |last1=Gjessing |first1=Stein |last2=Nygaard |first2=Kristen |title=ECOOP '88 European Conference on Object-Oriented Programming: Oslo, Norway, August 15-17, 1988. Proceedings |date=1988 |publisher=Springer Science & Business Media |isbn=978-3-540-50053-7 |language=en}}</ref> }} ==Further reading== * {{cite book |last1=Conradi |first1=Reidar |last2=Holager |first2=Per |title=MARY Textbook |date=1974 |publisher=RUNIT |isbn=978-82-595-0403-6 |language=en}} {{ALGOL programming}} [[Category:ALGOL 68 dialect]] [[Category:Norsk Data software]] [[Category:Kongsberg Gruppen]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:ALGOL programming
(
edit
)
Template:Cite book
(
edit
)
Template:FOLDOC
(
edit
)
Template:Infobox programming language
(
edit
)
Template:More citations needed
(
edit
)
Template:Reflist
(
edit
)
Template:Talk other
(
edit
)