Self-rewriting (self-amending) programs

For the artificial intelligence, there is an important concept of the software capable of rewriting (or amending) its own source code. As a modification of this basic idea, an intelligent program might be able to write other (possibly intelligent) programs.

It is important to mention that at the moment it is not important for the program to exhibit intelligent behaviour in order to be able to write programs, as there is such a thing as formal semantics of programming languages,which allows to easily implement algorithms capable of writing semantically and syntactically correct programs.

Then, it is only a matter of a quality of the algorithm (and time and human resources) to develop software capable of on-demand development of other software, following this list of principles:

  • given the formal semantics of programming languages, an algorithm can properly manipulate a set of semantic/syntactic programming language constructs (code blocks)
  • given a sandbox to try out programs built from those blocks, plus some kind of a learning algorithm, plus an expert system-like memory database, an algorithm would be capable of testing numerous code block combinations in order to create larger, more complex code blocks
  • given a program development task (in the terms of the "proram behaviour"), such an algorithm should be capable of combining complex code blocks into a piece of software, and then testing it
  • additional training for such an algorithm could be provided by supplying a set of complete software products with full source code, for the algorithm to identify portions of code respnsible for "observable" program behaviour

Surprisingly, such an algorithm would be quite straightforward to implement, as it does not even have any kind of reasoning embedded.

Programming, after all, is not an intelligent process :)

The concept described here may prove revolutionary, in terms of the quantities of programmers released from routine programming tasks and thus freed for creative and challenging software development tasks, like that of writing an algorithmic strong AI.

Comments on any known efforts in the field of "software writing programs" are highly welcome, as well as criticism on the concept described.

Syndicate content