code-generation CAP-0004 · active

Generating and editing working code

Whether a model can write correct code from a specification, and go beyond isolated functions to real repository-scale editing and debugging.

Tags: reasoning, agentic

Distinct from secure-coding, which is specifically about vulnerability patterns and dependency hallucination. This is about raw functional correctness — does the generated code actually pass held-out tests — and, at the harder end, whether a model can navigate and edit an existing codebase rather than writing an isolated function from scratch. Static, fixed-problem benchmarks saturate and leak into training data over time, which is why contamination-resistant, continuously-updated benchmarks matter here more than in most areas.

Claims

Techniques

  • Evolutionary kernel search plus C-level functional repair, tprocess
    A multi-agent pipeline that injects Vitis HLS optimization priors, evolves kernel candidates under simulation feedback, verifies and repairs functional correctness by de-HLSifying the kernel and running C++ test programs, then generates hos
  • Evolve component boundaries by modularity metrics until convprocess
    Maintain a requirement-level and a component-level DAG with an alignment relation, and apply split/merge/revise/save actions triggered by cohesion and coupling thresholds until no action is eligible, then generate code against the converged
  • Inject proof-graph correctness obligations, then consolidatetraining
    Parses reference Python into a region-level implementation graph, aligns those regions with kernel-checked Lean proof-flow transitions to generate region-level obligation text, trains the model jointly on code plus obligation/concept predic
  • Inject self-refined LLM test snippets when search stallstooling
    When a search-based test generator makes no fitness progress for N generations, prompt an LLM at class level with an iterative self-refinement loop, parse its test snippets into the generator's internal representation, and merge them into t
  • Mine training data through the language's own interpretertraining
    Generate candidate programs from natural-language instructions with a frontier LLM, keep only those that pass a deterministic-wording filter, compile and run in the target language's binary, produce non-trivial output, and pass an independe
  • requirements-refinement-before-codingprocess
    requirements-refinement-before-coding, as introduced by the paper it was drafted from.
  • Route prompts, align LoRA to them, verify on public testsprocess
    Picks a task-specific prompt template by keyword heuristics, fine-tunes a LoRA adapter on training inputs rewritten into that same template style, then samples several programs and returns the one passing the most visible public tests.
  • Select training data by quality and structural diversitytraining
    Filter Verilog training samples by testbench-verified correctness and instruction-following-difficulty below 1, then cluster on fused text plus 109-dimensional AST/CFG/netlist features and sample proportionally per cluster by IFD rank.
  • Validate HLS generation to board execution, not simulationprocess
    A multi-agent loop that injects Vitis pragma documentation, evolves kernel candidates under simulation-performance selection, verifies functional correctness on a de-pragma'd C++ harness with targeted repair, then generates host code and co

Sources

Every paper, post or observation behind this capability. Ones cited by a claim show the claim and its stance; ones filed directly are about the capability but have no claim drafted from them yet. Open one to add support or contest it.

Related: Writing secure code and dependencies, Fixing its own mistakes
Suggest a change

Capabilities are a way of carving up the subject, and carvings are arguable. Say so if this one is wrong — especially a proposed one, which a pipeline added because several papers used the same framing, not because anyone decided it was right.