I’d say that software engineering is more like writing a novel or essay. I’d say it has more in come with Linguistics than Math or ‘Real’ Engineering.
There are multiple ways to do Task A in a program as there are multiple ways to write Paragraph A in a story. Writing usually has some sort of syntax that it follows. Programming languages also enforce a syntax.
There are some exceptions but even those are covered in software engineering when we decide to design our own scripting language for our program which is ultimately parsed by a syntactic language anyways.
When we read source code, we read it top left to right and go continue on the next line, left to right, until we get to the bottom. (generalization, of course). Sometimes we jump around to follow the flow of the calls. Literature is like that as well. Some literature or source code is very simple and flow into each paragraph or function seamlessly. Other types of literature force the reader to jump around, as does source code.
As with the logic, one can write out a novel about math. We can write out math and express it in words. If the literature doesn’t specify how to process the math, we have a general idea on how to process it. X = X + 1 means we take X and add 1 to it. However in a book about math, ‘+’ could have been defined as substraction. We can do the same in software engineering.