Correct by Construction Networks Using Stepwise Refinement