Unifying Static And Runtime Analysis In Declarative Distributed Systems