Alma(ID:3739/alm002)

Imperative Constraint Programming Language 


for Towards an Imperative Constraint Programming Language (in Dutch)

CWI Apt et al 1997

Strongly-typed imperative language with declarative features.
ORELSE, EITHER, COMMIT, SOME, FORALL etc

Has constraints and quantifiers. Extension of a subset of Modula-2.




Places
Related languages
Modula-2 => Alma   Subset
Modula-2 => Alma   Extension of
Alma => Alma-O   Evolution of

References:
  • K.R. Apt, A. Schaerf. "Search and Imperative Programming" view details ps Abstract: We augment the expressive power of imperative programming in order to make it a more attractive vehicle for problems that involve search.The proposed additions are limited yet powerful and are inspired by the logic programming paradigm.We illustrate their use by presenting solutions to a number of classical problems, including the straight search problem, the knapsack problem, and the 8 queens problem. These solutions are substantially simpler than their counterparts written in the conventional way and can be used for different purposes without any modification.
    The proposed language is an intermediate stage on the road towards a realization of a strongly typed constraint programming language that combines the advantages of the logic programming and imperative programming.
          in [ACM SIGACT-SIGPLAN] 24th Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL '97), Paris, France view details
  • Saraswat, V. ; R. Jagadeesan, and V. Gupta. Programming in timed concurrent constraint languages. view details ps
          in [ACM SIGACT-SIGPLAN] 24th Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL '97), Paris, France view details
  • Apt, Krzysztof R ; Bezem, Marc "Formulas as Programs" view details Abstract: We provide here a computational interpretation of first-order logic based on a constructive interpretation of satisfiability w.r.t. a fixed but arbitrary interpretation. In this approach the formulas themselves are programs. This contrasts with the so-called formulas as types approach in which the proofs of the formulas are typed terms that can be taken as programs. This view of computing is inspired by logic programming and constraint logic programming but differs from them in a number of crucial aspects. Formulas as programs is argued to yield a realistic approach to programming that has been realized in the implemented programming language ALMA-0 (Apt et al.) that combines the advantages of imperative and logic programming. The work here reported can also be used to reason about the correctness of non-recursive ALMA-0 programs that do not include destructive assignment. External link: Online copy Extract: Motivations
    Motivations
    Rule-based programming began with AI rule-based systems in the seventies. This paradigm is inherent in Prolog and has been used in program-manipulation systems like Refine. Indeed, the rewriting concept appears throughout CS, from its theoretical foundations to very practical implementations. Extreme examples include the mail system in Unix which uses rules in order to rewrite mail addresses to canonical forms and the transition rules describing the behaviour of tree automata. Rewriting is used in semantics in order to describe the meaning of programming languages, as well as in program transformations like the re-engineering of Cobol programs. It is used to compute, implicitly or explicitly, as in Mathematica or OBJ, but also to perform deduction when using inference rules to describe a logic, theorem prover or constraint solver. Last, but not least, this approach is central to systems that raise the notion of rule to an explicit first class object, like expert systems, programming languages based on equational logic, algebraic specifications (e.g. OBJ), functional programming (e.g. ML) and transition systems (e.g. Murphi).
    Rule-based programming is currently experiencing a renewed period of growth with the emergence of new concepts and systems that allow one to better understand and better use it. From the theoretical side, after the in-depth study of rewriting concepts during the eighties, the nineties saw the emergence of the general concepts of rewriting logic and of the rewriting calculus. On the practical side, new languages, like ASM, ASF+SDF, Claire, ELAN and Maude, and also commercial products, like Ilog Rules, have shown that the concept of rule could be of major interest as a programming tool. In particular, because it is now of practical use, fundamental questions arise, like the theoretical study of the algorithmic complexity of programs written in such languages, as well as their optimisation. Of course, semantics of such languages, compilation techniques and methodological studies of their use should also be explored.

    Rule based programming is closely related to both functional programming (when the term rewrite system is confluent and terminating) as well as classical logic programming (when the rewrite system is used for nondeterministic search). It is therefore deeply related to the main topics of the PLI2000 conferences.

    Accordingly, the purpose of this workshop is to bring together researchers from these various domains to foster fertilisation between theory and practice, as well as to favour the growth of this programming paradigm.

          in The Logic Programming Paradigm: a 25 Years Perspective, K.R. Apt, V. Marek, M. Truszczynski and D.S. Warren (eds), Springer-Verlag, Artificial Intelligence Series view details
  • Apt, Krzysztof R.; Brunekreef, Jacob; Partington, Vincent; Schaerf, Andrea "Alma-O: an imperative language that supports declarative programming" view details Abstract: We describe here an implemented small programming language, called Alma-O, that augments the expressive power of imperative programming by a limited number of features inspired by the logic programming paradigm. These additions encourage declarative programming and make it a more attractive vehicle for problems that involve search. We illustrate the use of Alma-O by presenting solutions to a number of classical problems, including &agr;-&bgr; search, STRIPS planning, knapsack, and Eight Queens. These solutions are substantially simpler than their counterparts written in the imperative or in the logic programming style and can be used for different purposes without any modification. We also discuss here the implementation of Alma-O and an operational, executable, semantics of a large subset of the language.

          in TOPLAS 20(5) Sept 1998 view details
  • Brunekreef, J. Annotated algebraic specification of the syntax and semantics of the programming language Alma-0 Technical report P9803, Department of Mathematics, Computer Science, Physics and Astronomy, University of Amsterdam, The Netherlands, 1998. view details ps
          in TOPLAS 20(5) Sept 1998 view details
  • Apt, Krzysztof R ; Schaerf, Andrea "The Alma Project, or How First-Order Logic Can Help Us in Imperative Programming" view details Abstract: The aim of the Alma 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. External link: Online copy
          in TOPLAS 20(5) Sept 1998 view details