Concept programming

Concept programming is a programming paradigm focusing on how concepts, that live in the programmer's mind, translate into representations that are found in the code space. This approach was introduced in 2001 by Christophe de Dinechin with the XL Programming Language.

Pseudo-metrics

Concept programming uses pseudo-metrics to evaluate the quality of code. They are called pseudo-metrics because they relate the concept space and the code space, with a clear understanding that the concept space cannot be formalized strictly enough for a real metric to be defined. Concept programming pseudo-metrics include:

Rule of equivalence, equivalence breakdown

The rule of equivalence is verified when the code behavior matches the original concept. This equivalence may break down in many cases. Integer overflow breaks the equivalence between the mathematical integer concept and the computerized approximation of the concept.

Many ways to break the equivalence have been given specific names, because they are very common:

Methodology

To write code, concept programming recommends the following steps:

  1. Identify and define the relevant concepts in the concept space.
  2. Identify traditional notations for the concepts, or invent usable notations.
  3. Identify a combination of programming constructs that allows the concepts to be represented comfortably in code - That includes finding a code notation that matches the notation identified in the previous step as closely as possible.
  4. Write code that preserves, as much as possible, the expected behavior and semantics of the relevant aspects of the original concept.

Many programming tools often lack in notational abilities, thus concept programming sometimes requires the use of preprocessors, domain-specific languages, or metaprogramming techniques.

Languages

XL is the only programming language known to date to be explicitly created for concept programming, but concept programming can be done in nearly any language, with varying degrees of success. Lisp and Forth (and their derivatives) are examples of pre-existing languages which lend themselves well to concept programming.

Similar works

There are projects that exploit similar ideas to create code with higher level of abstraction. Among them are:

See also

External links

This article is issued from Wikipedia - version of the 5/31/2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.