MENTAL
 Main Menu
 Properties
 MENTAL, a Self-Reflexive Language


MENTAL, a Self-Reflexive Language
 MENTAL, A
SELF-REFLEXIVE
LANGUAGE

"By reflexion general ideas are acquired" (Locke).

"Reflexion is the instrument of philosophy" (Hegel).

"Reflexion is the way to reach the concepts" (Kant).

"Reflexivity is the very essence of consciousness" (Frederick Peters).



The Reflexion

There are many theories about reflexion, a term derived from the Latin reflexio. We highlight the following:
Reflexion vs. Reflexivity

A distinction must be made between reflexion and reflexivity. Reflexivity is a generic mechanism that appears in many domains and consists of a circular relationship of an entity with itself or its environment. An entity is continuously interacting with its environment and both reflect each other. Reflexion (mental) is a type of reflexivity between the subject and the medium with which it interacts.

A system is self-reflexive if it is self-sufficient in the process of reflexion. Self-reflexion is a mechanism used by nature to optimize its resources to the maximum. The universe is self-reflexive. The mind, reflexion of the universe, considered in itself, is also self-reflexive.


Orders of reflexivity

When a subject receives data or information, perceives or experiences, immediately a reflexive process takes place, since the subject tries to interpret it, that is, to assign a meaning to it. The mind always goes from the particular to the general, trying to fit an experience into a conceptual category. The greater the novelty of the input received, the greater the reflexive process. This is first-order reflexivity. If he subsequently reflexes on his reflexion, then it is second-order reflexion. And so on.

A thermostat is a first-order reflexive system because it automatically adjusts the temperature according to a reference temperature t, according to a rule. If the reference temperature t is changed, the system that does so would be a reflexive system of order 2.


Direct and reflexive knowledge

Direct knowledge is automatic, where there is no distinction between subject and environment, and therefore no reflexion. Knowledge is reflexive when the subject is confronted with a new problem that produces a certain imbalance and has to adapt or modify his conceptual schemes to achieve a new equilibrium.

In classical Greece, a distinction was made between knowledge doxa (vulgar or ordinary knowledge, not subjected to critical reflexion) and episteme (knowledge elaborated with rigor).


Conceptual Reflexion

Conceptual reflexion is applying a concept on itself. The result is a concept of order 2. By reapplying the concept on the concept of order 2, we obtain a concept of order 3, etc. Some examples of order 2 concepts are: A distinction must be made between conceptual reflexion and autological concepts. Concepts that can be applied to themselves are called "autological" and those that cannot be applied to themselves are called "heterological". Usually these concepts are adjectives. Examples of autological concepts are "polysyllabic" (it is a polysyllabic word) and "esdrújula" (it is an esdrújula word). Examples of heterological concepts are "blue" (it is not blue), "round" (it is not round) and "German" (it is not German).


Reflexive levels

In conceptual reflexion there are two levels:
  1. Base. It corresponds to the initial or first order concept.

  2. Goal. Corresponds to the second order concept.

    Examples: meta-language, meta-mathematics, meta-logic, meta-data, meta-information, meta-computing, meta-programming, meta-objects, meta-rules, meta-processes, etc.
The prefix "meta" means "beyond". At the philosophical level it is identified with transcendence since the appearance of Aristotle's Metaphysics. At the conceptual level it is the first level of reflexion.

Evidently, there can be more levels, being possible to build the so-called "reflexive tower", with the levels base, meta, meta-meta, meta-meta-meta, etc., in which each level or conceptual layer refers to the level immediately below, with concepts of order 1, 2, 3, etc.

Reflexive tower


Reflexive Systems

A reflexive system is a system with base and target levels.
Variants of reflexive systems
Moebius
strip
Ouroboros

Ideally, there should be unification between base and all possible target levels, where all can communicate with each other, without restrictions. Therefore, the most interesting systems are the self-reflexive ones.


Linguistic Reflexion

At the linguistic level, reflexivity is the ability of language to refer to itself. Every natural language has a reflexive dimension, so the metalinguistic capacity is universal to all natural languages. And it is a capacity specific to human beings.

In logic and philosophy of language, a metalanguage is a language that is used to talk about another language (called an "object language"). The term "metalanguage" was introduced by Alfred Tarski in the 1930s as a solution to semantic paradoxes and inconsistencies in natural language, such as the liar's paradox ("This sentence is false"). He distinguished between object language and metalanguage. Object language is the base language. Metalanguage is the language that talks about the object language. To distinguish the two types of languages, Tarski enclosed object language sentences in single quotation marks (apostrophes). For example, "The sentence 'snow is white' is true if snow is white" is a reflexive sentence because it speaks of the language itself. The predicate "true" belongs to the metalanguage. According to Tarski, no language can contain its own truth predicate.

Bertrand Russell proposed in his introduction to Wittgenstein's Tractatus the need to establish a hierarchy of languages, based on his "type theory", such that a language can only refer to lower-level languages. A language cannot refer to the language itself without falling into inconsistencies or logical paradoxes.


Reflexive Programming Languages

A reflexive programming language is a language that has linguistic resources for the base level and for the target language. The reflexion can be explicit or implicit: A self-reflexive programming language is one that can reference itself, that is, it can reference the language's own resources with the language's own resources. The base and meta levels are confused. With self-reflexive language we can build self-reflexive systems.

Computers are not conscious, they do not "know" what they are doing, they act mechanically according to the previously designed program. Computer programs are not conscious, but they can act with reflexive mechanisms if the programming language has those reflexive resources.


Meta-circular languages and systems

A meta-circular language is a self-reflexive language that can be extended by the language itself. A meta-circular system is a system that can be extended by its own resources. For example: The term "meta-circular" was first used by John McCarthy in an implementation of the Lisp language in Lisp.


Reification and reflexion

Reification is closely related to reflexion, for reification is a type of reflexion.

In the context of programming languages, reification is a process by which something that was implicit or unexpressed at runtime is explicitly formulated and made available for handling by the language as data. There are two types: The reification mechanism can be contemplated in the programming language and used in the program design.


Reflexive languages

Languages that support reflexion are mainly artificial intelligence languages. Languages with different reflexive properties are, for example: The problem with these languages is twofold:
  1. Reflexion is usually associated with a single paradigm, i.e., reflexion is not generic. Depending on the type of paradigm used, there are meta-programs, meta-functions, meta-rules, meta-objects, meta-procedures, and so on.

  2. There is no self-reflexion, i.e., the base and meta levels are clearly differentiated.
Some object-oriented languages include at the meta level a single monolithic meta-object, with consequent complexity of use. Others allow multiple meta-objects, but require a meta-level protocol: a set of rules for handling and communicating meta-objects. They are usually limited to reflexion on variable values.

In some object-oriented programming languages, such as Java, reflexion allows run-time introspection of classes, interfaces, attributes, and methods, without knowing the names.


Homoiconic languages

A homoiconic language −from the Greek homo, equal, and icon, representation− is one in which the representation of the code is the same as that of the data, i.e., the syntax and semantics are the same. This qualifier was first used by Alan Kay in his 1968 doctoral thesis. This property is related to consciousness, to the union of opposites, in this case, data and code.

An example of a homoiconic language is Lisp, which uses the list as the only system for representing code and data. Lists can be nested.

Other languages that are considered homoiconic are: Curl, Elixir, Io, Ioke, Julia, Mathematica, Prolog, Rebol, Red, Snobol, Tcl, Xslt, Refal, and Wolfram.

Languages that follow the von Neumann architecture are homoiconic, since the code is stored in memory and can be treated as data. It was precisely this idea, that of storing code in memory, that was the great driving force behind the development of computing in general and programming languages in particular.

The advantages of a homoiconic language are many:
Advantages of reflexion in programming

The reflexive mechanism in programming provides enormous advantages. We can highlight the following: In short, reflexion in programming makes it possible to relate and integrate topics or areas as disparate as operating systems, language definition, compilers and interpreters, program debugging, meta-programming, protection against external attacks, etc. In addition, due to the possibility of implementing different programming paradigms, it is considered as a new programming paradigm: reflexion-oriented programming.


Self-Reflexion in MENTAL


Addenda

Reflexion and rationale

Reflexion has played an important role in foundationalist theories of mathematics and computer science, as they have helped to reveal inconsistencies and prove properties. There are three historical cases:
  1. In 1901, Russell demonstrated that Frege's proposal to ground set theory in logic was nonsensical by discovering an inconsistency with the following self-referential expression: "Is the set of sets that are not members of themselves members of themselves? After this discovery, in order to circumvent this problem, set theory had to be formulated axiomatically.

  2. In 1931, Gödel proved the incompleteness of formal axiomatic systems formalizing arithmetic. He used the self-referential expression "This sentence is unprovable".

  3. The Universal Turing machine is a machine U which has as input a concrete Turing machine A (which encodes an algorithm) with its data. Turing proved that the halting problem of a Universal Turing machine is incomputable, that is, there is no meta-algorithm H capable of determining whether a concrete algorithm A will terminate with a result. To do so, he used the following self-referenced expression: does H stop with input data H.

Reflexivity applications
Alan Kay, the visionary

Alan Kay (1940-), inventor of the term "homoiconic", is a visionary. He invented object-oriented programming with the SmallTalk programming language. He conceived the book-like personal computer (what today is a laptop or tablet) that he called Dynabook, based on the object paradigm. He invented a graphical user interface based on the desktop metaphor. An eternal seeker of the simple and functional, he intended the object-oriented programming language to be a model of the human mind. Kay predicted that one day all users would be programmers at the same time.


Bibliography