Change search
ReferencesLink to record
Permanent link

Direct link
A Modelling Pearl with Sortedness Constraints
SICStus Prolog.
RISE, Swedish ICT, SICS. Computer Systems Laboratory.
SICStus Prolog.
SICStus Prolog.
Show others and affiliations
Number of Authors: 7
2015 (English)Conference paper (Refereed)
Abstract [en]

Some constraint programming solvers and constraint modelling languages feature the Sort(L,P,S) constraint, which holds if S is a nondecreasing rearrangement of the list L, the permutation being made explicit by the optional list P. However, such sortedness constraints do not seem to be used much in practice. We argue that reasons for this neglect are that it is impossible to require the underlying sort to be stable, so that Sort cannot be guaranteed to be a total-function constraint, and that L cannot contain tuples of variables, some of which form the key for the sort. To overcome these limitations, we introduce the StableKeysort constraint, decompose it using existing constraints, and propose a propagator. This new constraint enables a powerful modelling idiom, which we illustrate by elegant and scalable models of two problems that are otherwise hard to encode as constraint programs.

Place, publisher, year, edition, pages
2015, 9. 27-41 p.
National Category
Computer and Information Science
URN: urn:nbn:se:ri:diva-24472OAI: diva2:1043556
Global Conference on Artificial Intelligence
SICStus Prolog
Available from: 2016-10-31 Created: 2016-10-31

Open Access in DiVA

fulltext(466 kB)7 downloads
File information
File name FULLTEXT01.pdfFile size 466 kBChecksum SHA-512
Type fulltextMimetype application/pdf

Other links

By organisation
Computer and Information Science

Search outside of DiVA

GoogleGoogle Scholar
Total: 7 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

Total: 7 hits
ReferencesLink to record
Permanent link

Direct link