Automatic Discovery of Distributed Algorithms for Large-Scale Systems