Factor the computation of input and output sets into a public interface