TY - GEN
T1 - A Constraint-Based Mathematical Modeling Library in Prolog with Answer Constraint Semantics
AU - Fages, François
N1 - Publisher Copyright:
© The Author(s).
PY - 2024/1/1
Y1 - 2024/1/1
N2 - Constraint logic programming emerged in the late 80’s as a highly declarative class of programming languages based on first-order logic and theories with decidable constraint languages, thereby subsuming Prolog restricted to equality constraints over the Herbrand’s term domain. This approach has proven extremely successful in solving combinatorial problems in the industry which quickly led to the development of a variety of constraint solving libraries in standard programming languages. Later came the design of a purely declarative front-end constraint-based modeling language, MiniZinc, independent of the constraint solvers, in order to compare their performances and create model benchmarks. Beyond that purpose, the use of a high-level modeling language such as MiniZinc to develop complete applications, or to teach constraint programming, is limited by the impossibility to program search strategies, or new constraint solvers, in a modeling language, as well as by the absence of an integrated development environment for both levels of constraint-based modeling and constraint solving. In this paper, we propose to solve those issues by taking Prolog with its constraint solving libraries, as a unified relation-based modeling and programming language. We present a Prolog library for high-level constraint-based mathematical modeling, inspired by MiniZinc, using subscripted variables (arrays) in addition to lists and terms, quantifiers and iterators in addition to recursion, together with a patch of constraint libraries in order to allow array functional notations in constraints. We show that this approach does not come with a significant computation time overhead, and presents several advantages in terms of the possibility of focussing on mathematical modeling, getting answer constraints in addition to ground solutions, programming search or constraint solvers if needed, and debugging models within a unique modeling and programming environment.
AB - Constraint logic programming emerged in the late 80’s as a highly declarative class of programming languages based on first-order logic and theories with decidable constraint languages, thereby subsuming Prolog restricted to equality constraints over the Herbrand’s term domain. This approach has proven extremely successful in solving combinatorial problems in the industry which quickly led to the development of a variety of constraint solving libraries in standard programming languages. Later came the design of a purely declarative front-end constraint-based modeling language, MiniZinc, independent of the constraint solvers, in order to compare their performances and create model benchmarks. Beyond that purpose, the use of a high-level modeling language such as MiniZinc to develop complete applications, or to teach constraint programming, is limited by the impossibility to program search strategies, or new constraint solvers, in a modeling language, as well as by the absence of an integrated development environment for both levels of constraint-based modeling and constraint solving. In this paper, we propose to solve those issues by taking Prolog with its constraint solving libraries, as a unified relation-based modeling and programming language. We present a Prolog library for high-level constraint-based mathematical modeling, inspired by MiniZinc, using subscripted variables (arrays) in addition to lists and terms, quantifiers and iterators in addition to recursion, together with a patch of constraint libraries in order to allow array functional notations in constraints. We show that this approach does not come with a significant computation time overhead, and presents several advantages in terms of the possibility of focussing on mathematical modeling, getting answer constraints in addition to ground solutions, programming search or constraint solvers if needed, and debugging models within a unique modeling and programming environment.
KW - ISO-Prolog
KW - MiniZinc
KW - algebraic modeling languages
KW - answer constraints
KW - attributed variables
KW - constraint logic programming
KW - constraint simplification
KW - constraint solving
KW - meta-predicates
UR - https://www.scopus.com/pages/publications/85194865455
U2 - 10.1007/978-981-97-2300-3_8
DO - 10.1007/978-981-97-2300-3_8
M3 - Conference contribution
AN - SCOPUS:85194865455
SN - 9789819722990
T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
SP - 135
EP - 150
BT - Functional and Logic Programming - 17th International Symposium, FLOPS 2024, Proceedings
A2 - Gibbons, Jeremy
A2 - Miller, Dale
PB - Springer Science and Business Media Deutschland GmbH
T2 - 17th International Symposium on Functional and Logic Programming, FLOPS 2024
Y2 - 15 May 2024 through 17 May 2024
ER -