  The tractability of certain CSPs for dense or sparse instances is known from
the 90s. Recently, the densification and the sparsification of CSPs were
formulated as computational tasks and the systematical study of their
computational complexity was initiated.
  We approach this problem by introducing the densification operator, i.e. the
closure operator that, given an instance of a CSP, outputs all constraints that
are satisfied by all of its solutions. According to the Galois theory of
closure operators, any such operator is related to a certain implicational
system (or, a functional dependency) $\Sigma$. We are specifically interested
in those classes of fixed-template CSPs, parameterized by constraint languages
$\Gamma$, for which the size of an implicational system $\Sigma$ is a
polynomial in the number of variables $n$. We show that in the Boolean case,
$\Sigma$ is of polynomial size if and only if $\Gamma$ is of bounded width. For
such languages, $\Sigma$ can be computed in log-space or in a logarithmic time
with a polynomial number of processors. Given an implicational system $\Sigma$,
the densification task is equivalent to the computation of the closure of input
constraints. The sparsification task is equivalent to the computation of the
minimal key. This leads to ${\mathcal O}({\rm poly}(n)\cdot N^2)$-algorithm for
the sparsification task where $N$ is the number of non-redundant
sparsifications of an original CSP.
  Finally, we give a complete classification of constraint languages over the
Boolean domain for which the densification problem is tractable.
