Treffer: On Teaching Constraint-based Modeling and Algorithms for Decision Support in Prolog
Weitere Informationen
International audience ; Constraint programming techniques are particularly successful at solving discrete optimization problems such as resource allocation, scheduling or transport problems which are ubiquitous in the industry. Although historically introduced in the mid 80's with the generalization of Prolog to the class of Constraint Logic Programming languages, those techniques are mainly used today through constraint solving libraries in standard programming languages such as C++, Java, Python, and mainly taught with constraint-based modeling languages such as MiniZinc or Essence, in the tradition of algebraic modeling languages developed for mixed integer linear programming. Nonetheless, the foundations of both constraint solvers and constraint-based models in first-order logic should make of Prolog with its constraint-solving libraries a unique language to teach all aspects of constraint programming, provided missing higher-level MiniZinc-like mathematical modeling language constructs are added to Prolog libraries. This is what I have developed for teaching purposes in SWI-Prolog through a package named modeling. This package contains libraries for defining shorthand functional notations, subscripted variables (arrays in addition to lists), set comprehension (bounded iteration and quantifiers compatible with constraints, in addition to recursion), front-end to constraint solving libraries for shorthand expansions on arrays and reification, and search tree tracing and visualization. This approach makes it possible to teach constraint-based modeling, search programming, and constraint solving with a unique high-level modeling/programming language, Prolog.