Constrained Program Inference Using Metropolis-Hastings Sampling