Formal Methods for Embedded Distributed Systems