Functional relations are ubiquitous in combinatorial problems – the Global Constraint Catalog lists 120 functional constraints. This paper argues that the ability to express functional constraints with functional syntax leads to more elegant and readable models, and that it enables a better translation of the models to different underlying solving technologies such as CP, MIP, or SAT.

Yet, most modelling languages only support built-in functions, such as arithmetic, Boolean, or array access operations. Custom, user-defined functions are either not catered for at all, or they have an ad-hoc implementation without a useful semantics in Boolean contexts and not exploiting potential optimisations.

This paper develops a translation from MiniZinc with user-defined functions to FlatZinc. The translation respects the relational semantics of MiniZinc, correctly dealing with partial functions in arbitrary Boolean contexts. At the same time, it takes advantage of the full potential of common subexpression elimination.


Modelling Language Relational Semantic Partial Function Global Constraint Host Language 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Allen, J.: Anatomy of LISP. McGraw-Hill, Inc., New York (1978)zbMATHGoogle Scholar
  2. 2.
    Beldiceanu, N., Carlsson, M., Flener, P., Pearson, J.: On the reification of global constraints. Constraints 18, 1–6 (2013)MathSciNetCrossRefGoogle Scholar
  3. 3.
    Beldiceanu, N., Carlsson, M., Rampon, J.X.: Global constraint catalog, working version as of October 4, 2012,
  4. 4.
    Feydy, T., Somogyi, Z., Stuckey, P.J.: Half reification and flattening. In: Lee, J. (ed.) CP 2011. LNCS, vol. 6876, pp. 286–301. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  5. 5.
    Frisch, A., Stuckey, P.: The proper treatment of undefinedness in constraint languages. In: Gent, I.P. (ed.) CP 2009. LNCS, vol. 5732, pp. 367–382. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  6. 6.
    Frisch, A.M., Harvey, W., Jefferson, C., Hernández, B.M., Miguel, I.: Essence: A constraint language for specifying combinatorial problems. Constraints 13(3), 268–306 (2008)MathSciNetzbMATHCrossRefGoogle Scholar
  7. 7.
    Guns, T.: Declarative Pattern Mining using Constraint Programming. Ph.D. thesis, Department of Computer Science, K.U.Leuven (2012)Google Scholar
  8. 8.
    Gurobi Optimization, Inc.: Gurobi Optimizer Reference Manual (2012),
  9. 9.
    IBM: ILOG Concert, part of IBM ILOG CPLEX Optimization Studio (2012),
  10. 10.
    Marriott, K., Nethercote, N., Rafeh, R., Stuckey, P., Garcia de la Banda, M., Wallace, M.: The design of the Zinc modelling language. Constraints 13(3), 229–267 (2008)MathSciNetzbMATHCrossRefGoogle Scholar
  11. 11.
    Nethercote, N., Stuckey, P.J., Becket, R., Brand, S., Duck, G.J., Tack, G.: MiniZinc: Towards a standard CP modelling language. In: Bessière, C. (ed.) CP 2007. LNCS, vol. 4741, pp. 529–543. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  12. 12.
    Rendl, A.: Effective Compilation of Constraint Models. Ph.D. thesis, School of Computer Science, University of St. Andrews (2010)Google Scholar
  13. 13.
    Schulte, C., et al.: Gecode, the generic constraint development environment (2009),
  14. 14.
    Van Hentenryck, P.: The OPL Optimization Programming Language. MIT Press (1999)Google Scholar
  15. 15.
    Van Hentenryck, P., Michel, L.: Constraint-Based Local Search. MIT Press (2005)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Peter J. Stuckey
    • 1
  • Guido Tack
    • 2
  1. 1.National ICT Australia (NICTA)University of MelbourneAustralia
  2. 2.National ICT Australia (NICTA) and Faculty of ITMonash UniversityAustralia

Personalised recommendations