Representing and Recovering Programs as Images
How can an image record a program’s nodes, values and references so that a decoder can read them unambiguously? This paper will examine the visual grammar and the rules that connect program structure to a canonical image. It will describe how deterministic decoding reconstructs that image and checks it against the input PNG.
The paper will distinguish two recovery paths. Within the supported profile, the image alone recovers executable source in a canonical form. A matching exact-recovery key contains the original source separately and restores its bytes, including formatting and comments. We will make each path’s information requirements and recovery guarantees explicit.
Parallel Generation and Refinement of Program Structure
Can several connected parts of a program be proposed together and brought into agreement through repeated revision? We plan to study a shared structural state in which some positions are masked. A model would propose nodes, values and references for several positions using the surrounding structure and a specification. Syntax and reference constraints would guide which parts to mask again and refine.
We plan to begin with small programs whose relationships are easy to inspect. Validated candidates would be expressed as supported source and passed through the existing encoding and rendering path. This keeps the question of how to generate a coherent structure separate from the task of recording it precisely in the CodeImage format.
Behavioral Evaluation and Representation Studies for Program Generation
When a generated program satisfies structural constraints, does it also do what the specification requires? We plan to evaluate small functions with explicit inputs and expected behavior, including boundary cases and tasks with different structures. For small, finite input domains, we will compare every input’s result with an independently defined expected result. This will distinguish formal validity from behavioral correctness within the evaluated domain.
We also plan to compare text, linear intermediate representations, graphs and grids carrying the same program information under matched training and generation budgets. By varying the representation and revision strategy separately, we will examine their effects on behavioral errors and computation. The aim is to establish when visual and spatial structure helps program generation, and where it adds cost.