Your boss was not quite right.
There is a "Correctness-by-Construction" approach to programming which allows one to severely restrict the state space of a program from the beginning such that every statement/block/function only operates on a much smaller "valid" set of program sub-states. This is using classical logic via predicates as explained by Hoare Triples, Dijkstra's wp-calculus, Morgan's refinement calculus and later Meyer's Design-by-Contract.
An alternative is constructive logic using types and lambda calculus as pointed out by a sibling commentator.
There have been lots of systems which have been formally proved/verified to various extents/levels as can be seen in Industrial-Strength Formal Methods in Practice by Hinchey/Bowen and many other similar books.