We present Yuho, a domain-specific language for encoding statutes as executable, machine-checkable artefacts, and a complete proof-of-concept encoding of all 524 sections of the Singapore Penal Code 1871. The Yuho grammar models the structural primitives of criminal law: section headers and amendment lineage; elements partitioned into actus reus, mens rea, and circumstance with optional burden qualifiers; penalty combinators capturing cumulative, alternative, conditional, and nested punishment regimes; verbatim illustrations; Catala-style prioritised exceptions; and case-law anchors. Mass-encoding the full code surfaced fourteen distinct grammar gaps (G1–G14), all either resolved in the parser or rerouted to a fidelity-diagnostic linter. Yuho's thesis is therefore that the gap between drafted penal sections and an executable artefact is narrower than the existing literature suggests, and an appropriately-shaped grammar dissolves a class of previously-reported encoding obstacles. Importantly, the verification stack does not purport to adjudicate legal correctness since what is machine-checkable is structural and inter-section consistency.
Gabriel Zhe Mian Ong (Fri,) studied this question.