Compiling or interpreting A computer program in the form of a - TopicsExpress



          

Compiling or interpreting A computer program in the form of a human-readable, computer programming language is called source code. Source code may be converted into an executable image by a compiler or executed immediately with the aid of an interpreter. Either compiled or interpreted programs might be executed in a batch process without human interaction, but interpreted programs allow a user to type commands in an interactive session. In this case, the programs are the separate commands, whose execution occurs sequentially, and thus together. When a language is used to give commands to a software application (such as a Unix shell or other command-line interface), it is called a scripting language. Compilers are used to translate source code from a programming language into either object code or machine code.[7] Object code needs further processing to become machine code, and machine code is the central processing units native code, ready for execution. Compiled computer programs are commonly referred to as executables, binary images, or simply as binaries — a reference to the binary file format used to store the executable code. Interpreted computer programs — in a batch or interactive session — are either decoded and then immediately executed or are decoded into some efficient intermediate representation for future execution. BASIC, Perl, and Python are examples of immediately executed computer programs. Alternatively, Java computer programs are compiled ahead of time and stored as a machine independent code called bytecode. Bytecode is then executed on request by an interpreter called a virtual machine. The main disadvantage of interpreters is that computer programs run slower than when compiled. Interpreting code is slower than running the compiled version because the interpreter must decode each statement each time it is loaded and then perform the desired action. However, software development may be faster using an interpreter because testing is immediate when the compiling step is omitted. Another disadvantage of interpreters is that at least one must be present on the computer during computer program execution. By contrast, compiled computer programs need no compiler present during execution. No properties of a programming language require it to be exclusively compiled or exclusively interpreted. The categorization usually reflects the most popular method of language execution. For example, BASIC is thought of as an interpreted language and C a compiled language, despite the existence of BASIC compilers and C interpreters. Some systems use just-in-time compilation (JIT) whereby sections of the source are compiled on the fly and stored for subsequent executions.
Posted on: Sun, 26 Oct 2014 21:10:00 +0000

Trending Topics




© 2015