Formal Methods for Distributed Computing in Future Railway Systems