## The Alma Project, or How First-Order Logic Can Help Us in Imperative Programming (1999)

Citations: | 4 - 2 self |

### BibTeX

@MISC{Apt99thealma,

author = {Krzysztof R. Apt and Andrea Schaerf},

title = {The Alma Project, or How First-Order Logic Can Help Us in Imperative Programming},

year = {1999}

}

### OpenURL

### Abstract

The aim of the project is the design of a strongly typed constraint programming language that combines the advantages of logic and imperative programming. The first stage of the project was the design and implementation of Alma-0, a small programming language that provides a support for declarative programming within the imperative programming framework. It is obtained by extending a subset of Modula-2 by a small number of features inspired by the logic programming paradigm. In this paper we discuss the rationale for the design of Alma-0, the benefits of the resulting hybrid programming framework, and the current work on adding constraint processing capabilities to the language. In particular, we discuss the role of the logical and customary variables, the interaction between the constraint store and the program, and the need for lists.

### Citations

784 | Constraint Logic Programming
- Jaffar, Lassez
- 1987
(Show Context)
Citation Context ...erior points. The solution using constraints again truly coincides with the problem specification. It is conceptually much simpler than the solution based on constraint logic programming and given in =-=[10]-=-. TYPE Board = ARRAY [1..M], [1..N] OF CONSTRAINED REAL; VAR i:[1..M]; j:[1..N]; X: Board; BEGIN FOR i := 2 TO M-1 DO FOR j := 2 TO N-1 DO X[i,j] = (X[i+1,j] + X[i-1,j] + X[i,j+1] + X[i,j-1])/4 END EN... |

320 |
A filtering algorithm for constraints of difference in CSPs
- Régin
- 1994
(Show Context)
Citation Context ...TEGER; V[1] = A[1,1]; 1 In some systems, such a constraint is kept in its original form in order to exploit constraint propagation techniques that deal specifically with constraints of this kind, see =-=[17]-=-.FOR i := 2 to N DO V[i] = A[i,i] + V[i-1]; END; V[N] = b; This solution, which one would write for example in ILOG Solver, has the obvious drawback of creating N new unknowns for stating one single ... |

303 |
The CLP(R) language and system
- Jaffar, Michaylow, et al.
- 1992
(Show Context)
Citation Context ...atly facilitates the addition of constraints and partly explains why the integration of constraints into logic programming such as in the case of CHIP (see [19]), Prolog III (see [4]) and CLP(R) (see =-=[11]-=-), to name just three examples, has been so smooth and elegant. Further, logic programming languages provide support for automatic backtracking. However, as already mentioned, in constraint logic prog... |

289 |
An introduction to Prolog III
- COLMERAUER
- 1990
(Show Context)
Citation Context ...l variable). This greatly facilitates the addition of constraints and partly explains why the integration of constraints into logic programming such as in the case of CHIP (see [19]), Prolog III (see =-=[4]-=-) and CLP(R) (see [11]), to name just three examples, has been so smooth and elegant. Further, logic programming languages provide support for automatic backtracking. However, as already mentioned, in... |

237 |
Frequency assignment: theory and application
- Hale
- 1980
(Show Context)
Citation Context ...g programming style we now consider two examples. 3.1 The Frequency Assignment Problem The first problem we discuss is a combinatorial problem from telecommunication. Problem 1. Frequency Assignment (=-=[7]-=-). Given is a set of n cells, C := {c1, c2, . . . , cn} and a set of m frequencies (or channels) F := {f1, f2, . . .,fm}. An assignment is a function which associates with each cell ci a frequency xi ... |

198 |
A meta-environment for generating programming environments
- Klint
- 1993
(Show Context)
Citation Context ... to extend the work carried out in [2] to the language proposal here outlined. More specifically, we envisage to – extend the executable, operational semantics based on the ASF+SDF MetaEnvironment of =-=[12]-=-; – extend both the Alma-0 compiler and its underlying abstract machine AAA; – implement a set of constraint solvers or provide an interface between the language and existing constraint solvers. The f... |

172 | M.: Acyclic programs - Apt, Bezem - 1991 |

163 | Design, implementation, and evaluation of the constraint language cc(fd
- Hentenryck, Saraswat, et al.
- 1993
(Show Context)
Citation Context ...n the program fragment i := 1; j := 2; X[i] <= j; Y[X[i+2]] <> Y[N]; we have two constraints, X[i] <= j and Y[X[i+2]] <> Y[N]. Here X[1] <= 2 is the evaluated form of the first one, while Y[X[3]] <> Y=-=[8]-=- is the evaluated form of the second one. If we deleted the assignment i := 1 the evaluations of both constraints would yield an error. The notion of a failed store is a computationally tractable appr... |

155 |
The Icon Programming Language
- Griswold, Griswold
- 1990
(Show Context)
Citation Context ...lver, has the obvious drawback of creating N new unknowns for stating one single constraint. Therefore we propose the use of lists of unknowns (as done for example in the ICON programming language of =-=[6]-=- for the case of variables), identified by the keyword LIST, upon which constraints of various forms can be stated by means of built-ins. The above program fragment would then be replaced by VAR A: AR... |

54 | Alma-0: An imperative language that supports declarative programming
- Apt, Brunekreef, et al.
- 1998
(Show Context)
Citation Context ...elated Work We concentrate here on the related work involving addition of constraints to imperative languages. For an overview of related work pertaining to the Alma-0 language we refer the reader to =-=[2]-=-. As already mentioned in the introduction, the most successful imperative constraint language is the C++ library ILOG Solver [9]. The main difference between our proposal and ILOG Solver is that the ... |

48 | Beyond the Glass Box: Constraints as Objects - Puget, Leconte - 1995 |

22 |
Computers and Intractability—A Guide to NPCompleteness
- Garey, Johnson
- 1979
(Show Context)
Citation Context ...of jobs to processors, or to impose a constraint that a processor is not available during some periods of time. For example, if processor 2 is not available at time 5, we just use the assignment gantt=-=[2,5]-=- := 0 (where 0 is a dummy value) before invoking the procedure JobShopSchedule. As an example, suppose we have 3 jobs, 3 processors (p1, p2, and p3), the deadline is 20, and the jobs are composed as f... |

21 | 2LP: Linear programming and logic programming
- McAloon, Tretkoff
- 1995
(Show Context)
Citation Context ... at making it transparent to the user. We are aware of two other language proposals in which constraints are integrated into an imperative language — the commercial language CHARME of [14] and 2LP of =-=[13]-=-. In each language some of the issues here discussed have been addressed, but not all of them.More specifically, in CHARME unknowns (called logical variables) and linear constraints on them are allow... |

12 | Search and imperative programming
- Apt, Schaerf
- 1997
(Show Context)
Citation Context ...hen simulated using logic formulas. 1.2 Design Decisions These considerations have led us to a design of a programming language Alma-0. The initial work on the design of this language was reported in =-=[3]-=-; the final description of the language, its implementation and semantics is presented in [2]. In a nutshell, Alma-0 has the following characteristics: – it is an extension of a subset of Modula-2 tha... |

11 |
Mehmet Dincbas. Constraint satisfaction using constraint logic programming
- Hentenryck, Simonis
- 1992
(Show Context)
Citation Context ...n this context a logical variable). This greatly facilitates the addition of constraints and partly explains why the integration of constraints into logic programming such as in the case of CHIP (see =-=[19]-=-), Prolog III (see [4]) and CLP(R) (see [11]), to name just three examples, has been so smooth and elegant. Further, logic programming languages provide support for automatic backtracking. However, as... |

8 |
CHARME: Un langage industriel de programmation par contraintes, illustré par une application chez Renault
- Oplobedu, Marcovitch, et al.
- 1989
(Show Context)
Citation Context ... proposal we aim at making it transparent to the user. We are aware of two other language proposals in which constraints are integrated into an imperative language — the commercial language CHARME of =-=[14]-=- and 2LP of [13]. In each language some of the issues here discussed have been addressed, but not all of them.More specifically, in CHARME unknowns (called logical variables) and linear constraints o... |

6 | Formulas as programs
- Apt, Bezem
- 1999
(Show Context)
Citation Context ...at are placed on them. In particular, by the just introduced syntactic restriction, one cannot use assignment to assign a value to an unknown. So in presence of the above declarations the statements X=-=[1]-=- := 0 and C := 1 are illegal. In contrast, the constraintsX[1] = 0 andC = 1 are legal. Further, the assignments i := X[1] + X[2] and i := Y[X[2]] are also legal statements. Initially each unknown has ... |

3 |
ILOG optimization suite — white paper. Available via http://www.ilog.com
- ILOG
- 1998
(Show Context)
Citation Context ...languages, notably constraint logic programming languages. Up to now, the most successful approach to imperative constraint programming is the object-oriented approach taken by ILOG Solver (see [16], =-=[9]-=-). In this system constraints and variables are treated as objects and are defined withina C++ class library. Thanks to the class encapsulation mechanism and the operator overloading capability of C+... |

3 |
NeMo+ : Object-oriented constraint programming environment based on subdefinite models
- Shvetsov, Telerman, et al.
- 1997
(Show Context)
Citation Context ... operator overloading capability of C++, the user can see constraints almost as if they were a part of the language. A similar approach was independently taken in the NeMo+ programming environment of =-=[18]-=-. In our approach constraints are integrated into the imperative programming paradigm, as “first class citizens” of the language. The interaction between the constraint store and the program becomes t... |