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
Alma-0
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!
{{Use dmy dates|date=June 2022}} {{Primary sources|date=April 2011}} {{Infobox programming language |name = Alma-0 |logo = |paradigm = [[Multi-paradigm programming language|multi-paradigm]]: [[Constraint programming|constraint]], [[Imperative programming|imperative]], [[Logic programming|logic]] |family = [[Niklaus Wirth|Wirth]] [[Modula]] |designers = [[Krzysztof R. Apt|Krzysztof Apt]], Marc Bezem, Jacob Brunekreef, Vincent Partington, Andrea Schaerf |developer = [[Centrum Wiskunde & Informatica]] |released = {{Start date and age|1997}} |latest release version = |latest release date = |typing = [[Type system|static]] |scope = [[Scope (computer science)|Lexical]] (static) |implementations = Alma-0 |dialects = |influenced by = [[Modula-2]] |website = {{URL|www.cwi.nl/en/alma}} }} '''Alma-0''' is a [[multi-paradigm]] computer [[programming language]]. This language is an augmented version of the imperative [[Modula-2]] language with logic-programming features and convenient [[backtracking]] ability.<ref>{{cite book |last1=Liu |first1=Jed |last2=Myers |first2=Andrew C. |title=Practical Aspects of Declarative Languages |chapter=JMatch: Iterable Abstract Pattern Matching for Java |series=Lecture Notes in Computer Science |year=2003 |volume=2562/2003 |pages=110–127 |doi=10.1007/3-540-36388-2_9 |isbn=978-3-540-00389-2}}</ref> It is small, [[Strongly typed programming language|strongly typed]], and combines [[constraint programming]], a limited number of features inspired by [[logic programming]] and supports [[Imperative programming|imperative]] [[programming paradigm|paradigms]]. The language advocates [[declarative programming]]. The designers claim that search-oriented solutions built with it are substantially simpler than their counterparts written in purely imperative or logic programming style.<ref>{{Cite report |last=Partington |first=Vincent |date=July 1997 |title=Implementation of an Imperative Programming Language with Backtracking |url=http://www.klomp.org/vinny/P9712.pdf |publisher=University of Amsterdam Programming, Research Group |access-date=15 February 2021 |archive-date=29 November 2023 |archive-url=https://web.archive.org/web/20231129091208/http://www.klomp.org/vinny/P9712.pdf |url-status=live }} Also in [http://www.cwi.nl/~apt/partington.ps Postscript] {{Webarchive|url=https://web.archive.org/web/20240531214535/http://www.cwi.nl/~apt/partington.ps |date=31 May 2024 }}.</ref> Alma-0 provides natural, high-level constructs for building search trees.<ref>{{cite journal |last1=Van Hentenryck |first1=Pascal |last2=Perron |first2=Laurent |last3=Puget |first3=Jean-François |date=October 2000 |title=Search and strategies in OPL |journal=ACM Transactions on Computational Logic |volume=1 |issue=2 |pages=285–320 |doi=10.1145/359496.359529 |citeseerx=10.1.1.17.836|s2cid=15926704 }}</ref> ==Overview== Since the designers of Alma-0 wanted to create a distinct and substantially simpler proposal than prior attempts to integrate declarative programming constructs (such as automatic backtracking) into imperative programming, the design of Alma-0 was guided by four principles: * The logic-based extension should be ''downward'' compatible with the underlying imperative programming language * The logic-based extension should be ''upward'' compatible with a future extension that will support [[constraint programming]] * The constructs that will implement the extension should support and encourage declarative programming * The extension should be kept small: nine new features have been proposed and implemented Alma-0 can be viewed not only as a specific and concrete programming language proposal, but also as an example of a ''generic method'' for extending any imperative programming language with features that support declarative programming. The feasibility of the Alma-0 approach has been demonstrated through a full implementation of the language (including a description of its semantics) for a subset of [[Modula-2]].<ref>{{Cite book |last=Dahl |first=Veronica |url=https://books.google.com/books?id=zs2JYJQ3tOEC |title=Practical Aspects of Declarative Languages: 5th International Symposium, PADL 2003, New Orleans, LA, USA, January 13-14, 2003, Proceedings |date=2003-02-12 |publisher=Springer Science & Business Media |isbn=978-3-540-00389-2 |language=en |access-date=25 February 2023 |archive-date=31 May 2024 |archive-url=https://web.archive.org/web/20240531214535/https://books.google.com/books?id=zs2JYJQ3tOEC |url-status=live }}</ref> ==Features== The implemented features in Alma-0 include: *Use of boolean expressions as statements and vice versa *A dual for the <code>FOR</code> statement that introduces non-determinism in the form of ''choice points'' and ''backtracking'' *A <code>FORALL</code> statement that introduces a controlled form of iteration over the backtracking *[[Unification (computer science)|Unification]] which, although limited to the use of equality as assignment, yields a new [[Parameter (computer science)|parameter-passing]] mechanism. ==Imperative and logic programming modes== The Alma-0 designers claim that the assignment, which is usually shunned in pure declarative and logic programming, is actually needed in a number of natural situations, including for counting and recording purposes. They also affirm that the means of expression of such "natural" uses of assignment within the logic programming paradigm are unnatural. == References == {{Reflist}} * Jacob Brunekreef (1998). [https://web.archive.org/web/20110724171948/http://www.science.uva.nl/pub/programming-research/reports/1998/P9803.ps.gz "Annotated Algebraic Specification of the Syntax and Semantics of the Programming Language Alma-0"]. * [[Krzysztof R. Apt]], Jacob Brunekreef, Vincent Partington, Andrea Schaerf (1998). [http://www.cwi.nl/~apt/alma.ps "Alma-0: An Imperative Language that Supports Declarative Programming"]. * [[Krzysztof R. Apt]], Andrea Schaerf (1998). [http://www.cwi.nl/~apt/frocos98.ps "Programming in Alma-0, or Imperative and Declarative Programming Reconciled"]. * [[Krzysztof R. Apt]], Andrea Schaerf (1998). [http://www.cwi.nl/~apt/as2.ps "Integrating Constraints into an Imperative Programming Language"]. * [[Krzysztof R. Apt]], Andrea Schaerf (1999). [http://www.cwi.nl/~apt/langmaack99.ps "The Alma Project, or How First-Order Logic Can Help Us in Imperative Programming"]. {{Modula, Oberon}} [[Category:Modula programming language family]] [[Category:Systems programming languages]] [[Category:Procedural programming languages]] [[Category:Logic programming languages]] [[Category:Multi-paradigm programming languages]] [[Category:Programming languages created in the 20th century]] [[Category:Constraint programming languages]]
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:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite report
(
edit
)
Template:Infobox programming language
(
edit
)
Template:Modula, Oberon
(
edit
)
Template:Primary sources
(
edit
)
Template:Reflist
(
edit
)
Template:Use dmy dates
(
edit
)
Template:Webarchive
(
edit
)