MiniZinc with strings

Roberto Amadini, Pierre Flener, Justin Pearson, Joseph D. Scott, Peter J. Stuckey, Guido Tack

    Research output: Chapter in Book/Report/Conference proceedingChapter (Book)Researchpeer-review

    11 Citations (Scopus)


    Strings are extensively used in modern programming languages and constraints over strings of unknown length occur in a wide range of real-world applications such as software analysis and verification, testing, model checking, and web security. Nevertheless, practically no constraint programming solver natively supports string constraints. We introduce string variables and a suitable set of string constraints as builtin features of the MiniZinc modelling language. Furthermore, we define an interpreter for converting a MiniZinc model with strings into a FlatZinc instance relying only on integer variables. This conversion is obtained via rewrite rules, and does not require any extension of the existing FlatZinc specification. This provides a user-friendly interface for modelling combinatorial problems with strings, and enables both string and non-string solvers to actually solve such problems.

    Original languageEnglish
    Title of host publicationLogic-Based Program Synthesis and Transformation
    Subtitle of host publication26th International Symposium, LOPSTR 2016, Edinburgh, UK, September 6–8, 2016,Revised Selected Papers
    EditorsManuel V. Hermenegildo, Pedro Lopez-Garcia
    Place of PublicationCham, Switzerland
    Number of pages17
    ISBN (Electronic)9783319631394
    ISBN (Print)9783319631387
    Publication statusPublished - 2017
    EventInternational Symposium on Logic-Based Program Synthesis and Transformation 2016 - Edinburgh, United Kingdom
    Duration: 6 Sept 20168 Sept 2016

    Publication series

    NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
    Volume10184 LNCS
    ISSN (Print)0302-9743
    ISSN (Electronic)1611-3349


    ConferenceInternational Symposium on Logic-Based Program Synthesis and Transformation 2016
    Country/TerritoryUnited Kingdom

    Cite this