ready to run string constraints?

19 views
Skip to first unread message

Helmut Simonis

unread,
May 28, 2025, 4:33:31 AMMay 28
to MiniZinc
Hi all,
there have been quite a few papers on String constraints in MiniZinc, but they do not seem to have made it into the general release. Is there a ready-to-run or compile-from-sources version of a MiniZinc with String constraints? I would need at least concatenation and length constraints, all string variables have fixed maximal length, but not fixed length. Any pointer to up-to-date versions would be appreciated.

Best

Helmut

guido.tack

unread,
Jun 2, 2025, 2:36:53 AMJun 2
to MiniZinc
Hi,

Unfortunately, this work never made it into the main line MiniZinc development, and there's no version available that would currently be easy to compile and run.

An alternative option is to use standard MiniZinc syntax and encode strings as arrays (with the fixed max length) of var opt A, where A is an enum that represents the alphabet. The constraints from the papers can then be expressed quite directly. I may try to write this up as a simple library of predicates and functions. It wouldn't support the native implementations of those constraints in the backend solvers, but maybe it would be good enough for some applications.

Cheers,
Guido
Reply all
Reply to author
Forward
0 new messages