Alma-0

From Wikipedia, the free encyclopedia

Alma-0 is a small imperative programming language that includes a limited number of features inspired by the logical programming paradigm. These additions support and encourage declarative programming and make Alma-0 an attractive option for programmers used to imperative languages when facing problems that involve search. The designers of Alma-0 claim that search-oriented solutions built with it are substantially simpler than their counterparts written in purely imperative or logical programming style.

Contents

Since the designers of Alma-0 wanted to create a distinct and substantially simpler proposal than previous attempts at integration of declarative programming constructs (such as automatic backtracking) into imperative programming, the design of Alma-0 was guided by the following 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)

In fact, Alma-0 could be viewed not only as a specific and concrete programming language proposal, but rather 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.

The implemented features in Alma-0 include:

  • use of boolean expressions as statements and vice versa
  • a dual for the FOR statement that introduces non-determinism in the form of choice points and backtracking
  • a FORALL statement that introduces a controlled form of iteration over the backtracking
  • unification which, although limited to the use of equality as assignment, yields a new parameter-passing mechanism.

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.

Advanced Search
Included Web Search Engines


Safe Search

close

Top Matching Results

Occasionally Search.com will highlight specialized results that are based on the context of your query. Examples of specialized results include specific links to news, images, or video.

Top Matching Results may highlight information from other Search.com pages, content from the CNET Network of sites, or third party content. The listings are based purely on relevance. Search.com does not receive payment for listings in this section but our partners that provide this data may get paid for listing these products.

Sponsored Links

This section contains paid listings which have been purchased by companies that want to have their sites appear for specific search terms and related content. These listings are administered, sorted and maintained by a third party and are not endorsed by Search.com.

Search Results

Search.com sends your search query to several search engines at one time and integrates the results into one list which has been sorted by relevance using Search.com's proprietary algorithm. You can customize the list of search engines included in your metasearch from the preferences.

The search engines that are used in your metasearch may allow companies to pay to have their Web sites included within the results. To view the Paid Inclusion policy for a specific search engine, please visit their Web site. Search.com does not accept payment or share revenue with any search engine partner for listings in this section.