11.2 Issues in Problem Modelling
A good formalism for problem modelling should fulfil the following criteria:
Expressive power -
Can we write a formal model of the real world problem?
- Clarity for humans -
How easily can the model be written, read, understood or modified?
- Solvability for computers -
Are there good known methods to solve it?
Higher-level models are typically
closer to the user and close to the problem and therefore
easier to understand and to trust,
easier to debug and to verify,
and easier to modify when customers change their mind.
On the other hand, it is not necessarily easy to see how they can be
solved, because high-level models contain
high-level notions (e.g. sets, tasks) and
The constraint programming approach also addresses one of the classical
sources of error in application development with
traditional programming languages: the transition from a
of the problem to the final program that solves it.
The question is: Can the final program be trusted?
The Constraint (Logic) Programming solution is to
Keep the initial formal model as part of the final program
- Enhance rather than rewrite
The process of enhancing the initial formal model involves for example
Adding control annotations, e.g.
algorithmic information or heuristic information.
Mapping high-level (problem) constraints into
low-level (solver) constraints,
possibly exploiting multiple, redundant mappings.
There are many other approaches to problem modelling software.
The following is a brief comparison:
Formal specification languages (e.g. Z, VDM)
More expressive power than ECLiPSe, but not executable
- Mathematical modelling languages (e.g. OPL, AMPL)
Similar to ECLiPSe, but usually limited expressive power,
e.g. fixed set of constraints.
- Mainstream programming languages (e.g. C++ plus solver library)
Variables and constraints are "aliens" in the language.
Specification is mixed with procedural control.
- Other CLP/high-level languages (e.g. CHIP)
Most similar to ECLiPSe. Less support for hybrid problem solving.
Harder to define new constraints.