  We extend the persistence algorithm, viewed as an algorithm computing the
homology of a complex of free persistence or graded modules, to complexes of
modules that are not free. We replace persistence modules by their
presentations and develop an efficient algorithm to compute the homology of a
complex of presentations. To deal with inputs that are not given in terms of
presentations, we give an efficient algorithm to compute a presentation of a
morphism of persistence modules. This allows us to compute persistent
(co)homology of instances giving rise to complexes of non-free modules. Our
methods lead to a new efficient algorithm for computing the persistent homology
of simplicial towers and they enable efficient algorithms to compute the
persistent homology of cosheaves over simplicial towers and cohomology of
persistent sheaves on simplicial complexes. We also show that we can compute
the cohomology of persistent sheaves over arbitrary finite posets by reducing
the computation to a computation over simplicial complexes.
