A linear program for testing local realism
We present a linear program that is capable of determining whether a set of correlations can be captured by a local realistic model. If the correlations can be described by such a model, the linear program outputs a joint probability distribution that produces the given correlations. If the correlations cannot be described under the assumption of local realism, the program outputs a Bell inequality violated by the correlations.