  We analyze the emission spectrum of the hot Jupiter WASP-12b using our
HELIOS-R retrieval code and HELIOS-K opacity calculator. When interpreting
Hubble and Spitzer data, the retrieval outcomes are found to be
prior-dominated. When the prior distributions of the molecular abundances are
assumed to be log-uniform, the volume mixing ratio of HCN is found to be
implausibly high. A VULCAN chemical kinetics model of WASP-12b suggests that
chemical equilibrium is a reasonable assumption even when atmospheric mixing is
implausibly rigorous. Guided by (exo)planet formation theory, we set Gaussian
priors on the elemental abundances of carbon, oxygen and nitrogen with the
Gaussian peaks being centered on the measured C/H, O/H and N/H values of the
star. By enforcing chemical equilibrium, we find substellar O/H and stellar to
slightly superstellar C/H for the dayside atmosphere of WASP-12b. The
superstellar carbon-to-oxygen ratio is just above unity, regardless of whether
clouds are included in the retrieval analysis, consistent with Madhusudhan et
al. (2011). Furthermore, whether a temperature inversion exists in the
atmosphere depends on one's assumption for the Gaussian width of the priors.
Our retrieved posterior distributions are consistent with the formation of
WASP-12b in a solar-composition protoplanetary disk, beyond the water iceline,
via gravitational instability or pebble accretion (without core erosion) and
migration inwards to its present orbital location via a disk-free mechanism,
and are inconsistent with both in-situ formation and core accretion with disk
migration, as predicted by Madhusudhan et al. (2017). We predict that the
interpretation of James Webb Space Telescope WASP-12b data will not be
prior-dominated.
