Next: , Previous: ProcDenot, Up: Procedures


4.2 Relating operator and indication

ProcOperN(`op',`parm',`res',`ind') and ProcOper1(`op',`parm',`res',`ind') are context-dependent computations used in the lower context of a procedure denotation. They places the operator implemented by the procedure into the database for type analysis in expressions, linking that operator to a specified operator indication and establishing the post-condition `op'.GotOper:

`op'
A grammar symbol inheriting the ProcedureDenotation role.
`parm'
For ProcOperN, a grammar symbol inheriting the ParameterListRoot role; for ProcOper1, a grammar symbol such that `parm'.Type is the type of the single parameter. The value of `parm'.Type must be a definition table key representing either a type or a type identifier.
`res'
The definition table key of the procedure's result type.
`ind'
The definition table key of the operator indication that will identify this operator.

The `op' and `parm' operands of ProcOperN may be the same symbol.

The bindings for the `op', `parm', and `res' operands of ProcOperN and ProcOper1 are obvious, but the binding for the `ind' operand depends strongly on the characteristics of the source language. There are three common patterns:

In the first case, the type's definition table key can be used to represent the operator indication. Obtaining that definition table key, however, requires taking account of the representation of user-defined types. We therefore defer examples to the discussion of that feature (see User-Defined Types).

If the procedure is bound to an identifier, that identifier's definition table key can be used to represent the operator indication. It therefore becomes the `ind' operand of ProcOperN or ProcOper1. Similarly, if the procedure is bound to a language-defined operator indication, then that indication becomes the `ind' operand.