Skeleton (computer science)
Encyclopedia
Skeleton programming is a style of computer programming
Computer programming
Computer programming is the process of designing, writing, testing, debugging, and maintaining the source code of computer programs. This source code is written in one or more programming languages. The purpose of programming is to create a program that performs specific operations or exhibits a...

 based on simple high-level program structures and so called dummy code. Program skeletons resemble pseudocode
Pseudocode
In computer science and numerical computation, pseudocode is a compact and informal high-level description of the operating principle of a computer program or other algorithm. It uses the structural conventions of a programming language, but is intended for human reading rather than machine reading...

, but allow parsing
Parsing
In computer science and linguistics, parsing, or, more formally, syntactic analysis, is the process of analyzing a text, made of a sequence of tokens , to determine its grammatical structure with respect to a given formal grammar...

, compilation
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...

 and testing of the code.

Dummy code is inserted in a program skeleton to simulate processing and avoid compilation
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...

 error messages. It may involve empty function
Subroutine
In computer science, a subroutine is a portion of code within a larger program that performs a specific task and is relatively independent of the remaining code....

 declarations, or functions that return a correct result only for a simple test case where the expected response of the code is known.

Skeleton programming facilitates a top-down design approach, where a partially-functional system with complete high-level structures is designed and coded, and this system is then progressively expanded to fulfill the requirements of the project.

Program skeletons are sometimes used for high-level descriptions of algorithm
Algorithm
In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. Algorithms are used for calculation, data processing, and automated reasoning...

s.

A program skeleton may also be utilized as a template that reflects syntax and structures commonly used in a wide class of problems.

Skeleton programs are utilized in the template method design pattern used in object-oriented programming
Object-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...

. See that article for examples of skeleton programs.

In object-oriented programming
Object-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...

, dummy code corresponds to an abstract method, a method stub
Method stub
A method stub or simply stub in software development is a piece of code used to stand in for some other programming functionality. A stub may simulate the behavior of existing code or be a temporary substitute for yet-to-be-developed code...

 or a mock object
Mock object
In object-oriented programming, mock objects are simulated objects that mimic the behavior of real objects in controlled ways. A programmer typically creates a mock object to test the behavior of some other object, in much the same way that a car designer uses a crash test dummy to simulate the...

.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK