The initial reactants, formaldehyde, glycolaldehyde, and H 2 O were input in SMILES. A set of defined reaction rules (summarized in Table ) developed based on literature precedent was then loaded. Stereochemistry is undefined in the formalism employed here, e.g., DL-glyceraldehyde is treated as a single "flattened" isomer (R,S-2,3-dihydroxypropanal), threose and erythrose are treated as equivalent, etc. Reaction rules are templates for reactions and are formally Double Push-Out (DPO) graph transformation rules . A DPO rule consists of three graphs (or molecular patterns): the left graph 'L' represents the reactant patterns to search for, the right graph 'R', the product pattern that will be substituted in place of "L", and the rule context graph 'K' which is needed along with the two arrows to formally encode which atoms of L map to which in R. If the reactant pattern L can be found in a molecule, then the corresponding edges of the graph (the chemical bonds of the molecule(s)) can be changed by removing all edges defined by L that are not in K, and adding all of the edges of R. The initial step in reaction rule application is thus the search for the reactant pattern L.