views:

146

answers:

4

I was wondering, is it possible to use Artificial Intelligence to make compilers better?

Things I could imagine if it was possible -

  • More specific error messages
  • Improving compiler optimizations, so the compiler could actually understand what you're trying to do, and do it better

If it is possible, are there any research projects on this subject?

+1  A: 

Are you refering to something like Genetic Programming?

http://en.wikipedia.org/wiki/Genetic_programming

Anthony
A: 

This is indeed a field being researched. Look at the milepost branch for GCC, which relies on profile-guided optimization and machine learning. The recent scientific literature for compilers is full of papers using a combination of data mining, machine learning (through genetic algorithms or neural networks), and more "classical", pattern-recognition of certain code patterns.

+2  A: 

You should look at MILEPOST GCC -

MILEPOST GCC is the first practical attept to build machine learning enabled open-source self-tuning production (and research) compiler that can adapt to any architecture using iterative feedback-directed compilation, machine learning and collective optimizatio

Tiendil
+1  A: 

An optimizing compiler is actually a very complex expert system and Expert systems is one of the oldest branches of artificial intelligence.

Eugen Constantin Dinca