  Algorithms are presented for calculating the partition function of
constrained beta-gamma systems in terms of the generating functions of the
individual fields of the theory, the latter obtained as the Hilbert series of
the arc space of the algebraic variety defined by the constraint. Examples of a
beta-gamma system on a complex surface with an $A_1$ singularity and pure
spinors are worked out and compared with existing results.
