Constraints


Constraints


Expressivity of Constraints

Problem: Knapsack

Given a list of items with a fixed weight, try to pack a sublist of them into a knapsack with weight exactly a quantity W.
Try to solve it in your favourite language before you check the solution in a functional logic language

Uniform Model


Disequality Constraints over the Herbrand Universe


Expressivity of Disequality Constraints over the Herbrand Universe

Problem: Size of a list

Computes the size of a list, understood as the number of different elements.
Try to solve it in your favourite language before you check the solution in a functional logic language

Constraints- Implementation -

Narrowing strategy

Translation to PROLOG

Abstract Machine Implementation


Go to index