Concept programming

Concept -oriented programming is a programming paradigm that is used to convert concepts into the planning phase of a program in the representations of the concepts in machine code. The paradigm of the concept -oriented programming was introduced in 2001 by Christophe de Dinechin with the programming language XL.

Pseudo - metrics

The approach -oriented programming makes use of so-called pseudo - metrics to determine the quality of the source code. These metrics are called pseudo - metrics because they relate to both the conceptual part, and the part of the code, with the clear understanding that the concept of space can not be normalized sufficiently rigorous to apply a true metric on it. The pseudo - metrics of konzeptionalen programming include:

  • The syntactic noise measures discrepancies between concept and syntax. For example, the semicolon at the end of command in C can be regarded as syntactic noise, since it has no counterpart in the concept space and thus would actually be unnecessary ( it is only used by the compiler ).
  • The Semantic noise determined discrepancies between the expected testimony or conduct of the concept and its actual statement or behavior in the code. For example, the fact that integer types crowded ( while true (mathematical ) integer not do ) a form of semantic noise.
  • The bandwidth measures how much of the concept of space is represented by the given code. For example, the addition operator overload in C a higher bandwidth than the add instruction in assembler, because the C operator can also perform additions on floating point numbers, and not only on integer values ​​.
  • The noise rate indicates what percentage of the code is used for the representation of the actual concepts.

Rule of equivalence, equivalence resolution

The rule of equivalence is satisfied if the behavior of the code matches the original concept. This equivalence can be resolved in many cases. Integer overflows disturb the equivalence between the mathematical integer concept ( principle) and the computerized tried approach to this concept.

Many styles to disturb the equivalence, have specific names, as these are very common and often occur:

  • A domain error ( roughly Range Error ) is a situation where the code outside the domain of equivalence (range of equivalence ) is executed, which is the area that correspond to the concept and implementation. (see above) An integer overflow is an example of a range error.
  • A concept cast ( concept conversion ) is a rewriting of a particular concept as a different concept when the original concept can not be represented by the normal tools of the language. In C, an example of a concept copy is the use of pointers ( pointers ) for output arguments, since C does not actually output arguments.
  • A priority inversion ( hierarchy inversion) is a form of syntactic or semantic noise, starting with some forced by the language rules. This type is referred to as the language gained precedence over the concept of rank reversal. In Smalltalk, everything is an object, and this usually leads to the undesirable consequence that an expression such as 2 3 * 5 does not obey the usual operator precedence ( Smalltalk interprets this as transmitting the message * to the number that comes out in 2 3, which is a result of 25 instead of 17 results. )


To write code recommends concept-oriented programming following steps:

Many programming tools lacks imaging capabilities, which is why concept-oriented programming sometimes requires the use of a preprocessor or metaprogrammiererischen techniques.


XL is currently the only programming language that was designed exclusively for concept-oriented programming, however, can be operated in almost any language concept-oriented programming, with varying degrees of success. Lisp and Forth (and derivatives ) are examples of pre-existing languages ​​, which are well suited to the concept -oriented programming.

Similar projects

There are projects that use similar ideas to generate code at a higher level of abstraction. Among other things, these are: