Tutorial
Write three reader specs, starting with a header and ending with nested records and checks. Each step shows the complete reader spec at that stage, the input it accepts, and the data returned by the real CLI.
- Read DIMACS CNF: capture a header, skip comments, and read clauses terminated by zero.
- Read TSPLIB sections: match keyword/value headers in any order and read a coordinate section.
- Read job shop records: collect nested records and check each job’s machine use.
Before you start
Section titled “Before you start”Build the CLI and put iris on your PATH.
All commands run from the Iris repository root. The intermediate reader specs
and inputs are files in site/examples/tutorial/. You can edit those files in
a local checkout or copy the displayed text into files of your own and adjust
the command paths. Inputs and reader specs must be UTF-8.
Each step finishes with the actual reader spec from the format library, including the checks and input conventions used by Gecode. The site runs every example when it is built, so the output shown is the CLI’s.
Find a particular construct
Section titled “Find a particular construct”Use the guides for focused examples of patterns, sections, records, parameters and several instances. The Specification defines the exact rules, including cases the tutorial does not cover.