Source Program vs. Object Program

Difference Between Source Program and Object Program

The source program and the program object are two types of programs which exist in computer programming. Source program is a machine instruction program with machine instructions which can be read by humans and are written by a human programmer. Object program is program which is a machine executable and is written by compiling a source program.

What is the Source Program?

Source program is a program written by a programmer by using HLL (High Level language), which is easily readable by humans. Source programs usually contain variable names which are meaningful and useful comments to make it more readable. A source program can not be directly executed on a machine. To run it, the source program is compiled using a compiler (a program, which changes source programs to executable code). Otherwise, using an interpreter a source program can be executed on the fly. Visual basic is a compiled language program, whereas Java is an interpreted language. When software applications are distributed in a characteristic way they will not include source files. However, if the application is open source, the source is distributed and the user sees and modifies the source code too.

Object Program

Object program is typically a file which is machine executable, and it is the result of compiling a source file using a compiler. Other than the machine instructions, they can include debugging information, symbols, stack information, rearrangement and profiling information. As they contain instructions in machine code, they are not easily readable by humans. Sometimes object programs are referred as an intermediate object between executable and source files. Linkers are the tools that are used to connect a set of objects to executable format. As mentioned here, Visual basic and java produces object files known as bytecode and .exe respectively. .exe files can be directly executed on windows, while the interpreter is required for the bytecode execution. The executable or object files can be converted back to its original source files through decompilation. For example, .Class files of Java can be decompiled using tools in files.

Difference between Object Program and Source Program

The source program is a program written by a programmer, while a program object is produced by a compiler using one or more source files as input. The source files are written in higher level languages like Java or C, while object programs generally include lower level languages such as assembly or machine code. Source files are easily compiled or interpreted for their execution. Decompilers are used for converting object programs to their original source file(s). It is important to note that the words object program and source program are used as relative terms. If you take a program transformation program (such as a compiler), the input is a source program and the output is the object program. This means that an object program produced by one can become a source program for other tool.


Category: VS  |  Tags:

  • Ssimrati

    source programing is done before translation.. and object programming is done after translation