Nonogram
All formats · Reader spec · Cases and output
nonogram.iris reads the .non subset exported by
webpbn: width, height, rows, and columns, with comma-separated
clues on one line per row or column. Data contains the dimensions and
ragged row and col arrays. A single 0 denotes an empty row or
column and remains [0] in the data. Other keyword lines are skipped.
The format source is Steven Simpson’s
puzzle-file format, also available
through webpbn’s export tool. The reader
spec is copied from
Gecode’s nonogram.cpp.
It requires explicit width and height lines rather than the full
format’s dimension aliases columns N and rows N.
- five-by-five describes a 5×5 X.
- row-too-wide gives its first row a clue of 6.
The reference reports
E-CHECK-FAILEDwith record path[0].
These are hand-made samples under the repository’s MIT license. See the library README for case layout, validation, and Gecode notices.
Reader spec
From Gecode commit 5e7bbd5c26b0702c6fd652356b2289da0710ac3c. Source notices.
Cases and output
Run the commands from the repository root. Successful reads show dzn, JSON, and a summary. Rejected inputs show the CLI's diagnostic and caret, with the stable error code beside it.
five-by-five
Five-by-five X with comma-separated clues
dzn
iris read formats/nonogram/nonogram.iris formats/nonogram/cases/five-by-five/input.txt --dznJSON
iris read formats/nonogram/nonogram.iris formats/nonogram/cases/five-by-five/input.txt --jsonSummary
iris read formats/nonogram/nonogram.iris formats/nonogram/cases/five-by-five/input.txt --summaryrow-too-wide
A row clue is wider than the board
E-CHECK-FAILED
check failed for record 1 of 'row': the clues of a row do not fit into the width of the board
iris read formats/nonogram/nonogram.iris formats/nonogram/cases/row-too-wide/input.txt --dznformats/nonogram/cases/row-too-wide/input.txt:5:1: check failed for record 1 of 'row': the clues of a row do not fit into the width of the board
5 | 6
| ^
spec: formats/nonogram/nonogram.iris:24
Input rejected