CktFormalizer: Autoformalization of Natural Language into Circuit Representations

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Xiong, Jing, Han, Qi, Ding, Chenchen, Xiao, He, Su, Zunhai, Tao, Chaofan, Wong, Ngai
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909034991321088
author Xiong, Jing
Han, Qi
Ding, Chenchen
Xiao, He
Su, Zunhai
Tao, Chaofan
Wong, Ngai
author_facet Xiong, Jing
Han, Qi
Ding, Chenchen
Xiao, He
Su, Zunhai
Tao, Chaofan
Wong, Ngai
contents LLMs can generate hardware descriptions from natural language specifications, but the resulting Verilog often contains width mismatches, combinational loops, and incomplete case logic that pass syntax checks yet fail in synthesis or silicon. We present CktFormalizer, a framework that redirects LLM-driven hardware generation through a dependently-typed HDL embedded in Lean 4. Lean serves three roles: (i) type checker:dependent types encode bit-width constraints, case coverage, and acyclicity, turning hardware defects into compile-time errors that guide iterative repair; (ii) correctness firewall:compiled designs are structurally free of defects that cause silent backend failures (the baseline loses 20% of correct designs during synthesis and routing; CktFormalizer preserves all of them); (iii) proof assistant:the agent constructs machine-checked equivalence proofs over arbitrary input sequences and parameterized widths, beyond the reach of bounded SMT-based checking. On VerilogEval (156 problems), RTLLM (50 problems), and ResBench (56 problems), CktFormalizer achieves simulation pass rates competitive with direct Verilog generation while delivering substantially higher backend realizability: 95--100% of compiled designs complete the full synthesis, place-and-route, DRC, and LVS flow. A closed-loop PPA optimization stage yields up to 35% area reduction and 30% power reduction through validated architecture exploration, with automated theorem proof ensuring that each optimized variant remains functionally equivalent to its formal specification.
format Preprint
id arxiv_https___arxiv_org_abs_2605_07782
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle CktFormalizer: Autoformalization of Natural Language into Circuit Representations
Xiong, Jing
Han, Qi
Ding, Chenchen
Xiao, He
Su, Zunhai
Tao, Chaofan
Wong, Ngai
Computation and Language
Programming Languages
LLMs can generate hardware descriptions from natural language specifications, but the resulting Verilog often contains width mismatches, combinational loops, and incomplete case logic that pass syntax checks yet fail in synthesis or silicon. We present CktFormalizer, a framework that redirects LLM-driven hardware generation through a dependently-typed HDL embedded in Lean 4. Lean serves three roles: (i) type checker:dependent types encode bit-width constraints, case coverage, and acyclicity, turning hardware defects into compile-time errors that guide iterative repair; (ii) correctness firewall:compiled designs are structurally free of defects that cause silent backend failures (the baseline loses 20% of correct designs during synthesis and routing; CktFormalizer preserves all of them); (iii) proof assistant:the agent constructs machine-checked equivalence proofs over arbitrary input sequences and parameterized widths, beyond the reach of bounded SMT-based checking. On VerilogEval (156 problems), RTLLM (50 problems), and ResBench (56 problems), CktFormalizer achieves simulation pass rates competitive with direct Verilog generation while delivering substantially higher backend realizability: 95--100% of compiled designs complete the full synthesis, place-and-route, DRC, and LVS flow. A closed-loop PPA optimization stage yields up to 35% area reduction and 30% power reduction through validated architecture exploration, with automated theorem proof ensuring that each optimized variant remains functionally equivalent to its formal specification.
title CktFormalizer: Autoformalization of Natural Language into Circuit Representations
topic Computation and Language
Programming Languages
url https://arxiv.org/abs/2605.07782