Mercury (programming language): Difference between revisions

Content deleted Content added
Update release version.
m Template:Infobox programming language parameters: cut fixed size, fills, fix, carriage returns restore. Cut needless whitespace character spaces to standardize, aid work via small screens.
 
(14 intermediate revisions by 14 users not shown)
Line 1:
{{Short description|Functional logic programming language}}
{{For|Mercury Autocode|Autocode}}
{{Distinguish|Mercurial|Mercury (RemObjects BASIC programming language)}}
{{Infobox programming language
| name = Mercury
| logo = Mercury (programming language) logo.jpg
| paradigm = [[Logic programming|Logic]], [[Functional programming|functional]], [[Object-oriented programming|object-oriented]]{{citation needed|date=February 2024}}
| family = [[Prolog]], [[Haskell]]
| designer = Zoltan Somogyi
| developer = [[University of Melbourne]]
| released = {{Start date and age|1995|04|08}}
| latest release version = 22.01.6{{wikidata|property|preferred|references|edit|P348|P548=Q2804309}}
| latest release date = {{Start date and age|2023{{wikidata|05qualifier|10preferred|single|P348|P548=Q2804309|P577}}|df=yes}}
| typing = [[Strong and weak typing|Strongstrong]], [[Type system#Static type checking|static]], [[Polymorphism (computer science)|polymorphic]]
| scope = [[Scope (computer science)|lexical]]
| programming language = Mercury
| platform = [[IA-32]], [[x86-64]], [[ARM architecture family|ARM]], [[SPARC|Sparc64]]64, [[Java (software platform)|Java]], [[Common Language Infrastructure|CLI]]
| operating system = [[Cross-platform software|Cross-platform]]: [[Unix]], [[Linux]], [[macOS]], [[Oracle Solaris (operating system)|Solaris]], [[FreeBSD]], [[OpenBSD]], [[Microsoft Windows|Windows]], [[Android (operating system)|Android]]
| license = [[GNU General Public License|GPL]] compiler,<br />[[GNU Lesser General Public License|LGPL]] standard library
| file ext = .m
| file format =
Line 23:
| implementations = Melbourne Mercury Compiler
| dialects =
| influenced by = [[Prolog]], [[Hope (programming language)|Hope]], [[Haskell (programming language)|Haskell]]
| influenced =
}}
'''Mercury''' is a [[functional logic programming]] language made for real-world uses. The first version was developed at the [[University of Melbourne]], Computer Science department, by Fergus Henderson, Thomas Conway, and Zoltan Somogyi, under Somogyi's supervision, and released on April 8, 1995.
 
Mercury is a purely [[Declarative programming|declarative]] [[logic programming]] language. It is related to both [[Prolog]] and [[Haskell (programming language)|Haskell]].<ref name="motivation">[http://www.mercurylang.org/about/motivation.html The Mercury Project - Motivation]</ref> It features a strong, static, polymorphic [[type system]], and a strong mode and determinism system.
 
The official implementation, the Melbourne Mercury Compiler, is available for most [[Unix]] and [[Unix-like]] platforms, including [[Linux]], [[macOS]], and for [[Microsoft Windows|Windows]].
 
== Overview ==
 
Mercury is based on the logic programming language [[Prolog]]. It has the same syntax and the same basic concepts such as the [[SLD resolution|selective linear definite clause resolution]] (SLD) algorithm. It can be viewed as a pure subset of Prolog with strong types and modes. As such, it is often compared to its predecessor in features and run-time efficiency.
 
Line 41 ⟶ 40:
|last= Somogyi
|first= Zoltan
|last2= Henderson |first2= Fergus |last3= Conway |first3= Thomas
|title= The execution algorithm of Mercury: an efficient purely declarative logic programming language
|journal= Journal of Logic Programming
Line 64 ⟶ 63:
 
===Production level===
* Low-level [[C (programming language)|C]] for [[GNU Compiler Collection]] (GCC), the original Mercury back-end
* High-level C
* [[Java (programming language)|Java]]
* [[C Sharp (programming language)|C#]]
 
===Past===
* [[Assembly language]] via the GCC back-end
* Aditi, a deductive database system also developed at the [[University of Melbourne]]. Mercury-0.12.2 is the last version to support Aditi.{{citation needed|date=January 2014}}
* [[Common Intermediate Language]] (CIL) for the [[.NET Framework]]
* [[Erlang (programming language)|Erlang]]
 
Mercury also features a foreign language interface, allowing code in other languages (depending on the chosen back-end) to be linked with Mercury code. The following foreign languages are possible:
Line 137 ⟶ 136:
 
==Release schedule==
The stable release naming scheme was 0.1 up to 0.13 for the first thirteen stable releases. In February 2010 the Mercury project decided to name each stable release by using the year and month of the release. For example 10.04 is for a release made in April 2010.
 
There is often also a periodic snapshot of the development system ''release of the day'' (ROTD)
Line 161 ⟶ 160:
* {{Official website|www.mercurylang.org}}
 
<br />
{{DEFAULTSORT:Mercury (programming language)}}
[[Category:Programming languages]]
[[Category:Cross-platform free software]]
[[Category:Functional languages]]
[[Category:Functional logic programming languages]]
[[Category:Logic programming languages]]
[[Category:.NET programming languages]]
[[Category:Programming languages created in 1995]]
[[Category:ProgrammingStatically typed programming languages]]