Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Artificial Neural Network Used to Compile Source Code

Would it be plausible to have an ANN that, when trained on millions of source code examples and the results from compiling them, that could compile source code into the correct output? For example, a ANN trained on Python source code and the resulting Python bytecode, that when given a Python program, could compile it to bytecode correctly.

like image 454
None Avatar asked Nov 28 '25 03:11

None


1 Answers

While this may be a very interesting epistemological question it is – in my opinion – not very interesting from a technical point of view: If you consider how AI programming developed you will find that the first approaches were oriented along processing the pure logical rules humans operate with while thinking. For instance the General Problem Solver written by Simon, Shaw and Newell in 1957 (!) tried to operate on a very high abstract level following general logical principles.

The driving force was the belief that every problem could be formalized as a logical problem and solved by using knowledge bases with corresponding inference rules. Obviously this does not hold for something "trivial" as pattern recognition or (visual, auditive etc.) perception. Only after encountering such problems the idea of Soft Computing (including ANNs) gained publicity and it pointed out that for some problems formal approaches are not appropriate.

To cut a long story short: For the problem of compiling a formal (!) language into another one the formal (logical) approach is the most appropriate. In other words: while it may even be possible to open a can with a stone I would rather use a can opener ... ;)

like image 145
philonous Avatar answered Nov 30 '25 00:11

philonous