Actually writing invariants before program statements has been considered in a number of different forms by M.H. van Emden, J.C. Reynolds and R-J Back.
M.H. van Emden, J.C. Reynolds, and R-J Back have examined various methods for placing invariants before program statements.