Context Dependent Restrictions
Any program written in Refal Plus must satisfy a number of context dependent
restrictions.
- Elimination of Redundant Constructs
In order for the description of the context dependent restrictions to be concise, the program is supposed to have been "normalized". Namely, all constructs considered to be abbreviations for other constructs must have been replaced with their expansions.
- Restrictions Imposed by Function Declarations
The definition of a function must satisfy the restrictions imposed by the input and output formats of the function.
- Restrictions on the Use of References to Functions
If a reference to a function appears as a symbol in a ground expression, the function must be capable of taking as input any ground expression and is allowed to return any ground expression.
- Restrictions on the Use of Variables
A variable appearing in a result expression must have been already defined. A variable gets defined, when it appears in a pattern or in a hard expression. If several different variables get defined at the same place, their indices must be different.
- Restrictions on the Use of Cuts
For each cut \! in a function definition there must exist a corresponding fence \?.