From WikiChip
Difference between revisions of "program"

(Overview)
(Compilation & Translation)
Line 8: Line 8:
  
 
=== Compilation & Translation ===
 
=== Compilation & Translation ===
There are a couple of ways programs in human-readable ([[source code]]) forms into an [[executable]] or some other form which can be processed and executed:
+
Traditionally, programs in human-readable form ([[source code]]) were converted into an [[executable]] file which could be executed directly by the underlying hardware. Over time a number of other alternatives were developed:
  
* Programs coded in [[source code|human-readable forms]] may be [[compiler|compiled]] to produce [[machine code]]. This is the kind of process that goes along with languages such as [[C]], [[C++]], [[Fortran]], and [[Lisp]] (see [[compiled language]]).  
+
'''Compiled Program''' is a [[machine code]] version of the of the original program that was in [[source code]] form. The machine code was generated by a [[compiler]] which performed the [[compilation|conversion]]. [[Machine code]] can be executed directly by the underlying hardware. This is the kind of process that goes along with languages such as [[C]], [[C++]], [[Fortran]], and [[Lisp]] (see [[compiled language]]).  
* Programs coded in human-readable forms may be compiled into [[p-code]] to be executed by a [[virtual machine]] or a hardware implementation that can execute that p-code. This is the idea behind languages such as [[Java]].
+
 
* Programs in human-readable forms can be interpreted and executed directly by an [[interpreter]] or specialized hardware. This is the idea behind languages such as [[MATLAB]], [[Python]], and [[PHP]] (see [[interpreted language]]).
+
'''Emulated Program''' is a [[p-code]] (or bytecode) version of the original program that was in [[source code]] form. The portable code was generated by a [[compiler]], however, unlike machine code, p-code cannot typically be executed directly by the hardware and instead needs the assistance of a [[virtual machine]] in order to process such code. This is the idea behind languages such as [[Java]] and [[MATLAB]].
 +
 
 +
'''Interpreted Program''' is a program that is identical to the original [[source code]]. In this kind of methodology, the code is interpreted and executed on the fly. This is the idea behind languages such as , [[Python]], and [[PHP]] (see [[interpreted language]]).
  
 
=== Execution & Interpretation ===
 
=== Execution & Interpretation ===

Revision as of 03:25, 18 June 2016

A program is an ordered set of operations that are processed by a processing unit (e.g. CPU, GPU, and calculator chips) or a processing program (e.g. an interpreter and virtual machine).

A program is usually bundled along with documentation and any dependent data and libraries. This bundle is collectively referred to as software. Such software is further classified into system software and application software.

Overview

A program is an ordered set of operations that implements one or more algorithm in order to solve some problem or complete a task. Programs are usually written by a programmer using a programming language, however they may also be created automatically using specialized code generators. Programming is typically involves writing source code, testing it, and modifying it appropriately. Software engineering is the discipline under which program development is done which involves the design, construction, testing, and maintenance.

Compilation & Translation

Traditionally, programs in human-readable form (source code) were converted into an executable file which could be executed directly by the underlying hardware. Over time a number of other alternatives were developed:

Compiled Program is a machine code version of the of the original program that was in source code form. The machine code was generated by a compiler which performed the conversion. Machine code can be executed directly by the underlying hardware. This is the kind of process that goes along with languages such as C, C++, Fortran, and Lisp (see compiled language).

Emulated Program is a p-code (or bytecode) version of the original program that was in source code form. The portable code was generated by a compiler, however, unlike machine code, p-code cannot typically be executed directly by the hardware and instead needs the assistance of a virtual machine in order to process such code. This is the idea behind languages such as Java and MATLAB.

Interpreted Program is a program that is identical to the original source code. In this kind of methodology, the code is interpreted and executed on the fly. This is the idea behind languages such as , Python, and PHP (see interpreted language).

Execution & Interpretation

New text document.svg This section is empty; you can help add the missing info by editing this page.

Classification

New text document.svg This section is empty; you can help add the missing info by editing this page.