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.

The normalization is performed as follows.

The empty hard expressions and empty delimited paths omitted in bindings, searches, and matches are restored.

     S :: He            => S :: He ,
     S' $iter S''       => S' $iter S'' :: ,
     S' $iter S'' :: He => S' $iter S'' :: He ,
     S' $iter S'' R     => S' $iter S'' :: R
     S : P              => S : P ,
     # S                => # S ,

The empty delimited paths omitted in sentences are restored.

     P  =>  P ,

The "opaque" curly brackets { appearing in alternatives and alternative matches are replaced with the "transparent" curly brackets \{.

     {Snt1; ... Sntn;}   =>
          \{Snt1; ... Sntn;
                    $error(Fname "Unexpected fail");}

     S : {Snt1; ... Sntn;}   =>
          S : \{Snt1; ... Sntn;
                    e $error(Fname "Unexpected fail");}

where Fname is the name of the function in which the construct appears.

The "opaque" curly brackets { appearing in function definitions are replaced with the "transparent" curly brackets \{.

     Fname {Snt1; ... Sntn;}  =>
          Fname \{Snt1; ... Sntn;
                    Farg $error(Fname "Unexpected fail");}

where Farg is the input format provided by the declaration of the function Fname (the variable indices in function declarations are supposed to be omitted).

The function bodies consisting of a sentence are replaced with the corresponding pattern alternatives:
     Fname Snt;  =>  Fname \{ Snt; };