How to Start ACLP
Here are the steps to be taken from writing an ACLP program to
running it:
We can specify the Initial_hypothesis when we
have partial information on the abducible predicates. An important use of
this is when we want to recalculate the solution to a Goal under
some new requirements by adapting the old solution. The old solution
(or part of the old solution) will then form the Initial_hypothesis.
An example of this is the problem of rescheduling.
The Output_variable returns the solution to the
Goal as a list of abducible hypothesis,
with their domain variables constrained according to the dynamic
constraints that were
generated through the unfolding of the ``relevant'' part of the
program and the integrity constraints.
A subsequent step of labeling is also needed on these
variables to have a ground solution of our initial query.
Various other constraint predicates of ECLiPSe can be used at this stage
e.g. min_max/2 or minimize/2 in order to find an optimal
ground solution. One way to achieve this is by following the pattern:
aclp_solve(Goal, Initial_hypothesis, Output_variable),
term_variables(Output_variable, VariablesInAbducibles),
make_cost_expression(VariablesInAbducibles, CostExpression)
min_max(labeling(VariablesInAbducibles), CostExpression).
Back to ACLP home page