Programming in Alma-0, or Imperative and Declarative Programming Reconciled

In [Apt et al., 1998] we introduced the imperative programming language Alma-0 that supports declarative programming. In this paper we illustrate the hybrid programming style of Alma-0 by means of various examples that complement those presented in [Apt et al., 1998]. The presented Alma-0 programs illustrate the versatility of the language and show that “don’t know” nondeterminism can be naturally combined with assignment.

[1]  Krzysztof R. Apt,et al.  The Alma Project, or How First-Order Logic Can Help Us in Imperative Programming , 1999, Correct System Design.

[2]  David S. Johnson,et al.  Computers and In stractability: A Guide to the Theory of NP-Completeness. W. H Freeman, San Fran , 1979 .

[3]  Edsger W. Dijkstra,et al.  Guarded commands, nondeterminacy and formal derivation of programs , 1975, Commun. ACM.

[4]  Victor W. Marek,et al.  The Logic Programming Paradigm: A 25-Year Perspective , 2011 .

[5]  Edmond Schonberg,et al.  Programming with Sets: An Introduction to SETL , 1986 .

[6]  Ralph E. Griswold,et al.  The Icon programming language , 1983 .

[7]  John T. Cunningham,et al.  New Jersey , 1896, The Journal of Comparative Medicine and Veterinary Archives.

[8]  Paul Klint A Meta-Environment for Generating Programming Environments , 1989, Algebraic Methods.

[9]  Riccardo Cesaroni The ALMA project , 2000 .

[10]  Krzysztof R. Apt,et al.  Formulas as Programs , 1998, The Logic Programming Paradigm.

[11]  Jacques Cohen,et al.  Non-Deterministic Algorithms , 1979, CSUR.

[12]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .

[13]  Vincent Partington,et al.  Implementation of an Imperative Programming Language with Backtracking , 1997 .

[14]  Norbert E. Fuchs Specifications are (preferably) executable , 1992, Softw. Eng. J..

[15]  J. J. Brunekreef Annotated algebraic specification of the syntax and the semantics of the programming language \sf Alma-0 , 1998 .