The aim of this paper is to use linear inverse theory to interpret gravity surveys in mining exploration by incorporating a priori information on the densities and data in terms of Gaussian or uniform probability laws. The Bayesian approach and linear programming techniques lead to the solution of well-posed questions resulting from the exploration process. In particular, we develop a method of measuring the possible heterogeneity within a given domain by using linear programming. These techniques are applied to gravity data taken over the massive sulfide deposit of Neves Corvo (Portugal). We show how crude constraints on the densities lead to a first estimation of the location of sources, while further geologic constraints allow us to estimate the heterogeneity and to put definite bounds on the ore masses.