[1] https://link.springer.com/book/10.1007/978-1-4612-3228-5
[2] https://dl.acm.org/doi/10.1145/2499370.2491978
[3] It pretty much boils down to looking at your code and asking yourself "what has to be true for this to work?" and then writing code that ensures whatever is necessary is true for all possible code paths. Naturally that means limiting possible code paths. There's just one more reason why spaghetti code is bad.