A compiler maintains a collection of programs. It translates executable code to machine code and translates source code into executable code. It also tests a program's logic. What is the main function of a compiler?
1) Translates executable code to machine code
2) Translates source code into executable code
3) Tests a program's logic
4) Maintains a collection of programs