From time to time I am trying to implement automatic programming system. We already have the formalization of norms (laws/legislation, business policies and rules) as some kind of deontic logic (there have been endeavours to convert deontic logic formulae into executable rules). We have ontology of GUI elements. So - we have specification. But how to convert this specification into executable code? What we lack to do automatic programming at least in the domain of business software (that is specified by legislation and enterprise rules)?
-
3$\begingroup$ I'm not sure what you mean by "automatic programming". In the most general sense, i.e. a computer program that is able to write a program for any computable function, it is impossible. As a matter of fact, it is impossible to even write a program to check nontrivial properties of programs. $\endgroup$– quicksortCommented Dec 6, 2016 at 1:21
-
$\begingroup$ Yeah, the first obvious answer: We lack a clear understanding of what "automatic programming" is supposed to be. We have no shortage of metaprogramming systems, model-driven development support, and assorted DSL compilers and other source code generators of all kinds. $\endgroup$– Pseudonym ♦Commented Dec 6, 2016 at 1:32
-
1$\begingroup$ This is known as the program synthesis problem. For some specification languages (such as LTL over finite traces) the problem is theoretically computable but somewhat hard (e.g. 2EXPTIME-complete). For other languages it is typically not computable (e.g. set-theory-based specification languages like Z and VDM). $\endgroup$– KaiCommented Dec 6, 2016 at 6:55
1 Answer
We already have the formalization of norms
I don't think we do. Norms are written in natural languages (e.g. English). And truly understanding text written in a natural language (even a subset of it, such as the one used to write norms) is still not something that can be done.
Even if you solved that, business policies and rules usually aren't detailed enough to directly create useful programs out of them. That's another hurdle that's not going to be easy to cross.
-
$\begingroup$ The existence of lawyers proves that not even humans interpret the laws unambiguously (that's by design, I think). It's no wonder that computers can't do a very good job. $\endgroup$– adrianNCommented Dec 7, 2016 at 13:13