I heard a quote once that said something like, "For the niche of highly reliable systems, programming is nearly indistinguishable from mathematics. Highly reliable systems should not be a niche."
I think that current methods make it equivalent to writing or -- as user psranga says -- more like law, such as in writing an airtight contract. But I think the future is in software construction that is away from languages and syntax towards something much more mathematical.