This story on HackerNoon has a decentralized backup on Sia.
Transaction ID: S3q0I0QlwUBypfxoDbrjpd4xCSa-68rVuv-T7vokiKc
Cover

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

Written by @photosynthesis | Published on 2025/9/26

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

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.

Figure 10: Examples of the same scene being called multiple times by our sketch observation model.

B.1 CSG2D

B.2 TinySVG

Authors:

(1) Shreyas Kapur, University of California, Berkeley (srkp@cs.berkeley.edu);

(2) Erik Jenner, University of California, Berkeley (jenner@cs.berkeley.edu);

(3) Stuart Russell, University of California, Berkeley (russell@cs.berkeley.edu).


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

[story continues]


Written by
@photosynthesis
Cultivating life through Photosynthesis, harnessing sunlight to nourish ecosystems and fuel a sustainable future.

Topics and
tags
code-generator|program-synthesis|code-generation|csg2d|tinysvg|inverse-graphics|tree-diffusion|graphics-language
This story on HackerNoon has a decentralized backup on Sia.
Transaction ID: S3q0I0QlwUBypfxoDbrjpd4xCSa-68rVuv-T7vokiKc