Symbolic Computation - Computer Science Aspects - Data Representation - Expressions

Expressions

Except for numbers and variables, every mathematical expression may be viewed as the symbol of an operator followed by a sequence of operands. In computer algebra software, the expressions are usually represented in this way. This representation is very flexible, and many things, that seem not to be mathematical expressions at first glance, may be represented and manipulated as such. For example, an equation is an expression with "=" as an operator, a matrix may be represented as an expression with "matrix" as an operator and its rows as operands.

Even programs may be considered and represented as expressions with operator "procedure" and, at least, two operands, the list of parameters and the body, which is itself an expression with "body" as an operator and a sequence of instructions as operands. Conversely, any mathematical expression may be viewed as a program. For example, the expression a + b may be viewed as a program for the addition, with a and b as parameters. Executing this program consists in evaluating the expression for given values of a and b; if they do not have any value — that is they are indeterminates —, the result of the evaluation is simply its input.

This process of delayed evaluation is fundamental in computer algebra. For example, the operator "=" of the equations is also, in most computer algebra systems, the name of the program of the equality test: normally, the evaluation of an equation results in an equation, but, when an equality test is needed, — either explicitly asked by the user through an "evaluation to a boolean" command, or automatically started by the system in the case of a test inside a program — then the evaluation to a boolean 0 or 1 is executed, .

As the size of the operands of an expression is unpredictable and may change during a working session, the sequence of the operands is usually represented as a sequence of either pointers (like in Macsyma) or entries in a hash table (like in Maple).

Read more about this topic:  Symbolic Computation, Computer Science Aspects, Data Representation

Famous quotes containing the word expressions:

    Those expressions are omitted which can not with propriety be read aloud in the family.
    Thomas Bowdler (1754–1825)

    Preschoolers think and talk in concrete, literal terms. When they hear a phrase such as “losing your temper,” they may wonder where the lost temper can be found. Other expressions they may hear in times of crisis—raising your voice, crying your eyes out, going to pieces, falling apart, picking on each other, you follow in your father’s footsteps—may be perplexing.
    Ruth Formanek (20th century)

    Whatever offices of life are performed by women of culture and refinement are thenceforth elevated; they cease to be mere servile toils, and become expressions of the ideas of superior beings.
    Harriet Beecher Stowe (1811–1896)