Unification of programming languages and modeling languages is the holy grail of course, and it’s certainly no longer a pipe dream, but we suffer much from ignoring the easy wins in the middle ground.
We could iteratively move towards this sort of thing by basically programming more directly with more formal stuff more often, basically thinking in terms of automata, process algebras, graph algorithms, etc. that’s the real design vocabulary now, not something like loops or objects
For example.. abstractions from FSMs to kahn processes whatnot can all compile to Petri nets, and suddenly you can embed a formally checked subset of a classic and well understood control flow or dataflow or graph transforms, but using the idioms available in your language (decorators, templates, annotation). You write the formal model and the informal implementation side by side, using each to generate/elaborate/constrain the other. There’s only one whole but it has two distinct views, neither of which is complete or standing alone
We could iteratively move towards this sort of thing by basically programming more directly with more formal stuff more often, basically thinking in terms of automata, process algebras, graph algorithms, etc. that’s the real design vocabulary now, not something like loops or objects
For example.. abstractions from FSMs to kahn processes whatnot can all compile to Petri nets, and suddenly you can embed a formally checked subset of a classic and well understood control flow or dataflow or graph transforms, but using the idioms available in your language (decorators, templates, annotation). You write the formal model and the informal implementation side by side, using each to generate/elaborate/constrain the other. There’s only one whole but it has two distinct views, neither of which is complete or standing alone