  The constraint satisfaction problem (CSP) is concerned with homomorphisms
between two structures. For CSPs with restricted left-hand side structures, the
results of Dalmau, Kolaitis, and Vardi [CP'02], Grohe [FOCS'03/JACM'07], and
Atserias, Bulatov, and Dalmau [ICALP'07] establish the precise borderline of
polynomial-time solvability (subject to complexity-theoretic assumptions) and
of solvability by bounded-consistency algorithms (unconditionally) as bounded
treewidth modulo homomorphic equivalence.
  The general-valued constraint satisfaction problem (VCSP) is a generalisation
of the CSP concerned with homomorphisms between two valued structures. For
VCSPs with restricted left-hand side valued structures, we establish the
precise borderline of polynomial-time solvability (subject to
complexity-theoretic assumptions) and of solvability by the $k$-th level of the
Sherali-Adams LP hierarchy (unconditionally). We also obtain results on related
problems concerned with finding a solution and recognising the tractable cases;
the latter has an application in database theory.
