I finally read the article Is there a Logic of Imperatives? Conifold showed me and it elicited the question, for me, whether imperative programming is a form of imperative logic at all? The essay took to task the idea that in natural language, there are pure imperative inferences and highlighted how grammatically peculiar many attempted examples are. In fact while reading it, I was stricken by the extremely funny way it made its points, but now anyway I noticed that the grammatical peculiarities that would be present in an ordinary language imperative inference are also present, implicitly, in what I can remember, personally, from times that I used programming languages in some form or other.
It would seem then, that in imperative programming, syntactic warping is just bypassed by fiat, maybe. On the other hand, if computer programming involves a distinct kind of mathematics, and if classical set theory is directly correlated only with propositional logic, then there seems as if there possibly should be a form of set theory involving imperatives. My theory is that erotetic logic (logic of questions) "bridges the gap" here. The epistemic-imperative theory of questions is not completely correct about the reduction of erotetic functions to epistemic imperatives inasmuch as, for example, a prescriptive question such as, "Do this?" would not be a request for knowledge in the same way that it would be if the question directly affixed itself to a proposition about compliance with that imperative, say.
However, there is a fundamental unity of the declarative, imperative, and interrogative syntaxes inasmuch as, at least according to some of the research I've done, those three forms of syntax or sentence type are the only ones universal for known human languages. To reflect this unity in set theory, I have been trying to model the powerset operation in erotetic form as the ability to derive a new question from any set of answers given at some time, such that the answer to this new question cannot be derived from that set of answers.
Are there any existing works along these lines?