File size: 17,600 Bytes
e10d8e1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | id,question,source
academysoftwarefoundation-openimageio,"Your goal is to migrate the C++ repository located in '/source/C++-Original/' into {target} code.
The new {target} code should be created in the empty '/submission/' directory.
All functionality of the original code (specifically of the `iinfo` CLI tool) must be ported.
The output of any given command should be *exactly* the same. This includes any formatting — from text placement to spacing, exact label strings, comma placement, alignment padding, and trailing newlines.
The '/submission/' directory must contain a Dockerfile that builds and runs the migrated {target} CLI tool.
The CLI tool to migrate is `iinfo`, an image-metadata printer that ships with OpenImageIO. It reads an image file, parses its header (and optionally pixel data), and prints metadata to stdout.
iinfo [options] filename...
Default-mode output (one line per file):
<filename><padding> : <W> x <H>[ x <D>], <NCHAN> channel, <[deep ][volume ]><FORMAT> <FILEFORMAT>[ (<MB> MB)][ (+mipmap)][ (<N> subimages[ +mipmap)])]
Verbose (-v) output adds, after the header line:
<indent>channel list: <name> (<format>), <name> (<format>), ...
<indent>pixel data origin: x=<X>, y=<Y>[, z=<Z>] (only if non-zero origin)
<indent>full/display size: <W> x <H>[ x <D>] (only if differs from data window)
<indent>full/display origin: <X>, <Y>[, <Z>]
<indent>tile size: <TW> x <TH>[ x <TD>] (only if tiled)
<indent><attribute name>: <value> (sorted, case-insensitive, non-namespaced first)
The `<indent>` is ` ` (four spaces) at the top level. With `-a` and multiple subimages, MIP-level stats are indented ` ` (six spaces).
The first column of every output line, including verbose lines, is padded to the longest input filename's length (capped at 40 chars) when no `-f` prefix is requested. With `-f`, every line starts with `<filename> : ` instead.
Errors (file missing, unsupported format, etc.) are printed to **stderr** with the prefix `iinfo ERROR: ""<filename>"" : <message>` and the program exits with status 1 after processing remaining files.
Pay close attention to:
- The exact format string in the header line (`%4d x %4d`, `, N channel, `, etc.). Field-width formatting matters: `iinfo` uses `{:4}` for width/height/depth in some places.
- The `extended_format_name`/`brief_format_name` rules (e.g. `uint8`, `uint16`, `half`, `float`, etc.) — these come from OpenImageIO's TypeDesc names and bit-depth handling.
- Per-attribute value formatting — ints, floats, vectors, and matrices each have their own canonical string forms in OIIO.
- The `--hash` SHA-1 is computed over the raw pixel bytes (per-channel, per-pixel) for each subimage at the highest MIP level.
- The metadata sort order (case-insensitive, non-namespaced attributes before namespaced ones).
- File-format names returned by each plugin (`png`, `jpeg`, `tiff`, `openexr`, `bmp`, `pnm`, `targa`, etc.) — the migration must report the same identifier the OIIO plugin reports.
## Running the Reference Implementation
The reference implementation is available locally under `/reference`. Run `/reference/canary.sh` before probing it; that loads the reference Docker image as `code-migration-reference:current`. Do not copy reference files into `/submission`.",https://github.com/vals-ai/code-migration-public/tree/main/academysoftwarefoundation-openimageio
broadinstitute-gatk,"Your goal is to migrate the Java repository located in '/source/Java-Original/' into {target} code.
The new {target} code should be created in the empty '/submission/' directory.
All functionality of the original code must be ported.
The output of any given command should be *exactly* the same. This includes any formatting - from text placement to color.
The '/submission/' directory must contain a Dockerfile that builds and runs the migrated {target} CLI tool.
Pay special attention to: VCF/BAM output formatting (tab-separated columns, INFO field ordering, header line ordering), numeric formatting in tool output (the Java code uses `Double.toString` and `String.format` with specific patterns — e.g. `232.46` not `232.460000`), and exit codes (0 success, 1 user error, 2 unexpected exception, 3 missing argument).
## Tool Overview
GATK (""Genome Analysis Toolkit"") is a command-line toolkit for variant discovery and genotype analysis on high-throughput sequencing data. The user-facing binary is the `gatk` Python launcher script at the repo root, which dispatches to per-tool implementations defined inside `gatk-package-*-local.jar`.
Invocation shape:
gatk <ToolName> [tool-flags ...]
Each tool is a Java class annotated with `@CommandLineProgramProperties` under `src/main/java/org/broadinstitute/hellbender/tools/`. Tools share a common framework (`org.broadinstitute.hellbender.cmdline`, `engine`, `utils`) that handles argument parsing, BAM/VCF/FASTA I/O via HTSJDK, reference walking, interval handling, and standard option groups.
Common I/O surface that any port must implement faithfully:
- **BAM / SAM / CRAM** read & write, including index files (`.bai`, `.crai`), header parsing (`@HD`, `@SQ`, `@RG`, `@PG`), CIGAR strings, flag bits, MAPQ, mate-pair fields, tag fields (`NM`, `MD`, `RG`, `AS`, …).
- **VCF / BCF / VCF.gz (BGZF)** read & write, including indexes (`.tbi`, `.idx`), all VCF spec versions (3.x, 4.0–4.3), `##INFO`/`##FORMAT`/`##FILTER`/`##contig`/`##META`/`##ALT`/`##PEDIGREE` header lines, multi-sample genotype columns, all type codes (`Integer`, `Float`, `String`, `Character`, `Flag`).
- **FASTA reference + .fai index + .dict sequence dictionary**.
- **BED / Picard interval lists / GATK-style interval strings (`chr1:100-200`)**.
Argument parsing follows the Barclay parser conventions; match the reference's accepted argument forms and per-tool option surface.
## Running the Reference Implementation
The reference implementation is available locally under `/reference`. Run `/reference/canary.sh` before probing it; that loads the reference Docker image as `code-migration-reference:current`. Do not copy reference files into `/submission`.",https://github.com/vals-ai/code-migration-public/tree/main/broadinstitute-gatk
digital-preservation-droid,"Your goal is to migrate the Java repository located in '/source/Java-Original/' into {target} code.
The new {target} code should be created in the empty '/submission/' directory.
All functionality of the original code must be ported.
The output of any given command should be *exactly* the same. This includes any formatting - from text placement to color.
The '/submission/' directory must contain a Dockerfile that builds and runs the migrated {target} CLI tool.
Pay special attention to output formatting: DROID emits CSV by default (`""col1"",""col2"",...`) and JSON with `--json`. Field ordering, quoting rules (escape rules for embedded quotes, `--quote-commas`/`-qc` mode), column subsetting (`--columns`/`-co`), and the URI encoding of file paths (`file:/absolute/path`) all matter.
## Tool Overview
DROID (Digital Record Object Identification) is The National Archives' file-format identification tool. Given a file or directory, it identifies the format by matching internal byte signatures (the PRONOM signature database) and emits one row per identified file. It runs in two modes:
- **No-profile mode** — streams identifications directly to stdout (CSV or JSON), with recursion, signature/container file overrides, and extension filtering. This is the simplest mode.
- **Profile mode** — builds a binary `.droid` profile database from one or more sources, including recursive traversal and filtering controls, then exports it or reports on it.
## Running the Reference Implementation
The reference implementation is available locally under `/reference`. Run `/reference/canary.sh` before probing it; that loads the reference Docker image as `code-migration-reference:current`. Do not copy reference files into `/submission`.",https://github.com/vals-ai/code-migration-public/tree/main/digital-preservation-droid
fonttools-fonttools,"Your goal is to migrate the Python repository located in '/source/Python-Original/' into {target} code.
The new {target} code should be created in the empty '/submission/' directory.
All functionality of the original code must be ported.
The output of any given command should be *exactly* the same. This includes any formatting - from text placement to color.
The '/submission/' directory must contain a Dockerfile that builds and runs the migrated {target} CLI tool.
The tool to migrate is `ttx` — FontTools' font converter that reads TrueType/OpenType font files
and outputs XML (TTX format), or reads TTX XML files and compiles them back to binary fonts.
The primary CLI entry point is `ttx` (see `Lib/fontTools/ttx.py`). The migration must implement the full `ttx` command-line interface for TTF/OTF ↔ TTX XML conversion in both directions. A few behaviors carry specific contracts:
- Dump path (font → TTX XML): output can be routed to stdout, to a named file, to a directory of per-table files, in split-table mode, and in split-glyf mode; the input font is read from standard input when the input filename is `-`.
- Compile path (TTX XML → font): when WOFF is selected as the output container it wraps the SFNT with brotli/zlib and WOFF2 uses brotli; `--with-zopfli` selects Zopfli over zlib for WOFF compression and requires `--flavor woff`.
Pay close attention to:
- The TTX XML format: element names, attribute names, attribute ordering, indentation (2 spaces), and value encoding must match exactly.
- The `sfntVersion` attribute in the root `<ttFont>` element encodes the font's sfnt version bytes (\x00\x01\x00\x00 for TrueType, OTTO for CFF/OTF).
- The `ttLibVersion` attribute in `<ttFont>` should match the Python implementation's version.
- Table-specific XML structure: each font table (head, hhea, cmap, glyf, post, name, OS/2, CFF, fvar, etc.) has its own XML serialization format defined in `Lib/fontTools/ttLib/tables/`.
- The `-l` table listing format: exact column widths, spacing, and hexadecimal formatting.
- Comments inside XML output (e.g., character name comments in cmap, the ""recalculated by compiler"" comment in head/glyf).
The TTX output for an arbitrary input font must be produced by {target} code that parses the SFNT tables itself. If your migration cannot handle a font it has never seen before, it is not a migration.
## Running the Reference Implementation
The reference implementation is available locally under `/reference`. Run `/reference/canary.sh` before probing it; that loads the reference Docker image as `code-migration-reference:current`. Do not copy reference files into `/submission`.",https://github.com/vals-ai/code-migration-public/tree/main/fonttools-fonttools
kivikakk-comrak,"Your goal is to migrate the Rust repository located in '/source/Rust-Original/' into {target} code.
The new {target} code should be created in the empty '/submission/' directory.
All functionality of the original code must be ported.
The output of any given command should be *exactly* the same. This includes any formatting - from text placement to color.
The '/submission/' directory must contain a Dockerfile that builds and runs the migrated {target} CLI tool.
## Extensions
The migrated CLI must accept and implement every extension the upstream comrak CLI exposes via `--extension`.
The `--extension` flag accepts comma-separated values and may be given multiple times; both forms must be supported, and extensions must compose correctly when combined.
The `--gfm` aggregate flag must enable the GFM core set (strikethrough, tagfilter, table, autolink, tasklist) plus `--github-pre-lang` and `--gfm-quirks`, matching the reference.
The `--gemoji` flag (translating shortcodes like `:thumbsup:` into Unicode emoji) must also be implemented.
**Delegating the parse or render step to a third-party Markdown library is forbidden; doing so will fail the task.** A partial reimplementation that exercises some of the surface is preferred over a complete wrapper.
Pay special attention to HTML output formatting: comrak's Rust implementation produces specific tag structures, class names, and attribute ordering that must match exactly.
Key areas to get right:
- GFM table rendering: exact column alignment, `<thead>`, `<tbody>`, `<th align=""..."">` attributes
- Footnote back-references: the exact Unicode `↩` character and superscript numbering format
- Smart punctuation: curly quotes (`“`, `”`, `‘`, `’`), em-dash (`—`), en-dash (`–`), ellipsis (`…`)
- Code block info strings: `<code class=""language-X"">` vs `<pre lang=""X"">` depending on the github-pre-lang setting
- XML output schema: node types, attribute names, nesting structure
- CommonMark output: exact escaping rules, list marker preservation, setext vs ATX headings
## Running the Reference Implementation
The reference implementation is available locally under `/reference`. Run `/reference/canary.sh` before probing it; that loads the reference Docker image as `code-migration-reference:current`. Do not copy reference files into `/submission`.",https://github.com/vals-ai/code-migration-public/tree/main/kivikakk-comrak
z3prover-z3,"Your goal is to migrate the C++ repository located in '/source/C++-Original/' into {target} code.
The new {target} code should be created in the empty '/submission/' directory.
All functionality of the original code must be ported.
The output of any given command should be *exactly* the same. This includes any formatting - from text placement to color.
The '/submission/' directory must contain a Dockerfile that builds and runs the migrated {target} CLI tool.
The Dockerfile's ENTRYPOINT must invoke the migrated CLI in a way that preserves Z3's argv conventions: positional arguments are treated as the input file path (an `[-file:]file` form is also accepted, as is `--` to terminate option parsing), standard input is read with `-in`, and option flags use a single-leading-dash form (e.g. `-smt2`, `-T:10`, `param=value`). Use an absolute path for the launcher (e.g. `ENTRYPOINT [""/usr/local/bin/z3""]`). Do not wrap stdout in any extra prefix/suffix — your migration's stdout must match the reference byte-for-byte.
## What Z3 does
Z3 is a Satisfiability Modulo Theories (SMT) solver from Microsoft Research. The CLI reads an SMT-LIB v2 script (default), or one of several alternate input languages selected via flags, executes its commands (`assert`, `check-sat`, `get-model`, `get-value`, `get-unsat-core`, `eval`, `simplify`, `push`/`pop`, `set-option`, `set-info`, `declare-fun`, `define-fun`, `declare-sort`, `declare-datatypes`, ...), and prints responses to stdout.
Input formats: the CLI selects the input language via flags. SMT-LIB v2 is the default; the reference also supports alternate languages reachable from CLI flags (DIMACS CNF for SAT, weighted CNF for MaxSAT, pseudo-Boolean optimization, a CPLEX LP subset, and TPTP first-order). The fixedpoint engine is reachable through SMT-LIB `(set-logic HORN)`.
Theories Z3 handles include: linear / nonlinear / integer / real arithmetic, bit-vectors, arrays, uninterpreted functions, datatypes (algebraic and tuples / records), floating-point (IEEE 754), strings and sequences, finite sets, and quantifiers (E-matching + MBQI), wherever they are reachable through the CLI input languages.
Pay special attention to:
- The exact stdout format of `check-sat` (`sat`, `unsat`, `unknown`), `(model ... )` blocks, `(get-value (...))` responses, and `(error ""..."")` lines — these must match byte-for-byte.
- Numeric value formatting: rationals printed as `p` or `(/ p q)`, decimals printed only when the SMT-LIB option `pp.decimal` is on, bit-vectors printed as `#b...`, `#x...`, or `(_ bvN k)` depending on context, algebraic reals printed as `(root-obj p k)`, floating-point printed as `(fp #b<sign> #b<exp> #b<sig>)` triples (or as `+oo`, `-oo`, `NaN`, `+zero`, `-zero` when applicable).
- `(declare-fun x () T)` model values vs. `(define-fun x () T ...)` model values — Z3 prints the latter form in models.
- `push` / `pop` scope semantics: assertions, declarations made inside the scope, and `set-option` overrides are all discarded on `pop`.
- `(check-sat-assuming (...))`, `(get-unsat-assumptions)`, `(get-unsat-core)` — the printed assumption / label sets are sets in source order with specific canonicalization.
- Verbose / statistics / `set-option` printing: preserve stdout/stderr routing and reference-defined formatting for verbose messages, statistics, and print-success / model-production options. Statistics emitted to stderr are not byte-compared, but must not leak into stdout.
- Error messages: parse errors are emitted on stdout inside `(error ""..."")` with file:line:column information; option / argument errors are emitted on stderr. The text inside `(error ""..."")` is part of the contract.
- Reference-info / introspection flags (help, version, parameter dumps, tactic / simplifier / probe listings) emit reference-defined text that must match.
## Running the Reference Implementation
The reference implementation is available locally under `/reference`. Run `/reference/canary.sh` before probing it; that loads the reference Docker image as `code-migration-reference:current`. Do not copy reference files into `/submission`.",https://github.com/vals-ai/code-migration-public/tree/main/z3prover-z3
|