@@ -277,7 +277,7 @@ \subsection{\valueTag{DeclSort::Parameter}}
277277 \DeclareMember {locus}{SourceLocation} \\
278278 \DeclareMember {type}{TypeIndex} \\
279279 \DeclareMember {constraint}{ExprIndex} \\
280- \DeclareMember {initializer}{ExprIndex } \\
280+ \DeclareMember {initializer}{DefaultArgIndex } \\
281281 \DeclareMember {level}{ParameterLevel} \\
282282 \DeclareMember {position}{ParameterPosition} \\
283283 \DeclareMember {sort}{ParameterSort} \\
@@ -319,6 +319,36 @@ \subsubsection{Parameter sort}
319319 };
320320\end {typedef }
321321
322+ \paragraph {The \field {sort} field is redundant. }
323+ Indeed, in a fully and strongly typed representation like the IFC (where every single expression has a type), the
324+ \field {sort} field of a \valueTag {DeclSort::Parameter} structure is redundant because it is a piece of
325+ information that can simply be recovered as follows:
326+ \begin {itemize }
327+ \item A \code {Template} template-parameter (or argument) has a \sortref {Forall }{TypeSort} type.
328+ \item A \code {Type} template-parameter (or argument) has a \sortref {Typename }{TypeBasis} type,
329+ or a refinement thereof.
330+ \item In function and lambda paremeter contexts, only \code {Object} can appear. Otherwise, in template
331+ parameter context, \code {NonType} has a reference or an object type.
332+ \end {itemize }
333+
334+ \subsubsection {Values for default argument }
335+ \label {sec:ifc-parameter-default-initializer }
336+
337+ The value for a possible default argument for a parameter (whether function parameter or a template parameter)
338+ is indicated by an expression (\sortref {NamedDecl }{ExprSort}) that references the declaration for a default
339+ argument (\sortref {DefaultArgument }{DeclSort}). An abstract reference to that specific expression
340+ pattern is of type \type {DefaultArgIndex} defined as
341+ %
342+ \begin {typedef }{DefaultArgIndex}{}
343+ enum class DefaultArgIndex : uint32_t { };
344+ \end {typedef }
345+ %
346+
347+ Valid values of this abstract reference starts at $ 1 $ .
348+ The value of that abstract reference (when not null) minus $ 1 $ is an index into the
349+ \sortref {NamedDecl }{ExprSort} partition.\ that references the default argument declaration.
350+
351+
322352\subsection {\valueTag {DeclSort::Field} }
323353\label {sec:ifc:DeclSort:Field }
324354
0 commit comments