Alma-0
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. It is small, strongly typed, and combines constraint programming, a limited number of features inspired by logic programming and supports imperative 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. Alma-0 provides natural, high-level constructs for building search trees.
Overview
Since the designers of Alma-0 wanted to create a distinct and substantially simpler proposal than prior attempts to integrate declarative programming constructs 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
The feasibility of the Alma-0 approach has been demonstrated through a full implementation of the language for a subset of Modula-2.
Features
The implemented features in Alma-0 include:- Use of Boolean expressions as statements and vice versa
- A dual for the
FORstatement that introduces non-determinism in the form of choice points and backtracking - A
FORALLstatement 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.