  A spectral line and imaging survey of the low mass-loss rate AGB star R Dor
(Mdot ~ 1e-7 Msun/yr) and the high mass-loss rate AGB star IK Tau (Mdot ~5e-6
Msun/yr) was made with ALMA between 335 and 362 GHz at a spatial resolution of
~150 mas, corresponding to the locus of the main dust formation region of both
targets. Some 200 spectral features from 15 molecules (and their isotopologues)
were observed, including rotational lines in both the ground and vibrationally
excited states. Detected species include the gaseous precursors of dust grains
such as SiO, AlO, AlOH, TiO, and TiO2. We present a spectral atlas for both
stars and the parameters of all detected spectral features. A clear dichotomy
for the sulphur chemistry is seen: while CS, SiS, SO, and SO2 are abundantly
present in IK Tau, only SO and SO2 are detected in R Dor. Also other species
such as NaCl, NS, AlO, and AlOH display a completely different behaviour. From
some selected species, the minor isotopologues can be used to assess the
isotopic ratios. The channel maps of many species prove that both large and
small-scale inhomogeneities persist in the inner wind of both stars in the form
of blobs, arcs, and/or a disk. The high sensitivity of ALMA allows us to spot
the impact of these correlated density structures in the spectral line
profiles. The spectral lines often display a half width at zero intensity much
larger than expected from the terminal velocity, v_inf, previously derived for
both objects (36 km/s versus v_inf ~17.7 km/s for IK Tau and 23 km/s versus
v_inf ~5.5 km/s for R Dor). Both a more complex 3D morphology and a more
forceful wind acceleration of the (underlying) isotropic wind can explain this
trend. The formation of fractal grains in the region beyond ~400 mas can
potentially account for the latter scenario. From the continuum map, we deduce
a dust mass of ~3.7e-7 Msun for IK Tau and ~2e-8 Msun for R Dor.

Solar and Stellar Astrophysics