Original: L EARNING
Revised: L EARNING

Original: TO I NFER G RAPHICS P ROGRAMS FROM
Revised: TO I NFER G RAPHICS P ROGRAMS FROM

Original: H
Revised: H

Original: AND -
Revised: AND -

Original: D RAWN I MAGES
Revised: D RAWN I MAGES

Original: Anonymous authors
Revised: Anonymous authors

Original: Paper under double-blind review
Revised: Paper under double-blind review

Original: A BSTRACT
Revised: A BSTRACT

Original: We introduce a model that learns to convert simple hand drawings into graphics programs written in a subset of L A TEX.
Revised: We introduce a model that learns to convert simple hand drawings into graphics programs written in a subset of L A TEX.

Original: The model combines techniques from deep learning and program synthesis.
Revised: The model combines techniques from deep learning and program synthesis.

Original: We learn a convolutional neural network that proposes plausible drawing primitives that explain an image.
Revised: We learn a convolutional neural network that proposes plausible drawing primitives that explain an image.

Original: These drawing primitives are like a trace of the set of primitive commands issued by a graphics program.
Revised: These drawing primitives are like a trace of the set of primitive commands issued by a graphics program.

Original: We learn a model that uses program synthesis techniques to recover a graphics program from that trace.
Revised: We learn a model that uses program synthesis techniques to recover a graphics program from that trace.

Original: These programs have constructs like variable bindings, iterative loops, or simple kinds of conditionals.
Revised: These programs have constructs like variable bindings, iterative loops, or simple kinds of conditionals.

Original: With a graphics program in hand, we can correct errors made by the deep network, measure similarity between drawings by use of similar high-level geometric structures, and extrapolate drawings.
Revised: With a graphics program in hand, we can correct errors made by the deep network, measure similarity between drawings by use of similar high-level geometric structures, and extrapolate drawings.

Original: Taken together these results are a step towards agents that induce useful, human-readable programs from perceptual input.
Revised: Taken together these results are a step towards agents that induce useful, human-readable programs from perceptual input.

Original:  I NTRODUCTION
Revised:  I NTRODUCTION

Original: How can an agent convert noisy, high-dimensional perceptual input to a symbolic, abstract object, such as a computer program?
Revised: How can an agent convert noisy, high-dimensional perceptual input to a symbolic, abstract object, such as a computer program?

Original: Here we consider this problem within a graphics program synthesis domain.
Revised: Here we consider this problem within a graphics program synthesis domain.

Original: We develop an approach for converting hand drawings into executable source code for drawing the original image.
Revised: We develop an approach for converting hand drawings into executable source code for drawing the original image.

Original: The graphics programs in our domain draw simple ﬁgures like those found in machine learning papers (see Fig. 1a).
Revised: The graphics programs in our domain draw simple ﬁgures like those found in machine learning papers (see Fig. 1a).

Original: [Figure]
Revised: [Figure]

Original: The key observation behind our work is that generating a programmatic representation from an image of a diagram actually involves two distinct steps that require different technical approaches.
Revised: The key observation behind our work is that generating a programmatic representation from an image of a diagram actually involves two distinct steps that require different technical approaches.

Original: The ﬁrst step involves identifying the components such as rectangles, lines and arrows that make up the image.
Revised: The ﬁrst step involves identifying the components such as rectangles, lines and arrows that make up the image.

Original: The second step involves identifying the high-level structure in how the components were drawn.
Revised: The second step involves identifying the high-level structure in how the components were drawn.

Original: In
Revised: In

Original: Fig. 1(b), it means identifying a pattern in how the circles and rectangles are being drawn that is best described with two nested loops, and which can easily be extrapolated to a bigger diagram.
Revised: Fig. 1(b), it means identifying a pattern in how the circles and rectangles are being drawn that is best described with two nested loops, and which can easily be extrapolated to a bigger diagram.

Original: We present a hybrid architecture for inferring graphics programs that is structured around these two steps.
Revised: We present a hybrid architecture for inferring graphics programs that is structured around these two steps.

Original: For the ﬁrst step, our approach uses a deep network to infer a set of primitive shape-drawing commands.
Revised: For the ﬁrst step, our approach uses a deep network to infer a set of primitive shape-drawing commands.

Original: We refer to this set as a trace set since it corresponds to the set of commands in a program’s execution trace but lacks the high-level structure that determines how the program decided to issue them.
Revised: We refer to this set as a trace set since it corresponds to the set of commands in a program’s execution trace but lacks the high-level structure that determines how the program decided to issue them.

Original: The second step involves synthesizing a high-level program capable of producing the trace set identiﬁed by the ﬁrst phase.
Revised: The second step involves synthesizing a high-level program capable of producing the trace set identiﬁed by the ﬁrst phase.

Original: We achieve this by constraint-based program synthesis (Solar Lezama, 2008).
Revised: We achieve this by constraint-based program synthesis (Solar Lezama, 2008).

Original: The program synthesizer searches the space of possible programs for one capable of producing the desired trace  – inducing structures like symmetries, loops, or conditional branches.
Revised: The program synthesizer searches the space of possible programs for one capable of producing the desired trace set – inducing structures like symmetries, loops, or conditional branches.

Original: Although these program synthesizers do not need any training data, we show how to learn a search policy in order to synthesize programs an order of magnitude faster than constraint-based synthesis techniques alone.
Revised: Although these program synthesizers do not need any training data, we show how to learn a search policy in order to synthesize programs an order of magnitude faster than constraint-based synthesis techniques alone.

Original: Images are high-dimensional and unstructured while programs are high-level and symbolic.
Revised: Images are high-dimensional and unstructured while programs are high-level and symbolic.

Original: We resolve this mismatch by advancing a new model of collaboration between these two representations, which we call The Trace Hypothesis:
Revised: We resolve this mismatch by advancing a new model of collaboration between these two representations, which we call The Trace Hypothesis:

Original: The Trace Hypothesis.
Revised: The Trace Hypothesis.

Original: The set of commands issued by a program, which we call a trace set , is the correct liaison between high-dimensional unstructured perceptual input and high-level structured symbolic representations.
Revised: The set of commands issued by a program, which we call a trace set , is the correct liaison between high-dimensional unstructured perceptual input and high-level structured symbolic representations.

Original: The roadmap of our paper is structured around the trace hypothesis, as outlined in Fig.
Revised: The roadmap of our paper is structured around the trace hypothesis, as outlined in Fig.

Original: [Figure]
Revised: [Figure]

Original: Trace set for (j < 3) for (i < 3) if (...) line(...) line(
Revised: for (j < 3) for (i < 3) if (...) line(...

Original: [Figure]
Revised: [Figure]

Original: t
Revised: k

Original: [Figure]
Revised: [Figure]

Original: r k
Revised: og

Original: [Figure]
Revised: [Figure]

Original: og
Revised: yn

Original: [Figure]
Revised: [Figure]

Original: m s yn
Revised: e

Original: [Figure]
Revised: [Figure]

Original: e s i
Revised: i

Original: [Figure]
Revised: [Figure]

Original: The new contributions of this work are: (1) A model that converts sketches to high-level programs: in contrast to converting images to vectors or low-level parses (Huang et al., 2017; Nishida et al., 2016;
Revised: The new contributions of this work are: (1) A model that converts sketches to high-level programs: in contrast to converting images to vectors or low-level parses (Huang et al., 2017; Nishida et al., 2016;

Original: Wu et al., 2017; Beltramelli, 2017; Deng et al., 2017).
Revised: Wu et al., 2017; Beltramelli, 2017; Deng et al., 2017).

Original: An algorithm for learning a policy for efﬁciently searching for programs, building on Levin search (Levin, 1973) and generalizing recent work like DeepCoder (Balog et al., 2016).
Revised: An algorithm for learning a policy for efﬁciently searching for programs, building on Levin search (Levin, 1973) and generalizing recent work like DeepCoder (Balog et al., 2016).

Original: The trace hypothesis: a framework for going from perception to programs, which connects this work to other models of program induction that use traces, like the Neural Program Interpreter (Reed & de Freitas, 2015).
Revised: The trace hypothesis: a framework for going from perception to programs, which connects this work to other models of program induction that use traces, like the Neural Program Interpreter (Reed & de Freitas, 2015).

Original:  N EURAL ARCHITECTURE FOR INFERRING TRACE SETS
Revised:  N EURAL ARCHITECTURE FOR INFERRING TRACE SETS

Original: We developed a deep network architecture for efﬁciently inferring a trace set, T , from an image, I .
Revised: We developed a deep network architecture for efﬁciently inferring a trace set, T , from an image, I .

Original: Our model is a combination of ideas from Neurally-Guided Procedural Models (Ritchie et al., 2016) and Attend-Infer-Repeat (Eslami et al., 2016).
Revised: Our model is a combination of ideas from Neurally-Guided Procedural Models (Ritchie et al., 2016) and Attend-Infer-Repeat (Eslami et al., 2016).

Original: Our model constructs the trace one drawing command at a time.
Revised: Our model constructs the trace one drawing command at a time.

Original: When predicting the next drawing command, the network takes as input the target image I as well as the rendered output of previous drawing commands.
Revised: When predicting the next drawing command, the network takes as input the target image I as well as the rendered output of previous drawing commands.

Original: Intuitively, the network looks at the image it wants to explain, as well as what it has already drawn.
Revised: Intuitively, the network looks at the image it wants to explain, as well as what it has already drawn.

Original: It then decides either to stop drawing or proposes another drawing command to add to the trace; if it decides to continue drawing, the predicted primitive is rendered to its “canvas” and the process repeats.
Revised: It then decides either to stop drawing or proposes another drawing command to add to the trace set; if it decides to continue drawing, the predicted primitive is rendered to its “canvas” and the process repeats.

Original: Fig.
Revised: Fig.

Original: 3 illustrates this architecture.
Revised: 3 illustrates this architecture.

Original: We ﬁrst pass a 256 × 256 target image and a rendering of the trace so far (encoded as a two-channel image) to a convolutional network.
Revised: We ﬁrst pass a 256 × 256 target image and a rendering of the trace so far (encoded as a two-channel image) to a convolutional network.

Original: Given the features extracted by the convnet, a multilayer perceptron then predicts a distribution over the next drawing command to add to the trace; see Tbl.
Revised: Given the features extracted by the convnet, a multilayer perceptron then predicts a distribution over the next drawing command to add to the trace set; see Tbl.

Original: 1 for the drawing commands we currently model.
Revised: 1 for the drawing commands we currently model.

Original: We predict the drawing command token-by-token, 1 conditioning each token both on the image features and on the
Revised: We predict the drawing command token-by-token, 1 conditioning each token both on the image features and on the

Original: [Figure]
Revised: [Figure]

Original: f ea t u r e s
Revised: f ea t u r e s

Original: MLP circle(
Revised: MLP circle(

Original: STN
Revised: STN

Original: MLP
Revised: MLP

Original: X=7,
Revised: X=7,

Original: STN
Revised: STN

Original: MLP
Revised: MLP

Original: Y=12)
Revised: Y=12)

Original: Next drawing command
Revised: Next drawing command

Original: [Figure]
Revised: [Figure]

Original: circle ( x, y )
Revised: circle ( x, y )

Original: Circle at ( x, y ) rectangle ( x 1 , y 1 , x 2 , y 2 )
Revised: Circle at ( x, y ) rectangle ( x 1 , y 1 , x 2 , y 2 )

Original: Rectangle with corners at ( x 1 , y 1 ) & ( x 2 , y 2 ) line ( x 1 , y 1 , x 2 , y 2 , arrow ∈ { 0 , 1 } , dashed ∈ { 0 , 1 } )
Revised: Rectangle with corners at ( x 1 , y 1 ) & ( x 2 , y 2 ) line ( x 1 , y 1 , x 2 , y 2 , arrow ∈ { 0 , 1 } , dashed ∈ { 0 , 1 } )

Original: Line from ( x 1 , y 1 ) to ( x y 2 ) , optionally with an arrow and/or dashed
Revised: Line from ( x 1 , y 1 ) to ( x y 2 ) , optionally with an arrow and/or dashed

Original: STOP
Revised: STOP

Original: Finishes drawing command inference previously generated tokens.
Revised: Finishes drawing command inference previously generated tokens.

Original: We also use a differentiable attention mechanism (Spatial Transformer
Revised: We also use a differentiable attention mechanism (Spatial Transformer

Original: Networks: Jaderberg et al. (2015)) to let the model attend to different regions of the image while predicting each token.
Revised: Networks: Jaderberg et al. (2015)) to let the model attend to different regions of the image while predicting each token.

Original: In Fig.
Revised: In Fig.

Original: 3 the network ﬁrst decided to emit the circle token conditioned on the image features, then it emitted the x coordinate of the circle conditioned on the image features and the circle token, and ﬁnally it predicted the y coordinate of the circle conditioned on the image features, the circle token, and the x coordinate.
Revised: 3 the network ﬁrst decided to emit the circle token conditioned on the image features, then it emitted the x coordinate of the circle conditioned on the image features and the circle token, and ﬁnally it predicted the y coordinate of the circle conditioned on the image features, the circle token, and the x coordinate.

Original: We currently constrain coordinates to lie on a discrete 16 × 16 grid, but the grid could be made arbitrarily ﬁne.
Revised: We currently constrain coordinates to lie on a discrete 16 × 16 grid, but the grid could be made arbitrarily ﬁne.

Original: See supplement for the full details of the architecture, which we implemented in Tensorﬂow (Abadi et al., 2015).
Revised: See supplement for the full details of the architecture, which we implemented in Tensorﬂow (Abadi et al., 2015).

Original: We train the network by sampling trace sets T and target images I for randomly generated scenes and maximizing the likelihood of T given I with respect to the model parameters, θ , by gradient ascent.
Revised: We train the network by sampling trace sets T and target images I for randomly generated scenes and maximizing the likelihood of T given I with respect to the model parameters, θ , by gradient ascent.

Original: We trained the network on 10 5 scenes, which takes a little less than a day on an Nvidia TitanX GPU.
Revised: We trained the network on 10 5 scenes, which takes a little less than a day on an Nvidia TitanX GPU.

Original: Training does not require backpropagation across the sequence of drawing commands: drawing to the canvas ‘blocks’ the gradients, effectively ofﬂoading memory to an external visual store.
Revised: Training does not require backpropagation across the sequence of drawing commands: drawing to the canvas ‘blocks’ the gradients, effectively ofﬂoading memory to an external visual store.

Original: This approach is like an autoregressive version of Attend-Infer-Repeat (Eslami et al., 2016), but critically, without a learned recurrent memory state, e.g. an RNN.
Revised: This approach is like an autoregressive version of Attend-Infer-Repeat (Eslami et al., 2016), but critically, without a learned recurrent memory state, e.g. an RNN.

Original: We can do without an RNN because we learn from ground truth (image, trace) pairs.
Revised: We can do without an RNN because we learn from ground truth (image, trace) pairs.

Original: This allows us to handle scenes with many objects without worrying about the conditioning of gradients as they propagate over long sequences, and makes training more straightforward: it is just maximum likelihood estimation of the model parameters.
Revised: This allows us to handle scenes with many objects without worrying about the conditioning of gradients as they propagate over long sequences, and makes training more straightforward: it is just maximum likelihood estimation of the model parameters.

Original: Our network can “derender” random synthetic images by doing a beam search decoding to recover trace sets maximizing P θ
Revised: Our network can “derender” random synthetic images by doing a beam search decoding to recover trace sets maximizing P θ

Original: [ T | I ] .
Revised: [ T | I ] .

Original: But, if the network makes a mistake (predicts an incorrect drawing command), it has no way of recovering from the error.
Revised: But, if the network makes a mistake (predicts an incorrect drawing command), it has no way of recovering from the error.

Original: To derender an image with n objects, it must correctly predict n commands – so its probability of success will decrease exponentially in n , assuming it has a nonzero chance of making a mistake.
Revised: To derender an image with n objects, it must correctly predict n commands – so its probability of success will decrease exponentially in n , assuming it has a nonzero chance of making a mistake.

Original: For added robustness as n becomes large, we treat the neural network outputs as proposals for a Sequential Monte Carlo (SMC) sampling scheme (Doucet et al., 2001).
Revised: For added robustness as n becomes large, we treat the neural network outputs as proposals for a Sequential Monte Carlo (SMC) sampling scheme (Doucet et al., 2001).

Original: For the SMC sampler, we use pixel-wise distance as a surrogatewith ≤ 12 objects.
Revised: For the SMC sampler, we use pixel-wise distance as a surrogate ≤ 12 objects.

Original: It generalizes to scenes with many more objects.
Revised: It generalizes to scenes with many more objects.

Original: Neither the stochastic search nor the neural network are sufﬁcient on their own.
Revised: Neither the stochastic search nor the neural network are sufﬁcient on their own.

Original: # particles varies by model: we compare the models with equal runtime ( ≈sec/object) for a likelihood function.
Revised: # particles varies by model: we compare the models with equal runtime ( ≈sec/object) for a likelihood function.

Original: The
Revised: The

Original: SMC sampler is designed to produce samples from the distribution ∝
Revised: SMC sampler is designed to produce samples from the distribution ∝

Original: L ( I | render ( T ))
Revised: L ( I | render ( T ))

Original: P θ
Revised: P θ

Original: [ T | I ] , where
Revised: [ T | I ] , where

Original: L ( ·|· ) : image 2 → R uses the distance between two images as a proxy for a likelihood.
Revised: L ( ·|· ) : image 2 → R uses the distance between two images as a proxy for a likelihood.

Original: Unconventionally, the target distribution of the SMC sampler includes the likelihood under the proposal distribution.
Revised: Unconventionally, the target distribution of the SMC sampler includes the likelihood under the proposal distribution.

Original: Intuitively, both the proposal distribution and the distance function offer complementary signals for whether a drawing command is correct.
Revised: Intuitively, both the proposal distribution and the distance function offer complementary signals for whether a drawing command is correct.

Original: Fig.
Revised: Fig.

Original: 4 compares the neural network with
Revised: 4 compares the neural network with

Original: SMC against the neural network by itself or SMC by itself.
Revised: SMC against the neural network by itself or SMC by itself.

Original: Only the combination of the two passes a critical test of generalization: when trained on images with ≤ 12 objects, it successfully parses scenes with many more objects than the training data.
Revised: Only the combination of the two passes a critical test of generalization: when trained on images with ≤ 12 objects, it successfully parses scenes with many more objects than the training data.

Original: We compare with a baseline that models the problem as image captioning (LSTM in Fig. 4).
Revised: We compare with a baseline that models the problem as image captioning (LSTM in Fig. 4).

Original: Given the target image, this baseline produces the trace  in one shot by using a CNN to extract features of the input which are passed to an LSTM which ﬁnally predicts the trace token-by-token.
Revised: Given the target image, this baseline produces the trace set in one shot by using a CNN to extract features of the input which are passed to an LSTM which ﬁnally predicts the trace token-by-token.

Original: This architecture is used in several successful neural models of image captioning (e.g., Vinyals et al.
Revised: This architecture is used in several successful neural models of image captioning (e.g., Vinyals et al.

Original: , but, for this domain, does not sufﬁce to parse cluttered scenes with many objects.
Revised: , but, for this domain, does not sufﬁce to parse cluttered scenes with many objects.

Original: 2. G ENERALIZING TO HAND DRAWINGS
Revised: 2. G ENERALIZING TO HAND DRAWINGS

Original: [Figure] [Figure]
Revised: [Figure] [Figure]

Original: (c) A practical application of our neural network is the automatic conversion of hand drawings into a subset of L A TEX.
Revised: A practical application of our neural network is the automatic conversion of hand drawings into a subset of L A TEX.

Original: We train the model to generalize to hand drawings by introducing noise into the renderings of the training target images.
Revised: We train the model to generalize to hand drawings by introducing noise into the renderings of the training target images.

Original: We designed this noise process to introduce the kinds of variations found in hand drawings (Fig. 5; see supplement for details).
Revised: We designed this noise process to introduce the kinds of variations found in hand drawings (Fig. 5; see supplement for details).

Original: Our neurally-guided SMC procedure used pixel-wise distance as a surrogate for a likelihood function ( L ( ·|· ) in section 2).
Revised: Our neurally-guided SMC procedure used pixel-wise distance as a surrogate for a likelihood function ( L ( ·|· ) in section 2).

Original: But pixel-wise distance fares poorly on hand drawings, which never exactly match the model’s renders.
Revised: But pixel-wise distance fares poorly on hand drawings, which never exactly match the model’s renders.

Original: So, for hand drawings, we learn a surrogate likelihood function, L learned ( ·|· ) .
Revised: So, for hand drawings, we learn a surrogate likelihood function, L learned ( ·|· ) .

Original: The density L learned ( ·|· ) is predicted by a convolutional network that we train to predict the distance between two traces conditioned upon their renderings.
Revised: The density L learned ( ·|· ) is predicted by a convolutional network that we train to predict the distance between two trace sets conditioned upon their renderings.

Original: We train our likelihood surrogate to approximate the symmetric difference, which is the number of drawing commands by which two traces differ:
Revised: We train our likelihood surrogate to approximate the symmetric difference, which is the number of drawing commands by which two trace sets differ:

Original: [Equation]
Revised: [Equation]

Original: Pixel-wise distance metrics are sensitive to the details of how arrows, dashes, and corners are drawn – but we wish to be invariant to these details.
Revised: Pixel-wise distance metrics are sensitive to the details of how arrows, dashes, and corners are drawn – but we wish to be invariant to these details.

Original: So, we learn a distance metric over images that approximates the distance metric in the search space over traces.
Revised: So, we learn a distance metric over images that approximates the distance metric in the search space over traces.

Original: We evaluate our system on 100 hand-drawn ﬁgures; see Fig.
Revised: We evaluate our system on 100 hand-drawn ﬁgures; see Fig.

Original: These were drawn carefully but not perfectly.
Revised: These were drawn carefully but not perfectly.

Original: Because our model assumes that objects are snapped to a 16 × 16 grid, we made the drawings on graph paper.
Revised: Because our model assumes that objects are snapped to a 16 × 16 grid, we made the drawings on graph paper.

Original: For each drawing we annotated a ground truth trace set and have the neurally guided SMC sampler produce many candidate traces for each drawing.
Revised: For each drawing we annotated a ground truth trace set and have the neurally guided SMC sampler produce many candidate traces for each drawing.

Original: For 63% of the drawings, the Top-1 most likely sample exactly matches the ground truth; with more samples, the model ﬁnds traces that are closer to the ground truth annotation (Fig. 8).
Revised: For 63% of the drawings, the Top-1 most likely sample exactly matches the ground truth; with more samples, the model ﬁnds traces that are closer to the ground truth annotation (Fig. 8).

Original: We will show that the program synthesizer corrects some of these small errors (Sec. 4.1).
Revised: We will show that the program synthesizer corrects some of these small errors (Sec. 4.1).

Original:  S YNTHESIZING GRAPHICS PROGRAMS FROM TRACE SETS
Revised:  S YNTHESIZING GRAPHICS PROGRAMS FROM TRACE SETS

Original: Although the trace set of a graphics program describes the contents of a scene it does not encode higher-level features of the image, such as repeated motifs or symmetries.
Revised: Although the trace set of a graphics program describes the contents of a scene it does not encode higher-level features of the image, such as repeated motifs or symmetries.

Original: A graphics program better describes such structures.
Revised: A graphics program better describes such structures.

Original: We seek to synthesize graphics programs from their traces
Revised: We seek to synthesize graphics programs from their trace sets.

Original: We constrain the space of allowed programs by writing down a context free grammar over a space of programs.
Revised: We constrain the space of allowed programs by writing down a context free grammar over a space of programs.

Original: Although it might be desirable to synthesize programs in a Turing-complete language such as Lisp or Python, a more tractable approach is to specify what in the program languages community is called a Domain Speciﬁc Language (DSL) Polozov & Gulwani (2015).
Revised: Although it might be desirable to synthesize programs in a Turing-complete language such as Lisp or Python, a more tractable approach is to specify what in the program languages community is called a Domain Speciﬁc Language (DSL) Polozov & Gulwani (2015).

Original: Our DSL (Tbl. 2) encodes prior knowledge of what graphics programs tend to look like.
Revised: Our DSL (Tbl. 2) encodes prior knowledge of what graphics programs tend to look like.

Original: [Table]
Revised: [Table]

Original: [Equation]
Revised: [Equation]

Original: [Table]
Revised: [Table]

Original: Given the DSL and a trace  T , we want to recover a program that both evaluates to T and, at the same time, is the “best” explanation of T .
Revised: Given the DSL and a trace set T , we want to recover a program that both evaluates to T and, at the same time, is the “best” explanation of T .

Original: For example, we might prefer more general programs or, in the spirit of Occam’s razor, prefer shorter programs.
Revised: For example, we might prefer more general programs or, in the spirit of Occam’s razor, prefer shorter programs.

Original: We wrap these intuitions up into a cost function over programs, and seek the minimum cost program consistent with T :
Revised: We wrap these intuitions up into a cost function over programs, and seek the minimum cost program consistent with T :

Original: [Equation]
Revised: [Equation]

Original: We deﬁne the cost of a program to be the number of Statement’s it contains (Tbl. 2).
Revised: We deﬁne the cost of a program to be the number of Statement’s it contains (Tbl. 2).

Original: We also penalize using many different numerical constants; see supplement.
Revised: We also penalize using many different numerical constants; see supplement.

Original: The constrained optimization problem in Eq.
Revised: The constrained optimization problem in Eq.

Original: 2 is intractable in general, but there exist efﬁcient-inpractice tools for ﬁnding exact solutions to such program synthesis problems.
Revised: 2 is intractable in general, but there exist efﬁcient-inpractice tools for ﬁnding exact solutions to such program synthesis problems.

Original: We use the state-ofthe-art Sketch tool Solar Lezama (2008).
Revised: We use the state-ofthe-art Sketch tool Solar Lezama (2008).

Original: Sketch takes as input a space of programs, along with a speciﬁcation of the program’s behavior and optionally a cost function.
Revised: Sketch takes as input a space of programs, along with a speciﬁcation of the program’s behavior and optionally a cost function.

Original: It translates the synthesis problem into a constraint satisfaction problem and then uses a SAT solver to ﬁnd a minimum-cost program satisfying the speciﬁcation.
Revised: It translates the synthesis problem into a constraint satisfaction problem and then uses a SAT solver to ﬁnd a minimum-cost program satisfying the speciﬁcation.

Original: Sketch requires a ﬁnite program space , which here means that the depth of the program syntax tree is bounded (we set the bound to 3), but has the guarantee that it always eventually ﬁnds the globally optimal solution.
Revised: Sketch requires a ﬁnite program space , which here means that the depth of the program syntax tree is bounded (we set the bound to 3), but has the guarantee that it always eventually ﬁnds the globally optimal solution.

Original: In exchange for this optimality guarantee it comes with no guarantees on runtime.
Revised: In exchange for this optimality guarantee it comes with no guarantees on runtime.

Original: For our domain synthesis times vary from minutes to hours, with 27% of the drawings timing out the synthesizer after 1 hour.
Revised: For our domain synthesis times vary from minutes to hours, with 27% of the drawings timing out the synthesizer after 1 hour.

Original: Fig.
Revised: Tbl.

Original: 9 shows programs recovered by our system.
Revised: 9 shows programs recovered by our system.

Original: A main impediment to our use of these general techniques is the prohibitively high cost of searching for programs.
Revised: A main impediment to our use of these general techniques is the prohibitively high cost of searching for programs.

Original: We next describe how to learn to synthesize programs much faster (Sec. 3.1), timing out on 2% of the drawings and solving 58% of problems within a minute.
Revised: We next describe how to learn to synthesize programs much faster (Sec. 3.1), timing out on 2% of the drawings and solving 58% of problems within a minute.

Original: 3. L EARNING A SEARCH POLICY FOR SYNTHESIZING PROGRAMS
Revised: 3. L EARNING A SEARCH POLICY FOR SYNTHESIZING PROGRAMS

Original: We want to leverage powerful, domain-general techniques from the program synthesis community, but make them much faster by learning a domain-speciﬁc search policy .
Revised: We want to leverage powerful, domain-general techniques from the program synthesis community, but make them much faster by learning a domain-speciﬁc search policy .

Original: A search policy proposes search problems like those in Eq. 2, but also offers additional constraints on the structure of the program (Tbl. 3).
Revised: A search policy proposes search problems like those in Eq. 2, but also offers additional constraints on the structure of the program (Tbl. 3).

Original: For example, a policy might decide to ﬁrst try searching over small programs before searching over large programs, or decide to prioritize searching over programs that have loops.
Revised: For example, a policy might decide to ﬁrst try searching over small programs before searching over large programs, or decide to prioritize searching over programs that have loops.

Original: A search policy π θ ( σ | T ) takes as input a trace T and predicts a distribution over synthesis problems, each of which is written σ and corresponds to a set of possible programs to search over (so σ ⊂ DSL).
Revised: A search policy π θ ( σ | T ) takes as input a trace T and predicts a distribution over synthesis problems, each of which is written σ and corresponds to a set of possible programs to search over (so σ ⊂ DSL).

Original: Good policies will prefer tractable program spaces, so that the search procedure will terminate early, but should also prefer program spaces likely to contain programs that concisely explain the data.
Revised: Good policies will prefer tractable program spaces, so that the search procedure will terminate early, but should also prefer program spaces likely to contain programs that concisely explain the data.

Original: These two desiderata are in tension: tractable synthesis problems involve searching over smaller spaces, but smaller spaces are less likely to contain a minimum cost program for explaining the trace.
Revised: These two desiderata are in tension: tractable synthesis problems involve searching over smaller spaces, but smaller spaces are less likely to contain a minimum cost program for explaining the trace.

Original: Our goal now is to ﬁnd the parameters of the policy, written θ , which best navigate this trade-off.
Revised: Our goal now is to ﬁnd the parameters of the policy, written θ , which best navigate this trade-off.

Original: Given a search policy, what is the best way of using it to quickly ﬁnd minimum cost programs?
Revised: Given a search policy, what is the best way of using it to quickly ﬁnd minimum cost programs?

Original: We use a bias-optimal search algorithm (Schmidhuber, 2004):
Revised: We use a bias-optimal search algorithm (Schmidhuber, 2004):

Original: Deﬁnition: Bias-optimality.
Revised: Deﬁnition: Bias-optimality.

Original: A search algorithm is n - bias optimal with respect to a distribution
Revised: A search algorithm is n - bias optimal with respect to a distribution

Original: P bias [ · ] if it is guaranteed to ﬁnd a solution in σ after searching for at least time n × t ( σ ) P bias [ σ ] , where t ( σ ) is the time it takes to verify that σ contains a solution to the search problem.
Revised: P bias [ · ] if it is guaranteed to ﬁnd a solution in σ after searching for at least time n × t ( σ ) P bias [ σ ] , where t ( σ ) is the time it takes to verify that σ contains a solution to the search problem.

Original: [Table]
Revised: [Table]

Original: [Figure] 156 = 2 . 5 x [Figure]
Revised: Intuitively

Original: 169 =

Original: [Figure]
Revised: [Table]

Original: 8 x

Original: [Figure] 95 = 1 . [Figure] Intuitively an n -bias optimal search algorithm spends at least P bias [ σ ] /n of its time exploring solution space σ .
Revised: an n -bias optimal search algorithm spends at least P bias [ σ ] /n of its time exploring solution space σ .

Original: An example of a 1 -bias optimal search algorithm is a time-sharing system that allocates P bias [ σ ] of its time to trying σ .
Revised: An example of a 1 -bias optimal search algorithm is a time-sharing system that allocates P bias [ σ ] of its time to trying σ .

Original: We construct a 1 -bias optimal search algorithm for our domain by identifying P bias [ σ ] = π θ ( σ | T ) and t ( σ ) with how long the synthesizer takes to search the programs in σ .
Revised: We construct a 1 -bias optimal search algorithm for our domain by identifying P bias [ σ ] = π θ ( σ | T ) and t ( σ ) with how long the synthesizer takes to search the programs in σ .

Original: This means that the search algorithm explores the entire program space, but spends most of its time searching through the regions of the space that the policy judges to be most promising.
Revised: This means that the search algorithm explores the entire program space, but spends most of its time searching through the regions of the space that the policy judges to be most promising.

Original: Now in theory any π θ ( ·|· ) is a bias-optimal searcher.
Revised: Now in theory any π θ ( ·|· ) is a bias-optimal searcher.

Original: But the actual runtime of the algorithm depends strongly upon the bias P bias [ · ] .
Revised: But the actual runtime of the algorithm depends strongly upon the bias P bias [ · ] .

Original: Our new approach is to learn P bias [ · ] by picking the policy minimizing the expected bias-optimal time to solve a training corpus, D , of graphics program synthesis problems:
Revised: Our new approach is to learn P bias [ · ] by picking the policy minimizing the expected bias-optimal time to solve a training corpus, D , of graphics program synthesis problems:

Original: [Equation]
Revised: [Equation]

Original: where σ ∈ B EST ( T ) if a minimum cost program for T is in σ.
Revised: where σ ∈ B EST ( T ) if a minimum cost program for T is in σ.

Original: To generate a training corpus for learning a policy which minimizes this loss, we synthesized minimum cost programs for each trace of our hand drawings and for each σ .
Revised: To generate a training corpus for learning a policy which minimizes this loss, we synthesized minimum cost programs for each trace of our hand drawings and for each σ .

Original: We locally minimize this loss using gradient descent.
Revised: We locally minimize this loss using gradient descent.

Original: See supplement for details.
Revised: See supplement for details.

Original: Because we want to learn a policy from only 100 hand-drawn sketches, we chose a simple low-capacity, bilinear model for a policy:
Revised: Because we want to learn a policy from only 100 hand-drawn sketches, we chose a simple low-capacity, bilinear model for a policy:

Original: [Equation]
Revised: [Equation]

Original: where φ params ( σ ) is a one-hot encoding of the parameter settings of σ (see Tbl. 3) and φ trace ( T ) extracts a few simple features of the trace T ; see supplement for details.
Revised: where φ params ( σ ) is a one-hot encoding of the parameter settings of σ (see Tbl. 3) and φ trace ( T ) extracts a few simple features of the trace T ; see supplement for details.

Original: We contrast our learned search policy with two alternatives (see Fig.
Revised: We contrast our learned search policy with two alternatives (see Fig.

Original: 10): (1) Sketch , which poses the entire problem wholesale to the Sketch program synthesizer; and (2) an Oracle , a policy which always picks the quickest to search σ also containing a minimum cost program.
Revised: 10): (1) Sketch , which poses the entire problem wholesale to the Sketch program synthesizer; and (2) an Oracle , a policy which always picks the quickest to search σ also containing a minimum cost program.

Original: Our approach improves upon
Revised: Our approach improves upon

Original: Sketch by itself, and comes close to the Oracle’s performance.
Revised: Sketch by itself, and comes close to the Oracle’s performance.

Original: One could never construct this Oracle, because the agent does not know ahead of time which σ ’s contain minimum cost programs nor does it know how long each σ will take to search.
Revised: One could never construct this Oracle, because the agent does not know ahead of time which σ ’s contain minimum cost programs nor does it know how long each σ will take to search.

Original: The Oracle is an upper bound on the performance of any search policy.
Revised: The Oracle is an upper bound on the performance of any search policy.

Original: With this learned policy in hand we can synthesize 58% of programs within a minute.
Revised: With this learned policy in hand we can synthesize 58% of programs within a minute.

Original: learns to choose parameters likely to quickly yield a minimal cost program.
Revised: learns to choose parameters likely to quickly yield a minimal cost program.

Original: We slightly abuse notation by writing σ to mean an assignment to each of these parameters (so σ assumes one ofdifferent values) and to mean the set of programs selected by that parameterization (so σ ⊆ DSL)[Table]
Revised: We slightly abuse notation by writing σ to mean an assignment to each of these parameters (so σ assumes one ofdifferent values) and to mean the set of programs selected by that parameterization (so σ ⊆ DSL)

Original: [Table]
Revised: [Table]

Original:  A PPLICATIONS OF GRAPHICS PROGRAM SYNTHESIS
Revised:  A PPLICATIONS OF GRAPHICS PROGRAM SYNTHESIS

Original: Why synthesize a graphics program, if the trace already sufﬁces to recover the objects in an image?
Revised: Why synthesize a graphics program, if the trace already sufﬁces to recover the objects in an image?

Original: Within our domain of hand-drawn ﬁgures, graphics program synthesis has several uses:
Revised: Within our domain of hand-drawn ﬁgures, graphics program synthesis has several uses:

Original: 4. C ORRECTING ERRORS MADE BY THE NEURAL NETWORK
Revised: 4. C ORRECTING ERRORS MADE BY THE NEURAL NETWORK

Original: The program synthesizer corrects errors made by the neural network by favoring trace sets which lead to more concise or general programs.
Revised: The program synthesizer corrects errors made by the neural network by favoring trace sets which lead to more concise or general programs.

Original: For example, ﬁgures with perfectly aligned objects are preferable to ﬁgures whose parts are slightly misaligned, and precise alignment lends itself to short programs.
Revised: For example, ﬁgures with perfectly aligned objects are preferable to ﬁgures whose parts are slightly misaligned, and precise alignment lends itself to short programs.

Original: Concretely, we run the program synthesizer on the Top- k most likely traces output by the neurally guided sampler.
Revised: Concretely, we run the program synthesizer on the Top- k most likely traces output by the neurally guided sampler.

Original: Then, the system reranks the Top- k by the prior probability of their programs.
Revised: Then, the system reranks the Top- k by the prior probability of their programs.

Original: The prior probability of a program is learned by picking the prior maximizing the likelihood of the ground truth trace sets; see for details
Revised: The prior probability of a program is learned by picking the prior maximizing the likelihood of the ground truth trace sets; see for details

Original: This procedure can only ﬁx mistakes made by the neural network when a correct trace is in the Top- k .
Revised: This procedure can only ﬁx mistakes made by the neural network when a correct trace is in the Top- k .

Original: Our sampler could only do better on 7/100 drawings by looking at the
Revised: Our sampler could only do better on 7/100 drawings by looking at the

Original: Top-5 or Top-100 sampled traces (see Fig.
Revised: Top-5 or Top-100 sampled traces (see Fig.

Original: 8), precluding a statistically signiﬁcant analysis of how much learning a prior over programs could help correct errors.
Revised: 8), precluding a statistically signiﬁcant analysis of how much learning a prior over programs could help correct errors.

Original: But, learning this prior does sometimes help correct mistakes made by the neural network, and also occasionally introduces mistakes of its own; see Fig.
Revised: But, learning this prior does sometimes help correct mistakes made by the neural network, and also occasionally introduces mistakes of its own; see Fig.

Original: 11 for a representative example of the kinds of corrections that it makes.
Revised: 11 for a representative example of the kinds of corrections that it makes.

Original: See supplement for details.
Revised: See supplement for details.

Original: 4. M ODELING SIMILARITY BETWEEN DRAWINGS
Revised: 4. M ODELING SIMILARITY BETWEEN DRAWINGS

Original: Modeling drawings using programs opens up new ways to measure similarity between them.
Revised: Modeling drawings using programs opens up new ways to measure similarity between them.

Original: For example, we might say that two drawings are similar if they both contain loops of length 4, or if they share a reﬂectional symmetry, or if they are both organized according to a grid-like structure.
Revised: For example, we might say that two drawings are similar if they both contain loops of length 4, or if they share a reﬂectional symmetry, or if they are both organized according to a grid-like structure.

Original: We measure the similarity between two drawings by extracting features of the lowest-cost programs that describe them.
Revised: We measure the similarity between two drawings by extracting features of the lowest-cost programs that describe them.

Original: Our features are counts of the number of times that different components in the DSL were used (Tbl. 2).
Revised: Our features are counts of the number of times that different components in the DSL were used (Tbl. 2).

Original: We then ﬁnd drawings which are either close together or far apart in program feature space.
Revised: We then ﬁnd drawings which are either close together or far apart in program feature space.

Original: One could use many alternative similarity metrics between drawings which would capture pixel-level similarities while missing high-level geometric similarities.
Revised: One could use many alternative similarity metrics between drawings which would capture pixel-level similarities while missing high-level geometric similarities.

Original: We used our learned distance metric between trace sets, L learned ( ·|· ) , to ﬁnd drawings that are either close together or far apart according to the learned distance metric over images.
Revised: We used our learned distance metric between trace sets, L learned ( ·|· ) , to ﬁnd drawings that are either close together or far apart according to the learned distance metric over images.

Original: Fig.
Revised: Fig.

Original: 12 illustrates the kinds of drawings that these different metrics put closely together, while the supplement shows low dimensional projections of program and image features.
Revised: 12 illustrates the kinds of drawings that these different metrics put closely together, while the supplement shows low dimensional projections of program and image features.

Original: 4. E XTRAPOLATING FIGURES
Revised: 4. E XTRAPOLATING FIGURES

Original: Having access to the source code of a graphics program facilitates coherent, high-level edits to the ﬁgure generated by that program.
Revised: Having access to the source code of a graphics program facilitates coherent, high-level edits to the ﬁgure generated by that program.

Original: For example, we could change all of the circles to squares or make all of the lines be dashed.
Revised: For example, we could change all of the circles to squares or make all of the lines be dashed.

Original: We extrapolate ﬁgures by increasing the number of times that loops are executed.
Revised: We extrapolate ﬁgures by increasing the number of times that loops are executed.

Original: Extrapolating repetitive visuals patterns comes naturally to humans, and building this ability into an application is practical: imagine hand drawing a repetitive graphical model structure and having our system automatically induce and extend the pattern.
Revised: Extrapolating repetitive visuals patterns comes naturally to humans, and building this ability into an application is practical: imagine hand drawing a repetitive graphical model structure and having our system automatically induce and extend the pattern.

Original: Fig.
Revised: Fig.

Original: 13 shows extrapolations produced by our system.
Revised: 13 shows extrapolations produced by our system.

Original: Close in program space
Revised: Close in program space

Original: Far apart in program space
Revised: Far apart in program space

Original: Close in image space ↔ ↔ ↔ ↔
Revised: Close in image space ↔ ↔ ↔ ↔

Original: Far apart in image space ↔ ↔ ↔ ↔
Revised: Far apart in image space ↔ ↔ ↔ ↔

Original:  R ELATED WORK
Revised:  R ELATED WORK

Original: Program Induction: Our approach to learning to search for programs draws theoretical underpinnings from Levin search (Levin, 1973; Solomonoff, 1984) and Schmidhuber’s OOPS model (Schmidhuber, 2004).
Revised: Program Induction: Our approach to learning to search for programs draws theoretical underpinnings from Levin search (Levin, 1973; Solomonoff, 1984) and Schmidhuber’s OOPS model (Schmidhuber, 2004).

Original: DeepCoder (Balog et al., 2016) is a recent model which, like ours, learns to predict likely program components.
Revised: DeepCoder (Balog et al., 2016) is a recent model which, like ours, learns to predict likely program components.

Original: Our work differs because we treat the problem as metareasoning , identifying and modeling the trade-off between tractability and probability of success.
Revised: Our work differs because we treat the problem as metareasoning , identifying and modeling the trade-off between tractability and probability of success.

Original: TerpreT
Revised: TerpreT

Original: (Gaunt et al., 2016) systematically compares constraint-based program synthesis techniques against gradient-based search techniques, like those used to train Differentiable Neural Computers (Graves et al., 2016).
Revised: (Gaunt et al., 2016) systematically compares constraint-based program synthesis techniques against gradient-based search techniques, like those used to train Differentiable Neural Computers (Graves et al., 2016).

Original: The
Revised: The

Original: TerpreT experiments motivate our use of constraint-based techniques.
Revised: TerpreT experiments motivate our use of constraint-based techniques.

Original: Deep Learning: Our neural network bears resemblance to the Attend-Infer-Repeat (AIR) system, which learns to decompose an image into its constituent objects (Eslami et al., 2016).
Revised: Deep Learning: Our neural network bears resemblance to the Attend-Infer-Repeat (AIR) system, which learns to decompose an image into its constituent objects (Eslami et al., 2016).

Original: AIR learns an iterative inference scheme which infers objects one by one and also decides when to stop inference.
Revised: AIR learns an iterative inference scheme which infers objects one by one and also decides when to stop inference.

Original: Our network differs in its architecture and training regime:
Revised: Our network differs in its architecture and training regime:

Original: AIR learns a recurrent auto-encoding model via variational inference, whereas our parsing stage learns an autoregressive-style model from randomly-generated (trace, image) pairs.
Revised: AIR learns a recurrent auto-encoding model via variational inference, whereas our parsing stage learns an autoregressive-style model from randomly-generated (trace, image) pairs.

Original: IM2LATEX (Deng et al., 2017) is a recent work that also converts images to L A TEX.
Revised: IM2LATEX (Deng et al., 2017) is a recent work that also converts images to L A TEX.

Original: Their goal is to derender L A TEX equations, which recovers a markup language representation.
Revised: Their goal is to derender L A TEX equations, which recovers a markup language representation.

Original: Our goal is to go from noisy input to a high-level program, which goes beyond markup languages by supporting programming constructs like loops and conditionals.
Revised: Our goal is to go from noisy input to a high-level program, which goes beyond markup languages by supporting programming constructs like loops and conditionals.

Original: Recovering a high-level program is more challenging than recovering markup because it is a highly under constrained symbolic reasoning problem.
Revised: Recovering a high-level program is more challenging than recovering markup because it is a highly under constrained symbolic reasoning problem.

Original: Our image-to-trace parsing architecture builds on prior work on controlling procedural graphics programs (Ritchie et al., 2016).
Revised: Our image-to-trace parsing architecture builds on prior work on controlling procedural graphics programs (Ritchie et al., 2016).

Original: We adapt this method to a different visual domain (ﬁgures composed of multiple objects), using a broad prior over possible scenes as the initial program and viewing the trace through the guide program as a symbolic parse of the target image.
Revised: We adapt this method to a different visual domain (ﬁgures composed of multiple objects), using a broad prior over possible scenes as the initial program and viewing the trace through the guide program as a symbolic parse of the target image.

Original: We then show how to efﬁciently synthesize higher-level programs from these traces.
Revised: We then show how to efﬁciently synthesize higher-level programs from these traces.

Original: In the computer graphics literature, there have been other systems which convert sketches into procedural representations.
Revised: In the computer graphics literature, there have been other systems which convert sketches into procedural representations.

Original: One uses a convolutional network to match a sketch to the output of a parametric 3D modeling system (Huang et al., 2017).
Revised: One uses a convolutional network to match a sketch to the output of a parametric 3D modeling system (Huang et al., 2017).

Original: Another uses convolutional networks to support sketch-based instantiation of procedural primitives within an interactive architectural modeling system (Nishida et al., 2016).
Revised: Another uses convolutional networks to support sketch-based instantiation of procedural primitives within an interactive architectural modeling system (Nishida et al., 2016).

Original: Both systems focus on inferring ﬁxed-dimensional parameter vectors.
Revised: Both systems focus on inferring ﬁxed-dimensional parameter vectors.

Original: In contrast, we seek to automatically infer a structured, programmatic representation of a sketch which captures higher-level visual patterns.
Revised: In contrast, we seek to automatically infer a structured, programmatic representation of a sketch which captures higher-level visual patterns.

Original: Hand-drawn sketches
Revised: Hand-drawn sketches

Original: : Prior work has also applied sketch-based program synthesis to authoring graphics programs.
Revised: : Prior work has also applied sketch-based program synthesis to authoring graphics programs.

Original: Sketch-n-Sketch is a bi-directional editing system in which direct manipulations to a program’s output automatically propagate to the program source code (Hempel & Chugh, 2016).
Revised: Sketch-n-Sketch is a bi-directional editing system in which direct manipulations to a program’s output automatically propagate to the program source code (Hempel & Chugh, 2016).

Original: We see this work as complementary to our own: programs produced by our method could be provided to a Sketch-n-Sketch-like system as a starting point for further editing.
Revised: We see this work as complementary to our own: programs produced by our method could be provided to a Sketch-n-Sketch-like system as a starting point for further editing.

Original: The CogSketch system (Forbus et al., 2011) also aims to have a high-level understanding of hand-drawn ﬁgures.
Revised: The CogSketch system (Forbus et al., 2011) also aims to have a high-level understanding of hand-drawn ﬁgures.

Original: Their primary goal is cognitive modeling (they apply their system to solving IQ-test style visual reasoning problems), whereas we are interested in building an automated AI application (e.g. in our system the user need not annotate which strokes correspond to which shapes; our neural network produces something equivalent to the annotations).
Revised: Their primary goal is cognitive modeling (they apply their system to solving IQ-test style visual reasoning problems), whereas we are interested in building an automated AI application (e.g. in our system the user need not annotate which strokes correspond to which shapes; our neural network produces something equivalent to the annotations).

Original: The Trace Hypothesis: The idea that an execution trace could assist in program learning goes back to the 1970’s (Summers, 1977) and has been applied in neural models of program induction, like
Revised: The Trace Hypothesis: The idea that an execution trace could assist in program learning goes back to the 1970’s (Summers, 1977) and has been applied in neural models of program induction, like

Original: Neural Program Interpreters (Reed & de Freitas, 2015), or DeepCoder, which predicts what functions occur in the execution trace (Balog et al., 2016).
Revised: Neural Program Interpreters (Reed & de Freitas, 2015), or DeepCoder, which predicts what functions occur in the execution trace (Balog et al., 2016).

Original: Our contribution to this idea is the trace hypothesis: that trace sets can be inferred from perceptual data, and that the trace is the correct bridge between perception and symbolic representation.
Revised: Our contribution to this idea is the trace hypothesis: that trace sets can be inferred from perceptual data, and that the trace is the correct bridge between perception and symbolic representation.

Original: Our work is the ﬁrst to articulate and explore this hypothesis by demonstrating how a trace could be inferred and how it can be used to synthesize a high-level program.
Revised: Our work is the ﬁrst to articulate and explore this hypothesis by demonstrating how a trace could be inferred and how it can be used to synthesize a high-level program.

Original:  C ONTRIBUTIONS
Revised:  C ONTRIBUTIONS

Original: We have presented a system for inferring graphics programs which generate L A TEX-style ﬁgures from hand-drawn images.
Revised: We have presented a system for inferring graphics programs which generate L A TEX-style ﬁgures from hand-drawn images.

Original: The system uses a combination of deep neural networks and stochastic search to parse drawings into symbolic trace sets; it then feeds these traces to a general-purpose program synthesis engine to infer a structured graphics program.
Revised: The system uses a combination of deep neural networks and stochastic search to parse drawings into symbolic trace sets; it then feeds these traces to a general-purpose program synthesis engine to infer a structured graphics program.

Original: We evaluated our model’s performance at parsing novel images and we demonstrated its ability to extrapolate from provided drawings and to organize them according to high-level geometric features.
Revised: We evaluated our model’s performance at parsing novel images and we demonstrated its ability to extrapolate from provided drawings and to organize them according to high-level geometric features.

Original: In the near future we believe it will be possible to produce professional-looking ﬁgures just by drawing them and then letting an artiﬁcially-intelligent agent write the code.
Revised: In the near future we believe it will be possible to produce professional-looking ﬁgures just by drawing them and then letting an artiﬁcially-intelligent agent write the code.

Original: More generally, we believe the trace hypothesis, as realized in our two-phase system—parsing into trace sets, then searching for a low-cost symbolic program which generates those traces—may be a useful paradigm for other domains in which agents must programmatically reason about noisy perceptual input
Revised: More generally, we believe the trace hypothesis, as realized in our two-phase system—parsing into trace sets, then searching for a low-cost symbolic program which generates those traces—may be a useful paradigm for other domains in which agents must programmatically reason about noisy perceptual input

Original:  C ORRECTING ERRORS MADE BY THE NEURAL NETWORK
Revised:  C ORRECTING ERRORS MADE BY THE NEURAL NETWORK

Original: The program synthesizer can help correct errors from the execution trace proposal network by favoring execution traces which lead to more concise or general programs.
Revised: The program synthesizer can help correct errors from the execution trace proposal network by favoring execution traces which lead to more concise or general programs.

Original: For example, one generally prefers ﬁgures with perfectly aligned objects over ﬁgures whose parts are slightly misaligned – and precise alignment lends itself to short programs.
Revised: For example, one generally prefers ﬁgures with perfectly aligned objects over ﬁgures whose parts are slightly misaligned – and precise alignment lends itself to short programs.

Original: Similarly, ﬁgures often have repeated parts, which the program synthesizer might be able to model as a loop or reﬂectional symmetry.
Revised: Similarly, ﬁgures often have repeated parts, which the program synthesizer might be able to model as a loop or reﬂectional symmetry.

Original: So, in considering several candidate traces proposed by the neural network, we might prefer traces whose best programs have desirable features such being short or having iterated structures.
Revised: So, in considering several candidate traces proposed by the neural network, we might prefer traces whose best programs have desirable features such being short or having iterated structures.

Original: Concretely, we implemented the following scheme: for an image I , the neurally guided sampling scheme of section 3 of the main paper samples a set of candidate traces, written F ( I ) .
Revised: Concretely, we implemented the following scheme: for an image I , the neurally guided sampling scheme of section 3 of the main paper samples a set of candidate traces, written F ( I ) .

Original: Instead of predicting the most likely trace in F ( I ) according to the neural network, we can take into account the programs that best explain the traces.
Revised: Instead of predicting the most likely trace in F ( I ) according to the neural network, we can take into account the programs that best explain the traces.

Original: Writing ˆ T ( I ) for the trace the model predicts for image I ,
Revised: Writing ˆ T ( I ) for the trace the model predicts for image I ,

Original: [Equation]
Revised: [Equation]

Original: (1) where P β [ · ] is a prior probability distribution over programs parameterized by β .
Revised: (1) where P β [ · ] is a prior probability distribution over programs parameterized by β .

Original: This is equivalent to doing MAP inference in a generative model where the program is ﬁrst drawn from P β [ · ] , then the program is executed deterministically, and then we observe a noisy version of the program’s output, where L learned ( I | render ( · ))
Revised: This is equivalent to doing MAP inference in a generative model where the program is ﬁrst drawn from P β [ · ] , then the program is executed deterministically, and then we observe a noisy version of the program’s output, where L learned ( I | render ( · ))

Original: × P θ [ ·| I ] is our observation model.
Revised: × P θ [ ·| I ] is our observation model.

Original: Given a corpus of graphics program synthesis problems with annotated ground truth traces (i.e. ( I, T ) pairs), we ﬁnd a maximum likelihood estimate of β :
Revised: Given a corpus of graphics program synthesis problems with annotated ground truth traces (i.e. ( I, T ) pairs), we ﬁnd a maximum likelihood estimate of β :

Original: [Equation]
Revised: [Equation]

Original: where the expectation is taken both over the model predictions and the ( I, T ) pairs in the training corpus.
Revised: where the expectation is taken both over the model predictions and the ( I, T ) pairs in the training corpus.

Original: We deﬁne P β [ · ] to be a log linear distribution ∝ exp( β · φ ( program )) , where φ ( · ) is a feature extractor for programs.
Revised: We deﬁne P β [ · ] to be a log linear distribution ∝ exp( β · φ ( program )) , where φ ( · ) is a feature extractor for programs.

Original: We extract a few basic features of a program, such as its size and how many loops it has, and use these features to help predict whether a trace is the correct explanation for an image.
Revised: We extract a few basic features of a program, such as its size and how many loops it has, and use these features to help predict whether a trace is the correct explanation for an image.

Original: We synthesized programs for the top 10 traces output by the deep network.
Revised: We synthesized programs for the top 10 traces output by the deep network.

Original: Learning this prior over programs can help correct mistakes made by the neural network, and also occasionally introduces mistakes of its own; see Fig.
Revised: Learning this prior over programs can help correct mistakes made by the neural network, and also occasionally introduces mistakes of its own; see Fig.

Original: 1 for a representative example of the kinds of corrections that it makes.
Revised: 1 for a representative example of the kinds of corrections that it makes.

Original: On the whole it modestly improves our Top-1 accuracy from 63% to 67%.
Revised: On the whole it modestly improves our Top-1 accuracy from 63% to 67%.

Original: Recall that from Fig.
Revised: Recall that from Fig.

Original: 6 of the main paper that the best improvement in accuracy we could possibly get is 70% by looking at the top 10 traces.
Revised: 6 of the main paper that the best improvement in accuracy we could possibly get is 70% by looking at the top 10 traces.

Original:  M EASURING SIMILARITY BETWEEN DRAWINGS
Revised:  M EASURING SIMILARITY BETWEEN DRAWINGS

Original: We measure the similarity between two drawings by extracting features of the best programs that describe them.
Revised: We measure the similarity between two drawings by extracting features of the best programs that describe them.

Original: Our features are counts of the number of times that different components in the DSL were used.
Revised: Our features are counts of the number of times that different components in the DSL were used.

Original: We project these features down to a 2-dimensional subspace using primary component analysis (PCA); see Fig.2.
Revised: We project these features down to a 2-dimensional subspace using primary component analysis (PCA); see Fig.2.

Original: One could use many alternative similarity metrics between drawings which would capture pixel-level similarities while missing high-level geometric similarities.
Revised: One could use many alternative similarity metrics between drawings which would capture pixel-level similarities while missing high-level geometric similarities.

Original: We used our learned distance metric between traces, L learned ( ·|· ) , and projected to a 2-dimensional subspace using multidimensional scaling (MDS: (1)).
Revised: We used our learned distance metric between traces, L learned ( ·|· ) , and projected to a 2-dimensional subspace using multidimensional scaling (MDS: (1)).

Original: This reveals similarities between the objects in the drawings, while missing similarities at the level of the program.
Revised: This reveals similarities between the objects in the drawings, while missing similarities at the level of the program.

Original:  L EARNING A BIAS OPTIMAL POLICY
Revised:  L EARNING A BIAS OPTIMAL POLICY

Original: Recall from the main paper that our goal is to estimate the policy minimizing the following loss:
Revised: Recall from the main paper that our goal is to estimate the policy minimizing the following loss:

Original: [Equation]
Revised: [Equation]

Original: where σ ∈ B EST ( T ) if a minimum cost program for T is in σ.
Revised: where σ ∈ B EST ( T ) if a minimum cost program for T is in σ.

Original: We make this optimization problem tractable by annealing our loss function during gradient descent:
Revised: We make this optimization problem tractable by annealing our loss function during gradient descent:

Original: [Equation]
Revised: [Equation]

Original: where S OFT M INIMUM β ( x 1 , x 2 , x 3 , · · · )
Revised: where S OFT M INIMUM β ( x 1 , x 2 , x 3 , · · · )

Original: = (cid:88)
Revised: = (cid:88)

Original: n
Revised: n

Original: [Equation]
Revised: [Equation]

Original: Notice that S OFT M INIMUM β = ∞ ( · ) is just min( · ) .
Revised: Notice that S OFT M INIMUM β = ∞ ( · ) is just min( · ) .

Original: We set the regularization coefﬁcient λ = 0 .
Revised: We set the regularization coefﬁcient λ = 0 .

Original: 1 and minimize equation 4 using Adam for 2000 steps, linearly increasing β from 1 to 2 .
Revised: 1 and minimize equation 4 using Adam for 2000 steps, linearly increasing β from 1 to 2 .

Original: We parameterize the space of policies as a simple log bilinear model:
Revised: We parameterize the space of policies as a simple log bilinear model:

Original: [Equation]
Revised: [Equation]

Original: where:
Revised: where:

Original: φ params ( σ ) =
Revised: φ params ( σ ) =

Original: [ 1 [ σ can loop ]; 1 [ σ can reﬂect ]; 1 [ σ is incremental ]; 1 [ σ has depth bound 1]; 1 [ σ has depth bound 2]; 1 [ σ has depth bound 3]; ] φ trace ( T ) =
Revised: [ 1 [ σ can loop ]; 1 [ σ can reﬂect ]; 1 [ σ is incremental ]; 1 [ σ has depth bound 1]; 1 [ σ has depth bound 2]; 1 [ σ has depth bound 3]; ] φ trace ( T ) =

Original: [ # circles in T ; # rectangles in T ; # lines in T ; 1]
Revised: [ # circles in T ; # rectangles in T ; # lines in T ; 1]

Original:  N EURAL NETWORK ARCHITECTURE 4. H IGH - LEVEL OVERVIEW
Revised:  N EURAL NETWORK ARCHITECTURE 4. H IGH - LEVEL OVERVIEW

Original: For the model in Fig.
Revised: For the model in Fig.

Original: 4, the distribution over the next drawing command factorizes as:
Revised: 4, the distribution over the next drawing command factorizes as:

Original: [Equation]
Revised: [Equation]

Original: where t 1 t 2 · · · t K are the tokens in the drawing command, I is the target image, T is a trace set, θ are the parameters of the neural network, f θ ( · , · ) is the image feature extractor (convolutional network),
Revised: where t 1 t 2 · · · t K are the tokens in the drawing command, I is the target image, T is a trace set, θ are the parameters of the neural network, f θ ( · , · ) is the image feature extractor (convolutional network),

Original: [Figure]
Revised: [Figure]

Original: I m a g e f ea t u r e s
Revised: I m a g e f ea t u r e s

Original: MLP circle(
Revised: MLP circle(

Original: STN
Revised: STN

Original: MLP
Revised: MLP

Original: X=7,
Revised: X=7,

Original: STN
Revised: STN

Original: MLP
Revised: MLP

Original: Y=12)
Revised: Y=12)

Original: Next drawing command
Revised: Next drawing command

Original: [Figure]
Revised: [Figure]

Original: and a θ ( ·|· ) is an attention mechanism.
Revised: and a θ ( ·|· ) is an attention mechanism.

Original: The distribution over traces factorizes as:
Revised: The distribution over traces factorizes as:

Original: [Equation]
Revised: [Equation]

Original: where | T | is the length of trace T , the subscripts on T index drawing commands within the trace (so
Revised: where | T | is the length of trace T , the subscripts on T index drawing commands within the trace (so

Original: T n is a sequence of tokens: t 1 t 2 · · · t K ), and the STOP token is emitted by the network to signal that the trace explains the image.
Revised: T n is a sequence of tokens: t 1 t 2 · · · t K ), and the STOP token is emitted by the network to signal that the trace explains the image.

Original: 4. C ONVOLUTIONAL NETWORK
Revised: 4. C ONVOLUTIONAL NETWORK

Original: The convolutional network takes as input 2 256 × 256 images represented as a 2 × 256 × 256 volume.
Revised: The convolutional network takes as input 2 256 × 256 images represented as a 2 × 256 × 256 volume.

Original: These are passed through two layers of convolutions separated by ReLU nonlinearities and max pooling:
Revised: These are passed through two layers of convolutions separated by ReLU nonlinearities and max pooling:

Original: • Layer 1: 20 8 × 8 convolutions, 2 16 × 4 convolutions, 2 4 × 16 convolutions.
Revised: • Layer 1: 20 8 × 8 convolutions, 2 16 × 4 convolutions, 2 4 × 16 convolutions.

Original: Followed by 8 × 8 pooling with a stride size of 4. • Layer 2: 10 8 × 8 convolutions.
Revised: Followed by 8 × 8 pooling with a stride size of 4. • Layer 2: 10 8 × 8 convolutions.

Original: Followed by 4 × 4 pooling with a stride size of 4.
Revised: Followed by 4 × 4 pooling with a stride size of 4.

Original: 4. A UTOREGRESSIVE DECODING OF DRAWING COMMANDS
Revised: 4. A UTOREGRESSIVE DECODING OF DRAWING COMMANDS

Original: Given the image features f , we predict the ﬁrst token (i.e., the name of the drawing command: circle , rectangle , line , or STOP ) using logistic regression:
Revised: Given the image features f , we predict the ﬁrst token (i.e., the name of the drawing command: circle , rectangle , line , or STOP ) using logistic regression:

Original: [Equation]
Revised: [Equation]

Original: where W t 1 is a learned weight matrix and b t 1 is a learned bias vector.
Revised: where W t 1 is a learned weight matrix and b t 1 is a learned bias vector.

Original: Given an attention mechanism a ( ·|· ) , subsequent tokens are predicted as:
Revised: Given an attention mechanism a ( ·|· ) , subsequent tokens are predicted as:

Original: [Equation]
Revised: [Equation]

Original: Thus each token of each drawing primitive has its own learned MLP.
Revised: Thus each token of each drawing primitive has its own learned MLP.

Original: For predicting the coordinates of lines we found that using 32 hidden nodes with sigmoid activations worked well; for other tokens the MLP’s are just logistic regression (no hidden nodes).
Revised: For predicting the coordinates of lines we found that using 32 hidden nodes with sigmoid activations worked well; for other tokens the MLP’s are just logistic regression (no hidden nodes).

Original: We use Spatial Transformer Networks (2) as our attention mechanism.
Revised: We use Spatial Transformer Networks (2) as our attention mechanism.

Original: The parameters of the spatial transform are predicted on the basis of previously predicted tokens.
Revised: The parameters of the spatial transform are predicted on the basis of previously predicted tokens.

Original: For example, in order to decide where to focus our attention when predicting the y coordinate of a circle, we condition upon both the identity of the drawing command ( circle ) and upon the value of the previously predicted x coordinate:
Revised: For example, in order to decide where to focus our attention when predicting the y coordinate of a circle, we condition upon both the identity of the drawing command ( circle ) and upon the value of the previously predicted x coordinate:

Original: [Equation]
Revised: [Equation]

Original: So, we learn a different network for predicting special transforms for each drawing command (value of t 1 ) and also for each token of the drawing command .
Revised: So, we learn a different network for predicting special transforms for each drawing command (value of t 1 ) and also for each token of the drawing command .

Original: These networks (MLP t 1 ,n in equation 11) have no hidden layers and output the 6 entries of an afﬁne transformation matrix; see (2) for more details.
Revised: These networks (MLP t 1 ,n in equation 11) have no hidden layers and output the 6 entries of an afﬁne transformation matrix; see (2) for more details.

Original: Training takes a little bit less than a day on a Nvidia TitanX GPU.
Revised: Training takes a little bit less than a day on a Nvidia TitanX GPU.

Original: The network was trained on 10synthetic examples.
Revised: The network was trained on 10synthetic examples.

Original: 4. P REDICTING CONTINUOUS COORDINATES USING M IXTURE D ENSITY N ETWORKS
Revised: 4. P REDICTING CONTINUOUS COORDINATES USING M IXTURE D ENSITY N ETWORKS

Original: Our main paper describes a neural model for parsing hand drawings into L A T E X, but comes with the restriction that all of the coordinates of all the drawing commands are snapped to a 16 × 16 grid.
Revised: Our main paper describes a neural model for parsing hand drawings into L A T E X, but comes with the restriction that all of the coordinates of all the drawing commands are snapped to a 16 × 16 grid.

Original: Now we describe a variant of our model that can predict continuous real valued coordinates.
Revised: Now we describe a variant of our model that can predict continuous real valued coordinates.

Original: The key obstacle to overcome is multimodality : if the network is unsure whether it should predict a coordinate value of a or b , we wish to predict a distribution that splits its mass between a and b , rather than predicting the single value a + b 2 .
Revised: The key obstacle to overcome is multimodality : if the network is unsure whether it should predict a coordinate value of a or b , we wish to predict a distribution that splits its mass between a and b , rather than predicting the single value a + b 2 .

Original: In the model where everything is snapped to a discrete grid, supporting this multimodality falls out naturally from our parameterization of the network predictions (i.e., the network predicts the parameters of a multinomial distribution).
Revised: In the model where everything is snapped to a discrete grid, supporting this multimodality falls out naturally from our parameterization of the network predictions (i.e., the network predicts the parameters of a multinomial distribution).

Original: To predict continuous real valued coordinates we turn to Mixture Density Networks (MDN: (3)).
Revised: To predict continuous real valued coordinates we turn to Mixture Density Networks (MDN: (3)).

Original: In an MDN, a distribution over a real-valued random variable is parameterized using a mixture of Gaussians, and the deep network predicts the parameters of the Gaussian mixture.
Revised: In an MDN, a distribution over a real-valued random variable is parameterized using a mixture of Gaussians, and the deep network predicts the parameters of the Gaussian mixture.

Original: Concretely, we modify our autoregressive drawing command decoder to predict distributions over real-valued coordinates as:
Revised: Concretely, we modify our autoregressive drawing command decoder to predict distributions over real-valued coordinates as:

Original: [Equation]
Revised: [Equation]

Original: Compare this equation with Equation 10 to see that we have only replaced a draw from a multinomial (whose parameters are predicted by an MLP) with a draw from a mixture of Gaussians (whose parameters are predicted by an MDN).
Revised: Compare this equation with Equation 10 to see that we have only replaced a draw from a multinomial (whose parameters are predicted by an MLP) with a draw from a mixture of Gaussians (whose parameters are predicted by an MDN).

Original: Otherwise the two models are identical.
Revised: Otherwise the two models are identical.

Original: For an MDN i with K mixture components that takes as input x , we parameterize it’s output distribution as:
Revised: For an MDN i with K mixture components that takes as input x , we parameterize it’s output distribution as:

Original: [Equation]
Revised: [Equation]

Original: where W with a superscript is a learned weight matrix and b is a learned bias vector.
Revised: where W with a superscript is a learned weight matrix and b is a learned bias vector.

Original: Notice that
Revised: Notice that

Original: Equation 14 normalizes the predicted means to be within [0 , 1] : this is because we wish to constrain the predicted coordinates to lie within the plane [0 , 1] 2 .
Revised: Equation 14 normalizes the predicted means to be within [0 , 1] : this is because we wish to constrain the predicted coordinates to lie within the plane [0 , 1] 2 .

Original: We used K = 16 mixture components.
Revised: We used K = 16 mixture components.

Original: Figure 5 shows the behavior of the MDN variant of our model on noisy synthetic drawings.
Revised: Figure 5 shows the behavior of the MDN variant of our model on noisy synthetic drawings.

Original: Contrast these mediocre results with Figure 4 of the main paper to see that although our main model is essentially at ceiling for parsing scenes like these, the MDN variant fares poorly in comparison.
Revised: Contrast these mediocre results with Figure 4 of the main paper to see that although our main model is essentially at ceiling for parsing scenes like these, the MDN variant fares poorly in comparison.

Original: We evaluated the MDN version of our model on hand drawings by (1) performing a beam search in order to ﬁnd the trace maximizing P [ T | I ] , and (2) constraining the predicted coordinates to lie on the 16 × 16 grid.
Revised: We evaluated the MDN version of our model on hand drawings by (1) performing a beam search in order to ﬁnd the trace maximizing P [ T | I ] , and (2) constraining the predicted coordinates to lie on the 16 × 16 grid.

Original: We constrain the predicted coordinates to lie on the grid by integrating the predicted densities about each grid location.
Revised: We constrain the predicted coordinates to lie on the grid by integrating the predicted densities about each grid location.

Original: So, using the probability density p ( t n | t 1:( n − 1) ) in Eq.
Revised: So, using the probability density p ( t n | t 1:( n − 1) ) in Eq.

Original: 12, we compute a probability mass function P [ t n | t 1:( n − 1) ] as:
Revised: 12, we compute a probability mass function P [ t n | t 1:( n − 1) ] as:

Original: [Equation]
Revised: [Equation]

Original: Even after using Eq.
Revised: Even after using Eq.

Original: 17 to constrain the predicted coordinates to lie on the 16 × 16 grid, the MDN variant of the model only produces ﬁnished traces for 48/100 of the drawings.
Revised: 17 to constrain the predicted coordinates to lie on the 16 × 16 grid, the MDN variant of the model only produces ﬁnished traces for 48/100 of the drawings.

Original: See Figure 6 to see the traces recovered by the beam search.
Revised: See Figure 6 to see the traces recovered by the beam search.

Original: 4. LSTM B ASELINE
Revised: 4. LSTM B ASELINE

Original: We compared our deep network with a baseline that models the problem as a kind of image captioning.
Revised: We compared our deep network with a baseline that models the problem as a kind of image captioning.

Original: Given the target image, this baseline produces the program trace in one shot by using a CNN to extract features of the input which are passed to an LSTM which ﬁnally predicts the trace token-by-token.
Revised: Given the target image, this baseline produces the program trace in one shot by using a CNN to extract features of the input which are passed to an LSTM which ﬁnally predicts the trace token-by-token.

Original: This general architecture is used in several successful neural models of image captioning (e.g., (4)).
Revised: This general architecture is used in several successful neural models of image captioning (e.g., (4)).

Original: Concretely, we kept the image feature extractor architecture (a CNN) as in our model, but only passed it one image as input (the target image to explain).
Revised: Concretely, we kept the image feature extractor architecture (a CNN) as in our model, but only passed it one image as input (the target image to explain).

Original: Then, instead of using an autoregressive decoder to predict a single drawing command, we used an LSTM to predict a sequence of drawing commands token-by-token.
Revised: Then, instead of using an autoregressive decoder to predict a single drawing command, we used an LSTM to predict a sequence of drawing commands token-by-token.

Original: This LSTM had 128 memory cells, and at each time step produced as output the next token in the sequence of drawing commands.
Revised: This LSTM had 128 memory cells, and at each time step produced as output the next token in the sequence of drawing commands.

Original: It took as input both the image representation and its previously predicted token.
Revised: It took as input both the image representation and its previously predicted token.

Original: 4. A LEARNED LIKELIHOOD SURROGATE
Revised: 4. A LEARNED LIKELIHOOD SURROGATE

Original: Our architecture for
Revised: Our architecture for

Original: L learned
Revised: L learned

Original: ( render
Revised: ( render

Original: T 1 ) | render ( T 2 )) has the same series of convolutions as the network that predicts the next drawing command.
Revised: T 1 ) | render ( T 2 )) has the same series of convolutions as the network that predicts the next drawing command.

Original: We train it to predict two scalars: | T 1 − T 2 | and | T 2 − T 1 | .
Revised: We train it to predict two scalars: | T 1 − T 2 | and | T 2 − T 1 | .

Original: These predictions are made using linear regression from the image features followed by a ReLU nonlinearity; this nonlinearity makes sense because the predictions can never be negative but could be arbitrarily large positive numbers.
Revised: These predictions are made using linear regression from the image features followed by a ReLU nonlinearity; this nonlinearity makes sense because the predictions can never be negative but could be arbitrarily large positive numbers.

Original: We train this network by sampling random synthetic scenes for T 1 , and then perturbing them in small ways to produce T 2 .
Revised: We train this network by sampling random synthetic scenes for T 1 , and then perturbing them in small ways to produce T 2 .

Original: We minimize the squared loss between the network’s prediction and the ground truth symmetric differences.
Revised: We minimize the squared loss between the network’s prediction and the ground truth symmetric differences.

Original: T 1 is rendered in a “simulated hand drawing” style which we describe next.
Revised: T 1 is rendered in a “simulated hand drawing” style which we describe next.

Original:  S IMULATING HAND DRAWINGS
Revised:  S IMULATING HAND DRAWINGS

Original: We introduce noise into the L A TEX rendering process by:
Revised: We introduce noise into the L A TEX rendering process by:

Original: • Rescaling the image intensity by a factor chosen uniformly at random from [0 . 5 , 1 . 5] • Translating the image by ± 3 pixels chosen uniformly random •
Revised: • Rescaling the image intensity by a factor chosen uniformly at random from [0 . 5 , 1 . 5] • Translating the image by ± 3 pixels chosen uniformly random •

Original: Rendering the L A TEX using the pencildraw style, which adds random perturbations to the paths drawn by L A TEXin a way designed to resemble a pencil.
Revised: Rendering the L A TEX using the pencildraw style, which adds random perturbations to the paths drawn by L A TEXin a way designed to resemble a pencil.

Original: • Randomly perturbing the positions and sizes of primitive L A TEXdrawing commands
Revised: • Randomly perturbing the positions and sizes of primitive L A TEXdrawing commands

Original:  L IKELIHOOD SURROGATE FOR SYNTHETIC DATA
Revised:  L IKELIHOOD SURROGATE FOR SYNTHETIC DATA

Original: For synthetic data (e.g., L A TEX output) it is relatively straightforward to engineer an adequate distance measure between images, because it is possible for the system to discover drawing commands that exactly match the pixels in the target image.
Revised: For synthetic data (e.g., L A TEX output) it is relatively straightforward to engineer an adequate distance measure between images, because it is possible for the system to discover drawing commands that exactly match the pixels in the target image.

Original: We use:
Revised: We use:

Original: [Equation]
Revised: [Equation]

Original: where α , β are constants that control the trade-off between preferring to explain the pixels in the image (at the expense of having extraneous pixels) and not predicting pixels where they don’t exist (at the expense of leaving some pixels unexplained).
Revised: where α , β are constants that control the trade-off between preferring to explain the pixels in the image (at the expense of having extraneous pixels) and not predicting pixels where they don’t exist (at the expense of leaving some pixels unexplained).

Original: Because our sampling procedure incrementally constructs the scene part-by-part, we want α > β .
Revised: Because our sampling procedure incrementally constructs the scene part-by-part, we want α > β .

Original: That is, it is preferable to leave some pixels unexplained; for once a particle in SMC adds a drawing primitive to its trace that is not actually in the latent scene, it can never recover from this error.
Revised: That is, it is preferable to leave some pixels unexplained; for once a particle in SMC adds a drawing primitive to its trace that is not actually in the latent scene, it can never recover from this error.

Original: In our experiments on synthetic data we used α = 0 .
Revised: In our experiments on synthetic data we used α = 0 .

Original: 8 and β = 0 . 04 .
Revised: 8 and β = 0 . 04 .

Original:  G ENERATING SYNTHETIC TRAINING DATA
Revised:  G ENERATING SYNTHETIC TRAINING DATA

Original: We generated synthetic training data for the neural network by sampling L A T E X code according to the following generative process: First, the number of objects in the scene are sampled uniformly from 1 to 12.
Revised: We generated synthetic training data for the neural network by sampling L A T E X code according to the following generative process: First, the number of objects in the scene are sampled uniformly from 1 to 12.

Original: For each object we uniformly sample its identity (circle, rectangle, or line).
Revised: For each object we uniformly sample its identity (circle, rectangle, or line).

Original: Then we sample the parameters of the circles, than the parameters of the rectangles, and ﬁnally the parameters of the lines; this has the effect of teaching the network to ﬁrst draw the circles in the scene, then the rectangles, and ﬁnally the lines.
Revised: Then we sample the parameters of the circles, than the parameters of the rectangles, and ﬁnally the parameters of the lines; this has the effect of teaching the network to ﬁrst draw the circles in the scene, then the rectangles, and ﬁnally the lines.

Original: We furthermore put the circle (respectively, rectangle and line) drawing commands in order by left-to-right, bottom-to-top; thus the training data enforces a canonical order in which to draw any scene.
Revised: We furthermore put the circle (respectively, rectangle and line) drawing commands in order by left-to-right, bottom-to-top; thus the training data enforces a canonical order in which to draw any scene.

Original: To make the training data look more like naturally occurring ﬁgures, we put a Chinese restaurant process prior (5) over the values of the X and Y coordinates that occur in the execution trace.
Revised: To make the training data look more like naturally occurring ﬁgures, we put a Chinese restaurant process prior (5) over the values of the X and Y coordinates that occur in the execution trace.

Original: This encourages reuse of coordinate values, and so produces training data that tends to have parts that are nicely aligned.
Revised: This encourages reuse of coordinate values, and so produces training data that tends to have parts that are nicely aligned.

Original: In the synthetic training data we excluded any sampled scenes that had overlapping drawing commands.
Revised: In the synthetic training data we excluded any sampled scenes that had overlapping drawing commands.

Original: As shown in the main paper, the network is then able to generalize to scenes with, for example, intersecting lines or lines that penetrate a rectangle.
Revised: As shown in the main paper, the network is then able to generalize to scenes with, for example, intersecting lines or lines that penetrate a rectangle.

Original: When sampling the endpoints of a line, we biased the sampling process so that it would be more likely to start an endpoint along one of the sides of a rectangle or at the boundary of a circle.
Revised: When sampling the endpoints of a line, we biased the sampling process so that it would be more likely to start an endpoint along one of the sides of a rectangle or at the boundary of a circle.

Original: If n is the number of points either along the side of a rectangle or at the boundary of a circle, we would sample an arbitrary endpoint with probability 2 2+ n and sample one of the “attaching” endpoints with probability 1 2+ n .
Revised: If n is the number of points either along the side of a rectangle or at the boundary of a circle, we would sample an arbitrary endpoint with probability 2 2+ n and sample one of the “attaching” endpoints with probability 1 2+ n .

Original: See ﬁgure 7 for examples of the kinds of scenes that the network is trained on.
Revised: See ﬁgure 7 for examples of the kinds of scenes that the network is trained on.

Original: For readers wishing to generate their own synthetic training sets, we refer them to our source code at: redactedForAnonymity.com .
Revised: For readers wishing to generate their own synthetic training sets, we refer them to our source code at: redactedForAnonymity.com .

Original:  T HE COST FUNCTION FOR PROGRAMS
Revised:  T HE COST FUNCTION FOR PROGRAMS

Original: We seek the minimum cost program which evaluates to (produces the drawing primitives in) an execution trace T : program
Revised: We seek the minimum cost program which evaluates to (produces the drawing primitives in) an execution trace T : program

Original: [Equation]
Revised: [Equation]

Original: Programs incur a cost of 1 for each command (primitive drawing action, loop, or reﬂection).
Revised: Programs incur a cost of 1 for each command (primitive drawing action, loop, or reﬂection).

Original: They incur a cost of 13 for each unique coefﬁcient they use in a linear transformation beyond the ﬁrst coefﬁcient.
Revised: They incur a cost of 13 for each unique coefﬁcient they use in a linear transformation beyond the ﬁrst coefﬁcient.

Original: This encourages reuse of coefﬁcients, which leads to code that has translational symmetry; rather than provide a translational symmetry operator as we did with reﬂection, we modify what is effectively a prior over the space of program so that it tends to produce programs that have this symmetry.
Revised: This encourages reuse of coefﬁcients, which leads to code that has translational symmetry; rather than provide a translational symmetry operator as we did with reﬂection, we modify what is effectively a prior over the space of program so that it tends to produce programs that have this symmetry.

Original: Programs also incur a cost of 1 for having loops of constant length 2; otherwise there is often no pressure from the cost function to explain a repetition of length 2 as being a reﬂection rather a loop.
Revised: Programs also incur a cost of 1 for having loops of constant length 2; otherwise there is often no pressure from the cost function to explain a repetition of length 2 as being a reﬂection rather a loop.

Original:  F ULL RESULTS ON DRAWINGS DATA SET
Revised:  F ULL RESULTS ON DRAWINGS DATA SET

Original: Below we show our full data set of drawings.
Revised: Below we show our full data set of drawings.

Original: The leftmost column is a hand drawing.
Revised: The leftmost column is a hand drawing.

Original: The middle column is a rendering of the most likely trace discovered by the neurally guided SMC sampling scheme.
Revised: The middle column is a rendering of the most likely trace discovered by the neurally guided SMC sampling scheme.

Original: The rightmost column is the program we synthesized from a ground truth execution trace of the drawing.
Revised: The rightmost column is the program we synthesized from a ground truth execution trace of the drawing.

Original: Note that because the inference procedure is stochastic, the top one most likely sample can vary from run to run.
Revised: Note that because the inference procedure is stochastic, the top one most likely sample can vary from run to run.

Original: Below we report a representative sample from a run with 2000 particles.
Revised: Below we report a representative sample from a run with 2000 particles.

Original: line(6,2,6,3, arrow=
Revised: line(6,2,6,3, arrow=

Original: False,solid =
Revised: False,solid =

Original: True)
Revised: True)

Original: ; line(6,2,3,2, arrow=
Revised: ; line(6,2,3,2, arrow=

Original: True,solid =
Revised: True,solid =

Original: True);
Revised: True);

Original: reflect(y = 9){ line(3,7,5,5, arrow=
Revised: reflect(y = 9){ line(3,7,5,5, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); rectangle(1,1,3,3); rectangle(5,3,7,6); rectangle(0,0,8,9) } for (i < 2){ line(8,8,3,8, arrow=
Revised: True); rectangle(1,1,3,3); rectangle(5,3,7,6); rectangle(0,0,8,9) } for (i < 2){ line(8,8,3,8, arrow=

Original: True,solid = False); line(-2 * i + 12,5,-2 * i + 13,5, arrow =
Revised: True,solid = False); line(-2 * i + 12,5,-2 * i + 13,5, arrow =

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(6,5,7,5, arrow=
Revised: ; line(6,5,7,5, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(3,-

Revised: ; line(3,-

Original: * i + 8,5,-2 * i + 6, arrow =
Revised: * i + 8,5,-2 * i + 6, arrow =

Original: True,solid =
Revised: True,solid =

Original: True); rectangle(-2 * i + 13,4,-2 * i + 14,6);
Revised: True); rectangle(-2 * i + 13,4,-2 * i + 14,6);

Original: rectangle(1,-6 * i + 7,3,-6 * i + 9) }; circle(8,5); rectangle(5,3,6,7); rectangle(0,0,10,10); line(8,6,8,8, arrow=
Revised: rectangle(1,-6 * i + 7,3,-6 * i + 9) }; circle(8,5); rectangle(5,3,6,7); rectangle(0,0,10,10); line(8,6,8,8, arrow=

Original: False,solid= False)
Revised: False,solid= False)

Original: reflect(y = 7){ line(2,6,4,4, arrow=
Revised: reflect(y = 7){ line(2,6,4,4, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); rectangle(0,0,2,2) }; rectangle(4,2,6,5) line(7,5,9,5, arrow=
Revised: True); rectangle(0,0,2,2) }; rectangle(4,2,6,5) line(7,5,9,5, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); rectangle(5,3,7,7); rectangle(0,0,12,10); reflect(y=10){ circle(10,5); line(3,2,5,4, arrow=
Revised: True); rectangle(5,3,7,7); rectangle(0,0,12,10); reflect(y=10){ circle(10,5); line(3,2,5,4, arrow=

Original: True,solid=
Revised: True,solid=

Original: True); rectangle(1,1,3,3) } line(10,1,2,1, arrow=
Revised: True); rectangle(1,1,3,3) } line(10,1,2,1, arrow=

Original: True,solid = False); line(10,1,10,3, arrow=
Revised: True,solid = False); line(10,1,10,3, arrow=

Original: False,solid = False); line(7,4,9,4, arrow=
Revised: False,solid = False); line(7,4,9,4, arrow=

Original: True,solid =
Revised: True,solid =

Original: True);
Revised: True);

Original: reflect(y = 8){ circle(10,4); line(2,1,4,3, arrow=
Revised: reflect(y = 8){ circle(10,4); line(2,1,4,3, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); rectangle(4,2,7,6); rectangle(0,6,2,8) } line(12,9,12,0, arrow=
Revised: True); rectangle(4,2,7,6); rectangle(0,6,2,8) } line(12,9,12,0, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); rectangle(9,3,11,9); rectangle(6,5,8,9); rectangle(0,7,2,9); rectangle(3,8,5,9) for (i < 3){ for (j < (1*i + 1))
Revised: True); rectangle(9,3,11,9); rectangle(6,5,8,9); rectangle(0,7,2,9); rectangle(3,8,5,9) for (i < 3){ for (j < (1*i + 1))

Original: { if (j > 0){ line(3 * j + -3,

Revised: { if (j > 0){ line(3 * j + -3,

Original: i + -2,3 * j + -1,3 * i + -3, arrow =
Revised: i + -2,3 * j + -1,3 * i + -3, arrow =

Original: False,solid =
Revised: False,solid =

Original: True); line(0,3 * j + -2,3 * j + -3,4, arrow =
Revised: True); line(0,3 * j + -2,3 * j + -3,4, arrow =

Original: False,solid = True) } rectangle(2,0,5,3) } } for (i < 3){ circle(-3 * i + 7,1); circle(-3 * i + 7,6); line(-3 * i + 7,-1 * i + 4,-3 * i + 7,5, arrow =
Revised: False,solid = True) } rectangle(2,0,5,3) } } for (i < 3){ circle(-3 * i + 7,1); circle(-3 * i + 7,6); line(-3 * i + 7,-1 * i + 4,-3 * i + 7,5, arrow =

Original: False,solid =
Revised: False,solid =

Original: True) } line(0,0,0,4, arrow=
Revised: True) } line(0,0,0,4, arrow=

Original: False,solid =
Revised: False,solid =

Original: True)
Revised: True)

Original: [Table] [Table]
Revised: [Table] [Table]

Original: [Table]
Revised: [Table]

Original: reflect(x = 7){ circle(6,1); line(6,2,6,5, arrow=
Revised: reflect(x = 7){ circle(6,1); line(6,2,6,5, arrow=

Original: False,solid =
Revised: False,solid =

Original: True); rectangle(5,5,7,7) }; line(2,6,5,6, arrow=
Revised: True); rectangle(5,5,7,7) }; line(2,6,5,6, arrow=

Original: False,solid =
Revised: False,solid =

Original: True)
Revised: True)

Original: ; line(2,1,5,1, arrow=
Revised: ; line(2,1,5,1, arrow=

Original: False,solid =
Revised: False,solid =

Original: True) line(3,2,1,2, arrow=
Revised: True) line(3,2,1,2, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); line(0,3,2,3, arrow=
Revised: True); line(0,3,2,3, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); line(5,0,3,0, arrow=
Revised: True); line(5,0,3,0, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); line(2,1,4,1, arrow=
Revised: True); line(2,1,4,1, arrow=

Original: True,solid =
Revised: True,solid =

Original: True) rectangle(6,0,7,1); for(i<3){
Revised: True) rectangle(6,0,7,1); for(i<3){

Original: rectangle(-2*i+4,2 * i + 2,-

Revised: rectangle(-2*i+4,2 * i + 2,-

Original: i + 5,2 * i + 3); rectangle(-2 * i + 4,2 * i,-2 * i + 5,

Revised: i + 5,2 * i + 3); rectangle(-2 * i + 4,2 * i,-2 * i + 5,

Original: i + 1) } line(3,0,5,0, arrow=
Revised: i + 1) } line(3,0,5,0, arrow=

Original: False,solid =
Revised: False,solid =

Original: True); line(1,2,3,2, arrow=
Revised: True); line(1,2,3,2, arrow=

Original: False,solid =
Revised: False,solid =

Original: True)
Revised: True)

Original: ; line(0,3,2,3, arrow=
Revised: ; line(0,3,2,3, arrow=

Original: False,solid = False); line(2,1,4,1, arrow=
Revised: False,solid = False); line(2,1,4,1, arrow=

Original: False,solid = False) circle(9,1); for(i<3){ circle(-2*i + 7,

Revised: False,solid = False) circle(9,1); for(i<3){ circle(-2*i + 7,

Original: * i + 4); circle(-2 * i + 5,3 * i + 1); line(-2 * i + 6,3 * i + 1,-

Revised: * i + 4); circle(-2 * i + 5,3 * i + 1); line(-2 * i + 6,3 * i + 1,-

Original: i + 7,

Revised: i + 7,

Original: * i + 3, arrow =
Revised: * i + 3, arrow =

Original: False,solid =
Revised: False,solid =

Original: True); line(-2 * i + 7,3 * i + 3,-2 * i + 8,3 * i + 1, arrow =
Revised: True); line(-2 * i + 7,3 * i + 3,-2 * i + 8,3 * i + 1, arrow =

Original: False,solid =
Revised: False,solid =

Original: True) } for (i < 3)
Revised: True) } for (i < 3)

Original: { line(2 * i + 3,-3 * i + 9,

Revised: { line(2 * i + 3,-3 * i + 9,

Original: i + 2,-

Revised: i + 2,-

Original: i + 7, arrow =
Revised: i + 7, arrow =

Original: True,solid =
Revised: True,solid =

Original: True); line(2 * i + 3,-3 * i + 9,2 * i + 4,-3 * i + 7, arrow =
Revised: True); line(2 * i + 3,-3 * i + 9,2 * i + 4,-3 * i + 7, arrow =

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; rectangle(2 * i + 2,-3 * i + 9,2 * i + 4,-3 * i + 11); rectangle(2 * i,-3 * i + 6,2 * i + 2,-3 * i + 8) }; rectangle(8,0,10,2) for (i < 2){ circle(2 * i + 1,-

Revised: ; rectangle(2 * i + 2,-3 * i + 9,2 * i + 4,-3 * i + 11); rectangle(2 * i,-3 * i + 6,2 * i + 2,-3 * i + 8) }; rectangle(8,0,10,2) for (i < 2){ circle(2 * i + 1,-

Original: i + 6); circle(-3 * i + 7,

Revised: i + 6); circle(-3 * i + 7,

Original: * i + 3); circle(2 * i + 5,1) } line(4,4,2,2, arrow=
Revised: * i + 3); circle(2 * i + 5,1) } line(4,4,2,2, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); rectangle(0,0,2,2); rectangle(3,4,5,6) for (i < 3){ line(-4 * i + 9,4,-4 * i + 9,2, arrow =
Revised: True); rectangle(0,0,2,2); rectangle(3,4,5,6) for (i < 3){ line(-4 * i + 9,4,-4 * i + 9,2, arrow =

Original: True,solid =
Revised: True,solid =

Original: True); for (j < (1*i + 2)){ if (j > 0){ circle(-4 * j + 13,-4 * i + 9); line(-4 * i + 12,5,-4 * i + 10,5, arrow =
Revised: True); for (j < (1*i + 2)){ if (j > 0){ circle(-4 * j + 13,-4 * i + 9); line(-4 * i + 12,5,-4 * i + 10,5, arrow =

Original: True,solid = True) } rectangle(0,4,2,6) } } circle(1,5); line(4,1,2,1, arrow=
Revised: True,solid = True) } rectangle(0,4,2,6) } } circle(1,5); line(4,1,2,1, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(8,1,6,1, arrow=
Revised: ; line(8,1,6,1, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; for (i < 3){ line(4 * i + 1,2,4 * i + 1,4, arrow =
Revised: ; for (i < 3){ line(4 * i + 1,2,4 * i + 1,4, arrow =

Original: True,solid =
Revised: True,solid =

Original: True); rectangle(4,4,6,6); rectangle(4*i,0,4 * i + 2,2) }; rectangle(8,4,10,6) for (i < 3){ line(4 * i + 1,4,4 * i + 1,2, arrow =
Revised: True); rectangle(4,4,6,6); rectangle(4*i,0,4 * i + 2,2) }; rectangle(8,4,10,6) for (i < 3){ line(4 * i + 1,4,4 * i + 1,2, arrow =

Original: True,solid =
Revised: True,solid =

Original: True); for (j < 2){ line(4 * j + 4,5,4 * j + 2,5, arrow =
Revised: True); for (j < 2){ line(4 * j + 4,5,4 * j + 2,5, arrow =

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; rectangle(4 * i,-4 * j + 4,4 * i + 2,-4 * j + 6) } } for (i < 3){ line(4 * i + 1,2,4 * i + 1,4, arrow =
Revised: ; rectangle(4 * i,-4 * j + 4,4 * i + 2,-4 * j + 6) } } for (i < 3){ line(4 * i + 1,2,4 * i + 1,4, arrow =

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; for (j < 2){ circle(4 * i + 1,4 * j + 1); line(4 * j + 4,1,4 * j + 2,1, arrow =
Revised: ; for (j < 2){ circle(4 * i + 1,4 * j + 1); line(4 * j + 4,1,4 * j + 2,1, arrow =

Original: True,solid = True) } } line(5,7,5,6, arrow=
Revised: True,solid = True) } } line(5,7,5,6, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); line(3,3,3,2, arrow=
Revised: True); line(3,3,3,2, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(1,7,1,6, arrow=
Revised: ; line(1,7,1,6, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); rectangle(0,3,6,6); rectangle(2,0,4,2); rectangle(0,7,6,9) line(6,1,5,1, arrow=
Revised: True); rectangle(0,3,6,6); rectangle(2,0,4,2); rectangle(0,7,6,9) line(6,1,5,1, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); for (i < 3){ line(3,1,2,1, arrow=
Revised: True); for (i < 3){ line(3,1,2,1, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; rectangle(3 * i,0,3 * i + 2,2) } for (i < 3){ circle(1,-4 * i + 9) }; line(1,4,1,2, arrow=
Revised: ; rectangle(3 * i,0,3 * i + 2,2) } for (i < 3){ circle(1,-4 * i + 9) }; line(1,4,1,2, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(1,8,1,6, arrow=
Revised: ; line(1,8,1,6, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: reflect(y = 2){ line(0,1,1,2, arrow=
Revised: reflect(y = 2){ line(0,1,1,2, arrow=

Original: False,solid =
Revised: False,solid =

Original: True)
Revised: True)

Original: ; line(1,0,2,1, arrow=
Revised: ; line(1,0,2,1, arrow=

Original: False,solid =
Revised: False,solid =

Original: True) } line(0,0,0,2, arrow=
Revised: True) } line(0,0,0,2, arrow=

Original: False,solid =
Revised: False,solid =

Original: True)
Revised: True)

Original: ; line(0,2,2,2, arrow=
Revised: ; line(0,2,2,2, arrow=

Original: False,solid =
Revised: False,solid =

Original: True) for (i < 3)
Revised: True) for (i < 3)

Original: { line(1 * i,-

Revised: { line(1 * i,-

Original: i + 4,

Revised: i + 4,

Original: * i,-1 * i + 6, arrow =
Revised: * i,-1 * i + 6, arrow =

Original: False,solid =
Revised: False,solid =

Original: True)
Revised: True)

Original: ; line(1 * i,-

Revised: ; line(1 * i,-

Original: i + 6,2 * i + 2,-

Revised: i + 6,2 * i + 2,-

Original: * i + 6, arrow =
Revised: * i + 6, arrow =

Original: False,solid =
Revised: False,solid =

Original: True) } circle(5,2); circle(5,4); rectangle(4,1,6,5); reflect(y=5){ circle(1,4); rectangle(0,3,2,5) } for (i < 3){ for (j < (1*i + 1)){
Revised: True) } circle(5,2); circle(5,4); rectangle(4,1,6,5); reflect(y=5){ circle(1,4); rectangle(0,3,2,5) } for (i < 3){ for (j < (1*i + 1)){

Original: circle(3 * i + 1,-

Revised: circle(3 * i + 1,-

Original: j + 5) }
Revised: j + 5) }

Original: ; rectangle(3 * i,-2 * i + 4,

Revised: ; rectangle(3 * i,-2 * i + 4,

Original: * i + 2,6) } circle(5,5); line(2,5,4,5, arrow=
Revised: * i + 2,6) } circle(5,5); line(2,5,4,5, arrow=

Original: False,solid =
Revised: False,solid =

Original: True); rectangle(0,0,5,3); rectangle(0,4,2,6) line(0,0,0,3, arrow=
Revised: True); rectangle(0,0,5,3); rectangle(0,4,2,6) line(0,0,0,3, arrow=

Original: False,solid =
Revised: False,solid =

Original: True); line(6,0,6,3, arrow=
Revised: True); line(6,0,6,3, arrow=

Original: False,solid =
Revised: False,solid =

Original: True)
Revised: True)

Original: ; line(0,3,6,3, arrow=
Revised: ; line(0,3,6,3, arrow=

Original: False,solid = False); line(0,0,6,0, arrow=
Revised: False,solid = False); line(0,0,6,0, arrow=

Original: False,solid = False) for (i < 2){ line(2 * i,-

Revised: False,solid = False) for (i < 2){ line(2 * i,-

Original: i + 5,2,5, arrow =
Revised: i + 5,2,5, arrow =

Original: False,solid =
Revised: False,solid =

Original: True); line(1,2,2 * i + 1,-

Revised: True); line(1,2,2 * i + 1,-

Original: i + 4, arrow =
Revised: i + 4, arrow =

Original: False,solid =
Revised: False,solid =

Original: True); line(2 * i + 3,-2 * i + 3,5,3, arrow =
Revised: True); line(2 * i + 3,-2 * i + 3,5,3, arrow =

Original: False,solid =
Revised: False,solid =

Original: True)
Revised: True)

Original: ; line(4,0,2 * i + 4,-2 * i + 2, arrow =
Revised: ; line(4,0,2 * i + 4,-2 * i + 2, arrow =

Original: False,solid = True) } circle(6,1); circle(1,1); circle(1,6); line(2,6,6,2, arrow=
Revised: False,solid = True) } circle(6,1); circle(1,1); circle(1,6); line(2,6,6,2, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(1,5,1,2,
Revised: ; line(1,5,1,2,

Original: arrow=
Revised: arrow=

Original: True,solid =
Revised: True,solid =

Original: True) rectangle(5,5,9,9); rectangle(0,0,4,4); for(i<2){ rectangle(1*i+7,-2 * i + 2,9,-

Revised: True) rectangle(5,5,9,9); rectangle(0,0,4,4); for(i<2){ rectangle(1*i+7,-2 * i + 2,9,-

Original: * i + 4); rectangle(0,-

Revised: * i + 4); rectangle(0,-

Original: * i + 8,1 * i + 1,-

Revised: * i + 8,1 * i + 1,-

Original: * i + 9) } circle(1,8); line(5,2,5,5, arrow=
Revised: * i + 9) } circle(1,8); line(5,2,5,5, arrow=

Original: False,solid =
Revised: False,solid =

Original: True)
Revised: True)

Original: ; line(1,7,3,5, arrow=
Revised: ; line(1,7,3,5, arrow=

Original: False,solid =
Revised: False,solid =

Original: True); rectangle(4,0,6,2); rectangle(0,5,6,9) for (i < 3){ for (j < 3){ if (j > 0){ line(3 * j + -1,

Revised: True); rectangle(4,0,6,2); rectangle(0,5,6,9) for (i < 3){ for (j < 3){ if (j > 0){ line(3 * j + -1,

Original: * i + 1,3 * j,3 * i + 1, arrow =
Revised: * i + 1,3 * j,3 * i + 1, arrow =

Original: False,solid =
Revised: False,solid =

Original: True)
Revised: True)

Original: ; line(3 * i + 1,3 * j + -1,3 * i + 1,3 * j, arrow =
Revised: ; line(3 * i + 1,3 * j + -1,3 * i + 1,3 * j, arrow =

Original: False,solid =
Revised: False,solid =

Original: True) }
Revised: True) }

Original: circle(3 * i + 1,3 * j + 1) } } for (i < 3){ for (j < 3){ if (j > 0){ line(3 * i + 1,3 * j + -1,3 * i + 1,3 * j, arrow
Revised: circle(3 * i + 1,3 * j + 1) } } for (i < 3){ for (j < 3){ if (j > 0){ line(3 * i + 1,3 * j + -1,3 * i + 1,3 * j, arrow

Original: =
Revised: =

Original: False,solid =
Revised: False,solid =

Original: True);
Revised: True);

Original: line(3 * j + -1,3 * i + 1,3 * j,3 * i + 1, arrow =
Revised: line(3 * j + -1,3 * i + 1,3 * j,3 * i + 1, arrow =

Original: False,solid =
Revised: False,solid =

Original: True) } rectangle(3 * i,3 * j,3 * i + 2,3 * j + 2) } } for (i < 3){ circle(-3 * i + 7,1) } for (i < 3)
Revised: True) } rectangle(3 * i,3 * j,3 * i + 2,3 * j + 2) } } for (i < 3){ circle(-3 * i + 7,1) } for (i < 3)

Original: { rectangle(-2 * i + 4,0,-

Revised: { rectangle(-2 * i + 4,0,-

Original: i + 5,6) } line(4,0,4,1, arrow=
Revised: i + 5,6) } line(4,0,4,1, arrow=

Original: False,solid = False); line(0,0,0,5, arrow=
Revised: False,solid = False); line(0,0,0,5, arrow=

Original: False,solid = False); line(4,1,4,5, arrow=
Revised: False,solid = False); line(4,1,4,5, arrow=

Original: False,solid = False) line(0,0,0,5, arrow=
Revised: False,solid = False) line(0,0,0,5, arrow=

Original: False,solid =
Revised: False,solid =

Original: True)
Revised: True)

Original: ; line(4,0,4,5, arrow=
Revised: ; line(4,0,4,5, arrow=

Original: False,solid =
Revised: False,solid =

Original: True) reflect(x = 12){ circle(4,1); line(2,1,3,1, arrow=
Revised: True) reflect(x = 12){ circle(4,1); line(2,1,3,1, arrow=

Original: False,solid =
Revised: False,solid =

Original: True); rectangle(0,0,2,2) } circle(7,6); reflect(y=12)
Revised: True); rectangle(0,0,2,2) } circle(7,6); reflect(y=12)

Original: { line(4,6,6,6, arrow=
Revised: { line(4,6,6,6, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(2,10,2,8, arrow=
Revised: ; line(2,10,2,8, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); rectangle(1,0,3,2) }; rectangle(0,4,4,8)
Revised: True); rectangle(1,0,3,2) }; rectangle(0,4,4,8)

Original: reflect(y = 9){ reflect(x = 9){ circle(8,8); line(3,8,6,8, arrow=
Revised: reflect(y = 9){ reflect(x = 9){ circle(8,8); line(3,8,6,8, arrow=

Original: False,solid =
Revised: False,solid =

Original: True)
Revised: True)

Original: ; line(1,3,1,6, arrow=
Revised: ; line(1,3,1,6, arrow=

Original: False,solid = True) } } reflect(x = 11){ rectangle(9,4,10,7); reflect(y=11){ rectangle(8,0,11,3); rectangle(4,9,7,10) } } for (i < 3){ line(2 * i,-2 * i + 5,2 * i + 2,-2 * i + 5, arrow =
Revised: False,solid = True) } } reflect(x = 11){ rectangle(9,4,10,7); reflect(y=11){ rectangle(8,0,11,3); rectangle(4,9,7,10) } } for (i < 3){ line(2 * i,-2 * i + 5,2 * i + 2,-2 * i + 5, arrow =

Original: False,solid =
Revised: False,solid =

Original: True); line(2 * i + 1,-2 * i + 4,

Revised: True); line(2 * i + 1,-2 * i + 4,

Original: i + 3,-2 * i + 4, arrow =
Revised: i + 3,-2 * i + 4, arrow =

Original: False,solid = True) } rectangle(4,1,6,2); rectangle(7,0,9,2); reflect(y=10){ rectangle(0,0,3,3); rectangle(1,4,2,6) } line(7,4,9,4, arrow=
Revised: False,solid = True) } rectangle(4,1,6,2); rectangle(7,0,9,2); reflect(y=10){ rectangle(0,0,3,3); rectangle(1,4,2,6) } line(7,4,9,4, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(8,3,7,3, arrow =
Revised: ; line(8,3,7,3, arrow =

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; reflect(y = 7){ line(2,1,4,3, arrow=
Revised: ; reflect(y = 7){ line(2,1,4,3, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); rectangle(0,0,2,2) }; line(8,3,9,3, arrow=
Revised: True); rectangle(0,0,2,2) }; line(8,3,9,3, arrow=

Original: False,solid =
Revised: False,solid =

Original: True); rectangle(9,2,12,5); rectangle(4,2,7,5) for (i < 3){ rectangle(2 * i,2 * i,2 * i + 3,

Revised: True); rectangle(9,2,12,5); rectangle(4,2,7,5) for (i < 3){ rectangle(2 * i,2 * i,2 * i + 3,

Original: * i + 1) } circle(4,10); for(i<3){ circle(3*i+ 1,1);
Revised: * i + 1) } circle(4,10); for(i<3){ circle(3*i+ 1,1);

Original: circle(3 * i + 1,5); line(4,9,3 * i + 1,6, arrow =
Revised: circle(3 * i + 1,5); line(4,9,3 * i + 1,6, arrow =

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(3 * i + 1,4,3 * i + 1,2, arrow =
Revised: ; line(3 * i + 1,4,3 * i + 1,2, arrow =

Original: True,solid =
Revised: True,solid =

Original: True) } line(2,8,2,6, arrow=
Revised: True) } line(2,8,2,6, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); line(4,8,4,0, arrow=
Revised: True); line(4,8,4,0, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); line(6,8,6,4, arrow=
Revised: True); line(6,8,6,4, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(0,8,8,8, arrow=
Revised: ; line(0,8,8,8, arrow=

Original: False,solid =
Revised: False,solid =

Original: True) line(2,3,2,5, arrow=
Revised: True) line(2,3,2,5, arrow=

Original: False,solid =
Revised: False,solid =

Original: True); rectangle(0,0,4,8); rectangle(1,1,3,3); rectangle(1,5,3,7) circle(1,5); line(1,4,1,2, arrow=
Revised: True); rectangle(0,0,4,8); rectangle(1,1,3,3); rectangle(1,5,3,7) circle(1,5); line(1,4,1,2, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; rectangle(0,0,2,2) rectangle(0,0,6,2);
Revised: ; rectangle(0,0,2,2) rectangle(0,0,6,2);

Original: reflect(x = 6){ for (i < 3){ circle(5,2 * i + 4); circle(2 * i + 1,1); rectangle(4,3,6,9) } } for (i < 3){ for (j < 3){ circle(4 * i + 1,-3 * j + 7) } } line(8,0,0,0, arrow=
Revised: reflect(x = 6){ for (i < 3){ circle(5,2 * i + 4); circle(2 * i + 1,1); rectangle(4,3,6,9) } } for (i < 3){ for (j < 3){ circle(4 * i + 1,-3 * j + 7) } } line(8,0,0,0, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(8,0,8,7, arrow=
Revised: ; line(8,0,8,7, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); for (i < 3){ rectangle(-2 * i + 6,0,-2 * i + 7,-1 * i + 5) } line(4,0,0,0, arrow=
Revised: True); for (i < 3){ rectangle(-2 * i + 6,0,-2 * i + 7,-1 * i + 5) } line(4,0,0,0, arrow=

Original: False,solid = False) line(2,4,4,4, arrow=
Revised: False,solid = False) line(2,4,4,4, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(6,7,5,5, arrow=
Revised: ; line(6,7,5,5, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; for (i < 2){ circle(-2 * i + 7,-3 * i + 7); circle(3 * i + 4,1); line(5,3,3 * i + 4,2, arrow =
Revised: ; for (i < 2){ circle(-2 * i + 7,-3 * i + 7); circle(3 * i + 4,1); line(5,3,3 * i + 4,2, arrow =

Original: True,solid =
Revised: True,solid =

Original: True); rectangle(0,3,2,5) } circle(2,1); circle(6,1); line(5,1,3,1, arrow=
Revised: True); rectangle(0,3,2,5) } circle(2,1); circle(6,1); line(5,1,3,1, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; rectangle(0,0,7,2) rectangle(5,0,8,3); rectangle(0,2,1,3); rectangle(2,1,4,3) for (i < 3){ rectangle(-1 * i + 2,-

Revised: ; rectangle(0,0,7,2) rectangle(5,0,8,3); rectangle(0,2,1,3); rectangle(2,1,4,3) for (i < 3){ rectangle(-1 * i + 2,-

Original: i + 2,

Revised: i + 2,

Original: * i + 3,

Revised: * i + 3,

Original: * i + 3) } reflect(y = 6){ line(2,5,4,5, arrow=
Revised: * i + 3) } reflect(y = 6){ line(2,5,4,5, arrow=

Original: False,solid =
Revised: False,solid =

Original: True); reflect(x = 6){ line(5,2,5,4, arrow=
Revised: True); reflect(x = 6){ line(5,2,5,4, arrow=

Original: False,solid =
Revised: False,solid =

Original: True); rectangle(0,4,2,6)
Revised: True); rectangle(0,4,2,6)

Original: } } reflect(y = 6){ reflect(x = 6){ circle(1,1); line(5,2,5,4, arrow=
Revised: } } reflect(y = 6){ reflect(x = 6){ circle(1,1); line(5,2,5,4, arrow=

Original: False,solid = True) }; line(2,1,4,1, arrow=
Revised: False,solid = True) }; line(2,1,4,1, arrow=

Original: False,solid =
Revised: False,solid =

Original: True) } for (i < 3)
Revised: True) } for (i < 3)

Original: { line(1 * i,-

Revised: { line(1 * i,-

Original: i + 2,-

Revised: i + 2,-

Original: * i + 7,-1 * i + 2, arrow =
Revised: * i + 7,-1 * i + 2, arrow =

Original: False,solid = True) } line(1,5,5,1, arrow=
Revised: False,solid = True) } line(1,5,5,1, arrow=

Original: False,solid =
Revised: False,solid =

Original: True); line(1,4,5,0, arrow=
Revised: True); line(1,4,5,0, arrow=

Original: False,solid =
Revised: False,solid =

Original: True); rectangle(0,4,1,5); rectangle(5,0,6,1) for (i < 3){ circle(-4 * i + 9,1);
Revised: True); rectangle(0,4,1,5); rectangle(5,0,6,1) for (i < 3){ circle(-4 * i + 9,1);

Original: rectangle(-

Revised: rectangle(-

Original: i + 8,0,-

Revised: i + 8,0,-

Original: * i + 10,2) }
Revised: * i + 10,2) }

Original: reflect(x = 5){ circle(4,1); line(4,4,4,2, arrow=
Revised: reflect(x = 5){ circle(4,1); line(4,4,4,2, arrow=

Original: True,solid =
Revised: True,solid =

Original: True) }; rectangle(0,4,5,6) circle(3,1); reflect(x=6){ circle(5,5); circle(1,9); line(5,4,3,2, arrow=
Revised: True) }; rectangle(0,4,5,6) circle(3,1); reflect(x=6){ circle(5,5); circle(1,9); line(5,4,3,2, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); line(5,8,2,5, arrow=
Revised: True); line(5,8,2,5, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(1,8,1,6, arrow=
Revised: ; line(1,8,1,6, arrow=

Original: True,solid = True) } for (i < 3){ line(7,1,5 * i + 2,3, arrow =
Revised: True,solid = True) } for (i < 3){ line(7,1,5 * i + 2,3, arrow =

Original: True,solid =
Revised: True,solid =

Original: True); for (j < (1*i + 1)){ if (j > 0){ line(5 * j + -1,9,5 * i,5, arrow =
Revised: True); for (j < (1*i + 1)){ if (j > 0){ line(5 * j + -1,9,5 * i,5, arrow =

Original: True,solid = True) }
Revised: True,solid = True) }

Original: line(5 * j + 2,5,5 * j + 2,9, arrow =
Revised: line(5 * j + 2,5,5 * j + 2,9, arrow =

Original: True,solid =
Revised: True,solid =

Original: True) }
Revised: True) }

Original: ; rectangle(5 * i,3,5 * i + 4,5); rectangle(5 * i,9,5 * i + 4,10) }; rectangle(2,0,12,1) reflect(y = 8){ for (i < 3){ circle(-3 * i + 7,-

Revised: ; rectangle(5 * i,3,5 * i + 4,5); rectangle(5 * i,9,5 * i + 4,10) }; rectangle(2,0,12,1) reflect(y = 8){ for (i < 3){ circle(-3 * i + 7,-

Original: i + 7) }; rectangle(2,2,3,3); rectangle(5,5,6,6) } line(10,8,12,4, arrow=
Revised: i + 7) }; rectangle(2,2,3,3); rectangle(5,5,6,6) } line(10,8,12,4, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(6,8,8,4, arrow=
Revised: ; line(6,8,8,4, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; for (i < 3){ line(4 * i + 5,5,4 * i + 5,7, arrow =
Revised: ; for (i < 3){ line(4 * i + 5,5,4 * i + 5,7, arrow =

Original: True,solid =
Revised: True,solid =

Original: True); line(4 * i + 5,1,4 * i + 5,3, arrow =
Revised: True); line(4 * i + 5,1,4 * i + 5,3, arrow =

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; rectangle(4 * i + 4,3,4 * i + 6,5); rectangle(4 * i + 4,7,4 * i + 6,9); line(2,1,13,1, arrow=
Revised: ; rectangle(4 * i + 4,3,4 * i + 6,5); rectangle(4 * i + 4,7,4 * i + 6,9); line(2,1,13,1, arrow=

Original: False,solid = True) }; rectangle(0,0,2,8) for (i < 3){ for (j < 3){ circle(2 * j + 1,

Revised: False,solid = True) }; rectangle(0,0,2,8) for (i < 3){ for (j < 3){ circle(2 * j + 1,

Original: i + 1) } }; rectangle(2,2,4,4); rectangle(0,0,6,6) for (i < 4){ circle(4 * i + 1,1); circle(4 * i + 1,5); for (j < 3){ line(4 * i + 1,4,4 * i + 1,2, arrow
Revised: i + 1) } }; rectangle(2,2,4,4); rectangle(0,0,6,6) for (i < 4){ circle(4 * i + 1,1); circle(4 * i + 1,5); for (j < 3){ line(4 * i + 1,4,4 * i + 1,2, arrow

Original: =
Revised: =

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(4 * j + 2,5,4 * j + 4,5, arrow =
Revised: ; line(4 * j + 2,5,4 * j + 4,5, arrow =

Original: True,solid = True) } } reflect(x = 8){ circle(4,1); circle(1,8); line(0,2,4,5, arrow=
Revised: True,solid = True) } } reflect(x = 8){ circle(4,1); circle(1,8); line(0,2,4,5, arrow=

Original: False,solid =
Revised: False,solid =

Original: True)
Revised: True)

Original: ; line(4,5,4,10, arrow=
Revised: ; line(4,5,4,10, arrow=

Original: False,solid = True) } circle(9,8); circle(5,1); circle(1,8); reflect(x=10){ line(6,1,9,3, arrow=
Revised: False,solid = True) } circle(9,8); circle(5,1); circle(1,8); reflect(x=10){ line(6,1,9,3, arrow=

Original: False,solid =
Revised: False,solid =

Original: True)
Revised: True)

Original: ; line(2,8,4,8, arrow=
Revised: ; line(2,8,4,8, arrow=

Original: False,solid =
Revised: False,solid =

Original: True)
Revised: True)

Original: ; line(9,5,9,7, arrow=
Revised: ; line(9,5,9,7, arrow=

Original: False,solid =
Revised: False,solid =

Original: True); rectangle(0,3,2,5) }; rectangle(4,7,6,9) line(3,2,5,4, arrow=
Revised: True); rectangle(0,3,2,5) }; rectangle(4,7,6,9) line(3,2,5,4, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(6,6,6,5, arrow=
Revised: ; line(6,6,6,5, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); line(8,3,7,4, arrow=
Revised: True); line(8,3,7,4, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(4,0,12,8, arrow=
Revised: ; line(4,0,12,8, arrow=

Original: False,solid =
Revised: False,solid =

Original: True)
Revised: True)

Original: ; line(0,6,12,6, arrow=
Revised: ; line(0,6,12,6, arrow=

Original: False,solid =
Revised: False,solid =

Original: True); line(0,8,8,0, arrow =
Revised: True); line(0,8,8,0, arrow =

Original: False,solid =
Revised: False,solid =

Original: True) for (i < 3){ circle(4 * i + 1,13); circle(5,-4 * i + 9); circle(4 * i + 1,9); line(4 * i + 1,12,

Revised: True) for (i < 3){ circle(4 * i + 1,13); circle(5,-4 * i + 9); circle(4 * i + 1,9); line(4 * i + 1,12,

Original: * i + 1,10, arrow =
Revised: * i + 1,10, arrow =

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(5,-4 * i + 12,5,-4 * i + 10, arrow =
Revised: ; line(5,-4 * i + 12,5,-4 * i + 10, arrow =

Original: True,solid =
Revised: True,solid =

Original: True) }; line(9,8,6,5, arrow=
Revised: True) }; line(9,8,6,5, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(1,8,4,5, arrow=
Revised: ; line(1,8,4,5, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: reflect(x = 14){ circle(11,10); circle(3,4); circle(7,1); reflect(y=20){ circle(13,7); circle(9,7) }; line(3,3,7,2, arrow=
Revised: reflect(x = 14){ circle(11,10); circle(3,4); circle(7,1); reflect(y=20){ circle(13,7); circle(9,7) }; line(3,3,7,2, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); line(10,10,5,8, arrow=
Revised: True); line(10,10,5,8, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); reflect(x = 6){ line(5,12,3,11, arrow=
Revised: True); reflect(x = 6){ line(5,12,3,11, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(1,6,3,5,
Revised: ; line(1,6,3,5,

Original: arrow =
Revised: arrow =

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(3,9,5,8, arrow=
Revised: ; line(3,9,5,8, arrow=

Original: True,solid =
Revised: True,solid =

Original: True) } } circle(1,1); circle(4,1); rectangle(6,0,8,2); rectangle(9,0,11,2)
Revised: True) } } circle(1,1); circle(4,1); rectangle(6,0,8,2); rectangle(9,0,11,2)

Original: Solver timeout reflect(x = 10){ circle(5,1); circle(2,4); line(2,3,5,2, arrow=
Revised: Solver timeout reflect(x = 10){ circle(5,1); circle(2,4); line(2,3,5,2, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); reflect(x = 16){ circle(9,7); line(9,6,8,5, arrow=
Revised: True); reflect(x = 16){ circle(9,7); line(9,6,8,5, arrow=

Original: True,solid = True) } }
Revised: True,solid = True) } }

Original: Solver timeout for (i < 4){ if (i > 0){ line(1,3 * i,1,

Revised: Solver timeout for (i < 4){ if (i > 0){ line(1,3 * i,1,

Original: * i + -1, arrow =
Revised: * i + -1, arrow =

Original: True,solid = True) } circle(1,3 * i + 1) } rectangle(5,0,8,3); rectangle(0,5,3,8); for(i<2){ rectangle(1*i+6,3 * i + 4,8,

Revised: True,solid = True) } circle(1,3 * i + 1) } rectangle(5,0,8,3); rectangle(0,5,3,8); for(i<2){ rectangle(1*i+6,3 * i + 4,8,

Original: i + 6); rectangle(0,2 * i,

Revised: i + 6); rectangle(0,2 * i,

Original: * i + 1,

Revised: * i + 1,

Original: i + 1) } reflect(x = 8){ rectangle(0,0,1,1); rectangle(5,5,8,8); rectangle(0,2,2,4) } for (i < 3){ rectangle(-2 * i + 4,-

Revised: i + 1) } reflect(x = 8){ rectangle(0,0,1,1); rectangle(5,5,8,8); rectangle(0,2,2,4) } for (i < 3){ rectangle(-2 * i + 4,-

Original: * i + 2,

Revised: * i + 2,

Original: i + 6,2 * i + 3) } circle(9,5); line(3,1,8,1, arrow=
Revised: i + 6,2 * i + 3) } circle(9,5); line(3,1,8,1, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(8,5,7,5, arrow=
Revised: ; line(8,5,7,5, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); line(9,8,0,8, arrow=
Revised: True); line(9,8,0,8, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(9,2,9,4, arrow=
Revised: ; line(9,2,9,4, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(12,1,10,1, arrow=
Revised: ; line(12,1,10,1, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(9,2,10,1, arrow=
Revised: ; line(9,2,10,1, arrow=

Original: False,solid =
Revised: False,solid =

Original: True); line(12,1,12,5, arrow=
Revised: True); line(12,1,12,5, arrow=

Original: False,solid =
Revised: False,solid =

Original: True); reflect(x = 6){ line(6,5,4,5, arrow=
Revised: True); reflect(x = 6){ line(6,5,4,5, arrow=

Original: True,solid =
Revised: True,solid =

Original: True) }; rectangle(2,4,4,6); rectangle(1,0,13,9); line(9,6,9,8, arrow=
Revised: True) }; rectangle(2,4,4,6); rectangle(1,0,13,9); line(9,6,9,8, arrow=

Original: False,solid= True); line(6,4,7,5, arrow=
Revised: False,solid= True); line(6,4,7,5, arrow=

Original: False,solid =
Revised: False,solid =

Original: True); line(10,5,12,5, arrow=
Revised: True); line(10,5,12,5, arrow=

Original: False,solid =
Revised: False,solid =

Original: True); line(3,1,3,4, arrow=
Revised: True); line(3,1,3,4, arrow=

Original: False,solid = True) circle(6,2);
Revised: False,solid = True) circle(6,2);

Original: for(i<3){ circle(5*i + 1,7) }; line(5,7,2,7, arrow =
Revised: for(i<3){ circle(5*i + 1,7) }; line(5,7,2,7, arrow =

Original: True,solid =
Revised: True,solid =

Original: True); line(6,6,6,3, arrow=
Revised: True); line(6,6,6,3, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); line(10,7,7,7, arrow=
Revised: True); line(10,7,7,7, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); rectangle(4,0,8,9)
Revised: True); rectangle(4,0,8,9)

Original: reflect(x = 5){ reflect(y = 5){ line(0,5,2,5, arrow
Revised: reflect(x = 5){ reflect(y = 5){ line(0,5,2,5, arrow

Original: =
Revised: =

Original: False,solid =
Revised: False,solid =

Original: True); line(0,3,0,5, arrow=
Revised: True); line(0,3,0,5, arrow=

Original: False,solid = True) } } for (i < 3){ reflect(x = 14){ circle(9,4 * i + 1); line(10,4 * i + 1,12,

Revised: False,solid = True) } } for (i < 3){ reflect(x = 14){ circle(9,4 * i + 1); line(10,4 * i + 1,12,

Original: * i + 1, arrow =
Revised: * i + 1, arrow =

Original: False,solid =
Revised: False,solid =

Original: True); rectangle(0,4 * i,2,4 * i + 2) } } reflect(x = 10){ line(5,6,1,8, arrow=
Revised: True); rectangle(0,4 * i,2,4 * i + 2) } } reflect(x = 10){ line(5,6,1,8, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(9,2,5,4, arrow=
Revised: ; line(9,2,5,4, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; for (i < 3){ circle(4 * i + 1,4 * i + 1) } } reflect(x = 12){ line(6,2,6,3, arrow=
Revised: ; for (i < 3){ circle(4 * i + 1,4 * i + 1) } } reflect(x = 12){ line(6,2,6,3, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(2,7,5,4, arrow=
Revised: ; line(2,7,5,4, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); line(0,0,9,9, arrow=
Revised: True); line(0,0,9,9, arrow=

Original: False,solid = True) }; line(0,2,12,2, arrow=
Revised: False,solid = True) }; line(0,2,12,2, arrow=

Original: False,solid =
Revised: False,solid =

Original: True) for (i < 3){ for (j < 3){
Revised: True) for (i < 3){ for (j < 3){

Original: if (j > 0)
Revised: if (j > 0)

Original: { circle(6 * i + -5,-5 * j + 16); line(6 * i + -5,5,4,2, arrow =
Revised: { circle(6 * i + -5,-5 * j + 16); line(6 * i + -5,5,4,2, arrow =

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(6 * j + -5,10,6 * i + -5,7, arrow =
Revised: ; line(6 * j + -5,10,6 * i + -5,7, arrow =

Original: True,solid = True) } circle(4,1) } } reflect(y = 10){ circle(1,9); for(i<4){ circle(-2*i + 9,-

Revised: True,solid = True) } circle(4,1) } } reflect(y = 10){ circle(1,9); for(i<4){ circle(-2*i + 9,-

Original: i + 9) } } for (i < 3){ circle(1,-4 * i + 9); circle(5,-4 * i + 9); for (j < 3){ if (j > 0){ line(4 * i + -3,-4 * j + 10,

Revised: i + 9) } } for (i < 3){ circle(1,-4 * i + 9); circle(5,-4 * i + 9); for (j < 3){ if (j > 0){ line(4 * i + -3,-4 * j + 10,

Original: * i + -3,-4 * j + 12, arrow =
Revised: * i + -3,-4 * j + 12, arrow =

Original: False,solid =
Revised: False,solid =

Original: True) } line(2,-4 * j + 9,4,-4 * j + 9, arrow =
Revised: True) } line(2,-4 * j + 9,4,-4 * j + 9, arrow =

Original: False,solid = True) } } circle(2,2); circle(2,6); circle(2,11); line(2,5,2,3, arrow=
Revised: False,solid = True) } } circle(2,2); circle(2,6); circle(2,11); line(2,5,2,3, arrow=

Original: True,solid =
Revised: True,solid =

Original: True)
Revised: True)

Original: ; line(2,10,2,7, arrow=
Revised: ; line(2,10,2,7, arrow=

Original: True,solid =
Revised: True,solid =

Original: True); rectangle(0,0,4,9) for (i < 2){ circle(4,6 * i + 1); circle(1,6 * i + 4); rectangle(0,6 * i,2,6 * i + 2); rectangle(3,6 * i + 3,5,

Revised: True); rectangle(0,0,4,9) for (i < 2){ circle(4,6 * i + 1); circle(1,6 * i + 4); rectangle(0,6 * i,2,6 * i + 2); rectangle(3,6 * i + 3,5,

Original: * i + 5) }
Revised: * i + 5) }

Original: R
Revised: R