Three Address Code
In computer science, three-address code (often abbreviated to TAC or 3AC) is a form of representing intermediate code used by compilers to aid in the implementation of code-improving transformations. Each instruction in three-address code can be described as a 4-tuple: (operator, operand1, operand2, result).
Each statement has the general form of:
such as:
where x, y and z are variables, constants or temporary variables generated by the compiler. op represents any operator, e.g. an arithmetic operator.
Expressions containing more than one fundamental operation, such as:
are not representable in three-address code as a single instruction. Instead, they are decomposed into an equivalent series of instructions, such as
The term three-address code is still used even if some instructions use more or fewer than two operands. The key features of three-address code are that every instruction implements exactly one fundamental operation, and that the source and destination may refer to any available register.
A refinement of three-address code is static single assignment form (SSA).
Read more about Three Address Code: Example
Famous quotes containing the words address and/or code:
“In the mythus a superhuman intelligence uses the unconscious thoughts and dreams of men as its hieroglyphics to address men unborn.”
—Henry David Thoreau (18171862)
“... the self respect of individuals ought to make them demand of their leaders conformity with an agreed-upon code of ethics and moral conduct.”
—Mary Barnett Gilson (1877?)