MiniZinc

1 program Added 2025-10-27T13:37:11Z Model: google/gemini-2.5-proTemp: 0.4 Evidence Report issue View issues
Aliases: —
Provenance: commit 156902ae75 · authored 2025-10-27T14:37:11+01:00 · model google/gemini-2.5-pro

Sources mentioning this language

6 sources · pl_id: pl/minizinc
LLM (this repo) · 1PldbLinguistWikipediaRosettacodeWikidata · Q86358817

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Paradigmsconstraint · logic
Typingstrong
Designed byMonash University
First appeared2009
Influenced byZinc
LicenseMozilla Public License 2.0
Implemented inC++
Homepagehttps://www.minizinc.org/

Extensions claimed by this language

4 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.dznwikidataprimary94.7K files
.fznwikidataprimary11.3K files
.mznlinguistprimary48.4K files
.mznwikidataprimary48.4K files

Related languages

MiniD (0.31)ZINC (0.31)Minion (0.29)miniMAL (0.27)MiniJava (0.25)

LLM-contributed programs

Australian Scrabble Problem

Provenance: commit 156902ae75 · authored 2025-10-27T14:37:11+01:00 · model google/gemini-2.5-pro · Temp 0.4
code.mzn · added: 2025-10-27T13:37:11Z
include "globals.mzn";

int: n_letters = 26;
set of int: LETTERS = 1..n_letters;

array[LETTERS] of int: scores =
  [1, 3, 3, 2, 1, 4, 2, 4, 1, 8, 5, 1, 3, 1, 1, 3, 10, 1, 1, 1, 1, 4, 4, 8, 4, 10];
array[LETTERS] of int: counts =
  [9, 2, 2, 4, 12, 2, 3, 2, 9, 1, 1, 4, 2, 6, 8, 2, 1, 6, 4, 6, 4, 2, 2, 1, 2, 1];

int: n_tiles = sum(counts);
array[1..n_tiles] of int: tiles =
  [ l | l in LETTERS for i in 1..counts[l] ];

int: n_words;
set of int: WORDS = 1..n_words;
int: max_len;
set of int: POS = 1..max_len;
array[WORDS, POS] of int: word_letters;
array[WORDS] of int: word_len;

array[LETTERS] of var 0..9: letter_value;
var int: score;

constraint assert(sum(counts) == 98, "sum of counts is not 98");

constraint
    alldifferent(letter_value) /\
    letter_value[1] > 0;

constraint
    score = sum(w in WORDS) (
              sum(p in 1..word_len[w]) (
                letter_value[word_letters[w,p]]
              )
            );

array[LETTERS] of var 0..max(counts): used;

constraint
    forall(l in LETTERS) (
        used[l] = sum(w in WORDS) (
                      count(word_letters[w,p] | p in 1..word_len[w], l)
                  )
    );

constraint
    forall(l in LETTERS) (
        used[l] <= counts[l]
    );

solve maximize score;

output ["The score is \(score)\n"] ++
       ["\(l) = \(fix(letter_value[l]));\n" | l in LETTERS];

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Contribute — propose a file extension

Tell us where to find evidence about MiniZinc (mapped to pl/minizinc). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/MiniZinc/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← MiniYAML MiniZinc Data →