  Aims: We leverage the largest available Atacama Large
Millimetre/submillimetre Array (ALMA) survey from the archive (A$^3$COSMOS) to
study to study infrared luminosity function and dust-obscured star formation
rate density of sub-millimeter/millimeter (sub-mm/mm) galaxies from
$z=0.5\,-\,6$. Methods: The A$^3$COSMOS survey utilizes all publicly available
ALMA data in the COSMOS field, therefore having inhomogeneous coverage in terms
of observing wavelength and depth. In order to derive the luminosity functions
and star formation rate densities, we apply a newly developed method that
corrects the statistics of an inhomogeously sampled survey of individual
pointings to those representing an unbiased blind survey. Results: We find our
sample to mostly consist of massive ($M_{\star} \sim 10^{10} - 10^{12}$ $\rm
M_{\odot}$), IR-bright ($L_* \sim 10^{11}-10^{13.5} \rm L_{\odot}$), highly
star-forming (SFR $\sim 100-1000$ $\rm M_{\odot}$ $\rm yr^{-1}$) galaxies. We
find an evolutionary trend in the typical density ($\Phi^*$) and luminosity
($L^*$) of the galaxy population, which decrease and increase with redshift,
respectively. Our IR LF is in agreement with previous literature results and we
are able to extend to high redshift ($z > 3$) the constraints on the knee and
bright-end of the LF, derived by using the Herschel data. Finally, we obtain
the SFRD up to $z\sim 6$ by integrating the IR LF, finding a broad peak from $z
\sim 1$ to $z \sim 3$ and a decline towards higher redshifts, in agreement with
recent IR/mm-based studies, within the uncertainties, thus implying the
presence of larger quantities of dust than what is expected by optical/UV
studies.
