The Grammar of Code Generation: Detailed CFG Specifications for Graphics Languages

Written by photosynthesis | Published 2025/09/26
Tech Story Tags: code-generator | program-synthesis | code-generation | csg2d | tinysvg | inverse-graphics | tree-diffusion | graphics-language

TLDRThis article provides the complete context-free grammar (CFG) specifications for the domain-specific graphics languages used in this research. via the TL;DR App

Table of Links

Abstract and 1. Introduction

  1. Background & Related Work

  2. Method

    3.1 Sampling Small Mutations

    3.2 Policy

    3.3 Value Network & Search

    3.4 Architecture

  3. Experiments

    4.1 Environments

    4.2 Baselines

    4.3 Ablations

  4. Conclusion, Acknowledgments and Disclosure of Funding, and References

Appendix

A. Mutation Algorithm

B. Context-Free Grammars

C. Sketch Simulation

D. Complexity Filtering

E. Tree Path Algorithm

F. Implementation Details

B Context-Free Grammars

Here we provide the exact context-free grammars of the languages used in this work.

B.1 CSG2D

B.2 TinySVG

Authors:

(1) Shreyas Kapur, University of California, Berkeley ([email protected]);

(2) Erik Jenner, University of California, Berkeley ([email protected]);

(3) Stuart Russell, University of California, Berkeley ([email protected]).


This paper is available on arxiv under CC BY-SA 4.0 DEED license.


Written by photosynthesis | Cultivating life through Photosynthesis, harnessing sunlight to nourish ecosystems and fuel a sustainable future.
Published by HackerNoon on 2025/09/26