Concept Programming - Rule of Equivalence, Equivalence Breakdown

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:

  • A domain error is a condition where code executes outside of the domain of equivalence, which is the domain where the concept and the implementation match. An integer overflow is an example of domain error.
  • A concept cast is a rewrite of a concept as a different concept because the original concept cannot be represented by the tools. In C, using pointers for output arguments because C doesn't support output arguments explicitly is an example of concept cast.
  • A priority inversion is a form of syntactic or semantic noise introduced by some language-enforced general rule. It is called a priority inversion because the language takes precedence over the concept. In Smalltalk, everything is an object, and that rule leads to the undesirable consequence that an expression like 2+3*5 doesn't obey the usual order of operations (Smalltalk interprets this as sending the message * to the number resulting from 2+3, which yields result 25 instead of 17).

Read more about this topic:  Concept Programming

Famous quotes containing the words rule of, rule and/or breakdown:

    The world is filled with the proverbs and acts and winkings of a base prudence, which is a devotion to matter, as if we possessed no other faculties than the palate, the nose, the touch, the eye and ear; a prudence which adores the Rule of Three, which never subscribes, which never gives, which seldom lends, and asks but one question of any project,—Will it bake bread?
    Ralph Waldo Emerson (1803–1882)

    The first rule of education for me was discipline. Discipline is the keynote to learning. Discipline has been the great factor in my life. I discipline myself to do everything—getting up in the morning, walking, dancing, exercise. If you won’t have discipline, you won’t have a nation. We can’t have permissiveness. When someone comes in and says, “Oh, your room is so quiet,” I know I’ve been successful.
    Rose Hoffman, U.S. public school third-grade teacher. As quoted in Working, book 8, by Studs Terkel (1973)

    ... what’s been building since the 1980’s is a new kind of social Darwinism that blames poverty and crime and the crisis of our youth on a breakdown of the family. That’s what will last after this flurry on family values.
    Stephanie Coontz (b. 1944)