Formula Variables

A formula variable (FV) consists of a data register (DR) and a formula expression (FE) (or simply formula). The formula describes how the value of the data register (DR) can be computed from other variables (RWV or FV). The system will always update the DR using the formula whenever it is possible. This part of the system is called formula data maintainer (FDM).

The value of a formula is equivalent to the value of the DR of that FV. The user can (re-)define the formula of a definition but not the value of the DR. This means that the DR is read-only by the user. In EDEN, the formula of a formula variable is defined using the ``is'' operator, for example:

f is a + b

defines a FV f whose value is always equal to the sum of the values of variables a and b. The expression ``a + b'' is the FE of f. Note that all variables mentioned in the FE, in this case, a and b, can be either FV's or RWV's.

The value of a FV is referenced if the name of the FV appears in an expression, e.g. the right-hand side of an assignment statement.

The syntax of a formula definition is defined in the EDEN Guide.


Block Diagram of a Formula Maintaining Sub-system

[DIAGRAM]

The arrows show how data might flow. E.g. the user can define a FV by giving the formula to it. As shown in the diagram, the user can examine the value of a DR but not write to it. When the user (re)defines a FV or writes to a RWV, the FDM will re-calculate those DR's using their associated FE's. The FDM will read the values of some RWV's and/or DR's if it is necessary. The results will be assigned to the DR's by the FDM.


[BACK] [FORWARD] [HOME] [UP] [HELP]