Automatic Discovery Of Distributed Algorithms For Large-Scale Systems