  Let A \subseteq B be cancellative abelian semigroups, and let R be an
integral domain. We show that the semigroup ring R[B] can be decomposed, as an
R[A]-module, into a direct sum of R[A]-submodules of the quotient ring of R[A].
In the case of a finite extension of positive affine semigroup rings we obtain
an algorithm computing the decomposition. When R[A] is a polynomial ring over a
field we explain how to compute many ring-theoretic properties of R[B] in terms
of this decomposition. In particular we obtain a fast algorithm to compute the
Castelnuovo-Mumford regularity of homogeneous semigroup rings. As an
application we confirm the Eisenbud-Goto conjecture in a range of new cases.
Our algorithms are implemented in the Macaulay2 package MonomialAlgebras.
