littleman-compaction-idioms

Documents proven idioms for reducing footprint and ticks in ICFPC 2026 Littleman programs.

1|Updated Jul 30, 2026
One-click install
npx skills add https://github.com/d-experts/public-icfpc-2026 --skill littleman-compaction-idioms-d-experts
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: littleman-compaction-idioms
Source: https://github.com/d-experts/public-icfpc-2026/tree/main/member-10/skills/littleman-compaction-idioms
Command: npx skills add https://github.com/d-experts/public-icfpc-2026 --skill littleman-compaction-idioms-d-experts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Designing or shrinking Littleman (.man) programs for ICFPC 2026 is hard because the score formula max(w,h)^2 x avg_ticks punishes both area and time, and the effective optimization techniques are non-obvious. This Skill distills the empirically verified design laws and layout idioms extracted from reading every top-scoring team submission, so you stop guessing and apply techniques that are already proven on the official scorer. ## Core Features & Use Cases - Eight measured design laws (L1-L8): output pipes must be 2 cells, H can be skipped via wall-crash termination, walking replaces loops via pipe banks, one send pipe per room, pipes as primary memory, blocking as free synchronization, density as a headroom metric, and fixed-cost measurement via minimal test cases. - Concrete layout and memory idioms: boustrophedon folding of straight-line code, serpentine pipes as large FIFOs, parallel 2-cell pipe bundles as register files, pipe fill-level as a counter via q, ring pipes as drum memory, and grid-embedded constants. - Control-flow compression: XOR+X equality branching in 2 cells, x+] bit-serial unrolling, d/a loop direction selection, S broadcast bus, U receive-and-reverse, and multi-man parallelization. - Use Case: When your .man solution seems unshrinkable, measure its density (L7); if below 80%, apply the pipe-bank and serpentine-FIFO restructuring idioms, then verify topology with lman check and per-case ticks with lman test. ## Quick Start Ask the assistant to review your .man file using the littleman compaction idioms and suggest footprint and tick reductions.

Frequently Asked Questions about littleman-compaction-idioms

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce the footprint of a Littleman .man program?▼

Prioritize shortening the long edge since score is max(w,h)^2 times avg_ticks. Fold straight-line code with boustrophedon routing, pack memory into serpentine pipes, and measure density; below 80% means the layout can still be folded tighter.

How do I reduce tick count in Littleman solutions?▼

First separate fixed costs from variable costs by testing the minimal input case with lman test. Replace BP-counter loops with pipe banks where walking indexes elements, and keep output pipes at 2 cells since their length adds directly to the final output tick.

Can I shorten long pipes in an existing Littleman solution?▼

No. Long pipes are load-bearing: their length encodes memory capacity and synchronization delay. Shortening matmul's 265-cell pipes to 32 caused all tests to time out. Rewire only by re-serpentining while preserving exact length.

Why does my Littleman program crash after producing correct output?▼

Errors kill the entire program and discard in-pipe values; flushing only happens when all men halt with H. Wall-crash termination is safe only for the man emitting the final output, and only when the output pipe is at most 3 cells.

What is the q instruction used for in Littleman?▼

q reads the number of values currently held in the nearest receive pipe into BP, letting a pipe itself act as a counter. The brackets top solution uses it to track nesting depth, with increment and decrement costing just one s or r cell.

When should I use multiple little men instead of one complex room?▼

Splitting into many small dedicated rooms with one man each is often smaller than writing flag-branch logic in a single room. The brackets best solution uses 8 H instructions across parallel rooms, and finished men simply halt with H.