Theories of physics would be instantiated as software libraries. The most modern physics library would pass the vast majority of the tests, by correctly predicting the outcome Y for every configuration X. But since physics is not yet complete, there would presumably be some tests that the best current theories cannot pass, or can only pass by jumping through some really ugly hoops - such as postulating the existence of dark matter and energy.
To be taken seriously when proposing a new theory, a researcher must submit an update to the current library, and show that the new theory passes all the tests. The research can also identify new X/Y combinations, not covered in the current test suite, where the new theory diverges from the old one. Experimentalists could then decide the question by running the corresponding experiments and adding the results to the main suite.