@eagleoutice/flowr - v2.15.8
    Preparing search index...

    Variable FunctionSemanticsConst

    FunctionSemantics: {
        argumentRoles: (
            this: void,
            ids: Iterable<NodeId>,
            graph: DataflowGraph,
            options?: ArgumentRolesOptions,
        ) => Record<NodeId, FunctionArgumentRoles>;
        call: {
            argument: {
                mask: (names: readonly (...)[]) => number;
                names: Readonly<Record<(...), (...)>>;
                words: (props: (...) | (...)) => (...)[];
            };
            deferred: {
                forcedAt(
                    this: void,
                    graph: DataflowGraph,
                    binding: NodeId,
                    cfg: ControlFlowGraph,
                ): readonly NodeId[];
                indexOf<Info>(
                    this: void,
                    graph: DataflowGraph,
                    idMap: AstIdMap<(...) & (...)>,
                ): NameIndex;
                link<Info>(
                    this: void,
                    graph: DataflowGraph,
                    expr: NodeId,
                    index: NameIndex,
                    idMap: AstIdMap<(...) & (...)>,
                    forces?: ForceSites,
                ): void;
                publish<Info>(
                    this: void,
                    graph: DataflowGraph,
                    expr: NodeId,
                    index: NameIndex,
                    idMap: AstIdMap<(...) & (...)>,
                    at: NodeId,
                    cfg?: ControlFlowGraph<(...)>,
                ): void;
            };
            match: {
                findWithProps(
                    this: void,
                    args: readonly FunctionArgument[],
                    signature: FnSig,
                    props: number,
                ): NodeId[];
                formalsOf: <Info>(
                    this: void,
                    call: RFunctionCall<(...)>,
                    graph: DataflowGraph,
                    ctx: ReadOnlyFlowrAnalyzerContext,
                ) => (...) | (...);
                onCallAndLink(
                    this: void,
                    args: readonly FunctionArgument[],
                    params: readonly RParameter<(...)>[],
                    graph: DataflowGraph,
                ): Map<NodeId, NodeId>;
                toDefinition<Info>(
                    this: void,
                    call: RFunctionCall<(...) & (...)>,
                    graph: DataflowGraph,
                    ctx: ReadOnlyFlowrAnalyzerContext,
                ): ReadonlyMap<(...), (...)> | undefined;
                toNames<Info = object>(
                    this: void,
                    args: readonly PotentiallyEmptyRArgument<(...)>[],
                    paramNames: readonly string[],
                ): ReadonlyMap<string, RArgument<(...)>>;
                toSpec<Targets extends NodeId = string>(
                    this: void,
                    args: readonly FunctionArgument[],
                    params: Record<(...), (...)> | readonly (...)[],
                ): Map<Targets, (...)[]>;
            };
            nse: {
                dropResolvedMask(
                    this: void,
                    graph: DataflowGraph,
                    id: NodeId,
                    name: Identifier,
                ): MaskingCall | undefined;
                isUnquote<Info>(this: void, node: RNode<Info>, style: Unquote): boolean;
                linkMasksToData(
                    this: void,
                    graph: DataflowGraph,
                    calls: readonly MaskingCall[],
                ): void;
                maskCandidate(
                    this: void,
                    vertex: DataflowGraphVertexInfo | undefined,
                ): boolean;
                maskedName(this: void, graph: DataflowGraph, id: NodeId): boolean;
                suppliedByMask(
                    this: void,
                    graph: DataflowGraph,
                    id: NodeId,
                    vertex?: DataflowGraphVertexInfo | undefined,
                ): boolean;
                unmark(
                    this: void,
                    graph: DataflowGraph,
                    id: NodeId,
                    which?: (target: NodeId) => boolean,
                ): NodeId[];
                unquoted<Info extends ParentInformation>(
                    this: void,
                    root: RNode<(...)> | undefined,
                    style: Unquote,
                ): ReadonlySet<(...)> | undefined;
            };
            props: {
                filter(
                    this: void,
                    stated: StatedProps | undefined,
                    selector: PropSelector,
                ): StatedProps;
                hasAll(
                    this: void,
                    stated: StatedProps | undefined,
                    selector: PropSelector,
                ): boolean;
                hasAny(
                    this: void,
                    stated: StatedProps | undefined,
                    selector?: PropSelector,
                ): boolean;
                isCallProp: (this: void, selector: PropSelector) => selector is number;
                isEmptyMask(this: void, mask: PropMask): boolean;
                isSemanticTag: (
                    this: void,
                    selector: PropSelector,
                ) => selector is SemanticCallTag;
                join(
                    this: void,
                    props1: StatedProps | undefined,
                    props2: StatedProps | undefined,
                ): StatedProps;
                key(this: void, selector: PropSelector): string;
                labels(this: void, stated: StatedProps | undefined): string[];
                mask(this: void, names: readonly string[]): PropMask;
                names(this: void, selector: PropSelector): string[];
                words(this: void, props: number | undefined): string[];
            };
            quoted: {
                capturedBy(
                    this: void,
                    graph: DataflowGraph,
                    id: NodeId,
                ): readonly NodeId[];
                evaluateIn: <Info>(
                    this: void,
                    graph: DataflowGraph,
                    expr: NodeId,
                    environment: REnvironmentInformation,
                    idMap: AstIdMap<(...)>,
                ) => readonly (...)[];
                finalize<Info>(
                    this: void,
                    graph: DataflowGraph,
                    idMap: AstIdMap<(...) & (...)>,
                    controlFlow: () => (...) | (...),
                ): void;
                sourcesOf(
                    this: void,
                    graph: DataflowGraph,
                    id: NodeId,
                ): readonly CapturedExpression[];
            };
            signature: {
                every: FnSig;
                forced: (this: void, sig: (...) | (...), count: number) => (...) | (...);
                layout: (this: void, sig: FnSig) => SigLayout;
                only: (this: void, index: number, name: string) => FnSig;
                posWith: (
                    this: void,
                    layout: SigLayout,
                    count: number,
                    prop: number,
                ) => (...)[];
                propAt: (
                    this: void,
                    __namedParameters: SigLayout,
                    index: number,
                ) => number;
            };
            unsupported: {
                isUnsupportedCall(
                    this: void,
                    vertex: DataflowGraphVertexArgument | undefined,
                    dfg: DataflowGraph,
                ): boolean;
            };
        };
        classes: {
            argFor: <Info>(
                args: readonly PotentiallyEmptyRArgument<(...)>[],
                ref: ClassArgRef | undefined,
            ) => RNode<(...)> | undefined;
            declared: (graph: DataflowGraph) => Map<string, DeclaredClass>;
            isDeclaring(
                this: void,
                vertex: DataflowGraphVertexInfo | undefined,
            ): boolean;
            of: <Info>(
                config: ClassDeclarationConfig,
                args: readonly PotentiallyEmptyRArgument<(...)>[],
            ) => ClassDeclaration;
            superOf: (
                name: string,
                classes: ReadonlyMap<string, ClassDeclaration>,
            ) => string[];
            toSig: (
                classes: ReadonlyMap<string, DeclaredClass>,
                ownerOf?: (name: ...) => ...,
            ) => SigClassInfo[];
        };
        exceptions: (
            this: void,
            id: NodeId,
            graph: CallGraph,
            __namedParameters?: FunctionExceptionsOptions,
        ) => ExceptionsByFunction;
        frameReflection: (
            this: void,
            definition: DataflowGraphVertexFunctionDefinition,
            graph: DataflowGraph,
            __namedParameters: FrameReflectionOptions,
        ) => number;
        isHigherOrder: (
            this: void,
            id: NodeId,
            graph: DataflowGraph,
            __namedParameters: HigherOrderFunctionsOptions,
        ) => boolean;
        name: "FunctionSemantics";
        props: (
            this: void,
            definitions: readonly NodeId[],
            graph: DataflowGraph,
            options?: FunctionPropsOptions,
        ) => InferredFunctions;
        strictness: (
            this: void,
            ids: Iterable<NodeId>,
            graph: DataflowGraph,
            __namedParameters?: FunctionStrictnessesOptions,
        ) => Record<NodeId, FunctionStrictness>;
    } = ...

    The one helper to ask what a function does: what it makes of its arguments, what it may raise, which formals it forces, and what it declares as a class. It replaces the seven single-purpose helper objects that used to sit one per file under src/dataflow/fn/.

    Type Declaration

    • ReadonlyargumentRoles: (
          this: void,
          ids: Iterable<NodeId>,
          graph: DataflowGraph,
          options?: ArgumentRolesOptions,
      ) => Record<NodeId, FunctionArgumentRoles>

      The roles of several definitions' formals, sharing the built-in lookups.

    • Readonlycall: {
          argument: {
              mask: (names: readonly (...)[]) => number;
              names: Readonly<Record<(...), (...)>>;
              words: (props: (...) | (...)) => (...)[];
          };
          deferred: {
              forcedAt(
                  this: void,
                  graph: DataflowGraph,
                  binding: NodeId,
                  cfg: ControlFlowGraph,
              ): readonly NodeId[];
              indexOf<Info>(
                  this: void,
                  graph: DataflowGraph,
                  idMap: AstIdMap<(...) & (...)>,
              ): NameIndex;
              link<Info>(
                  this: void,
                  graph: DataflowGraph,
                  expr: NodeId,
                  index: NameIndex,
                  idMap: AstIdMap<(...) & (...)>,
                  forces?: ForceSites,
              ): void;
              publish<Info>(
                  this: void,
                  graph: DataflowGraph,
                  expr: NodeId,
                  index: NameIndex,
                  idMap: AstIdMap<(...) & (...)>,
                  at: NodeId,
                  cfg?: ControlFlowGraph<(...)>,
              ): void;
          };
          match: {
              findWithProps(
                  this: void,
                  args: readonly FunctionArgument[],
                  signature: FnSig,
                  props: number,
              ): NodeId[];
              formalsOf: <Info>(
                  this: void,
                  call: RFunctionCall<(...)>,
                  graph: DataflowGraph,
                  ctx: ReadOnlyFlowrAnalyzerContext,
              ) => (...) | (...);
              onCallAndLink(
                  this: void,
                  args: readonly FunctionArgument[],
                  params: readonly RParameter<(...)>[],
                  graph: DataflowGraph,
              ): Map<NodeId, NodeId>;
              toDefinition<Info>(
                  this: void,
                  call: RFunctionCall<(...) & (...)>,
                  graph: DataflowGraph,
                  ctx: ReadOnlyFlowrAnalyzerContext,
              ): ReadonlyMap<(...), (...)> | undefined;
              toNames<Info = object>(
                  this: void,
                  args: readonly PotentiallyEmptyRArgument<(...)>[],
                  paramNames: readonly string[],
              ): ReadonlyMap<string, RArgument<(...)>>;
              toSpec<Targets extends NodeId = string>(
                  this: void,
                  args: readonly FunctionArgument[],
                  params: Record<(...), (...)> | readonly (...)[],
              ): Map<Targets, (...)[]>;
          };
          nse: {
              dropResolvedMask(
                  this: void,
                  graph: DataflowGraph,
                  id: NodeId,
                  name: Identifier,
              ): MaskingCall | undefined;
              isUnquote<Info>(this: void, node: RNode<Info>, style: Unquote): boolean;
              linkMasksToData(
                  this: void,
                  graph: DataflowGraph,
                  calls: readonly MaskingCall[],
              ): void;
              maskCandidate(
                  this: void,
                  vertex: DataflowGraphVertexInfo | undefined,
              ): boolean;
              maskedName(this: void, graph: DataflowGraph, id: NodeId): boolean;
              suppliedByMask(
                  this: void,
                  graph: DataflowGraph,
                  id: NodeId,
                  vertex?: DataflowGraphVertexInfo | undefined,
              ): boolean;
              unmark(
                  this: void,
                  graph: DataflowGraph,
                  id: NodeId,
                  which?: (target: NodeId) => boolean,
              ): NodeId[];
              unquoted<Info extends ParentInformation>(
                  this: void,
                  root: RNode<(...)> | undefined,
                  style: Unquote,
              ): ReadonlySet<(...)> | undefined;
          };
          props: {
              filter(
                  this: void,
                  stated: StatedProps | undefined,
                  selector: PropSelector,
              ): StatedProps;
              hasAll(
                  this: void,
                  stated: StatedProps | undefined,
                  selector: PropSelector,
              ): boolean;
              hasAny(
                  this: void,
                  stated: StatedProps | undefined,
                  selector?: PropSelector,
              ): boolean;
              isCallProp: (this: void, selector: PropSelector) => selector is number;
              isEmptyMask(this: void, mask: PropMask): boolean;
              isSemanticTag: (
                  this: void,
                  selector: PropSelector,
              ) => selector is SemanticCallTag;
              join(
                  this: void,
                  props1: StatedProps | undefined,
                  props2: StatedProps | undefined,
              ): StatedProps;
              key(this: void, selector: PropSelector): string;
              labels(this: void, stated: StatedProps | undefined): string[];
              mask(this: void, names: readonly string[]): PropMask;
              names(this: void, selector: PropSelector): string[];
              words(this: void, props: number | undefined): string[];
          };
          quoted: {
              capturedBy(
                  this: void,
                  graph: DataflowGraph,
                  id: NodeId,
              ): readonly NodeId[];
              evaluateIn: <Info>(
                  this: void,
                  graph: DataflowGraph,
                  expr: NodeId,
                  environment: REnvironmentInformation,
                  idMap: AstIdMap<(...)>,
              ) => readonly (...)[];
              finalize<Info>(
                  this: void,
                  graph: DataflowGraph,
                  idMap: AstIdMap<(...) & (...)>,
                  controlFlow: () => (...) | (...),
              ): void;
              sourcesOf(
                  this: void,
                  graph: DataflowGraph,
                  id: NodeId,
              ): readonly CapturedExpression[];
          };
          signature: {
              every: FnSig;
              forced: (this: void, sig: (...) | (...), count: number) => (...) | (...);
              layout: (this: void, sig: FnSig) => SigLayout;
              only: (this: void, index: number, name: string) => FnSig;
              posWith: (
                  this: void,
                  layout: SigLayout,
                  count: number,
                  prop: number,
              ) => (...)[];
              propAt: (
                  this: void,
                  __namedParameters: SigLayout,
                  index: number,
              ) => number;
          };
          unsupported: {
              isUnsupportedCall(
                  this: void,
                  vertex: DataflowGraphVertexArgument | undefined,
                  dfg: DataflowGraph,
              ): boolean;
          };
      }

      What one call of a function means: what flowR states about it, how R binds its arguments, and which of them it does not simply evaluate.

    • Readonlyclasses: {
          argFor: <Info>(
              args: readonly PotentiallyEmptyRArgument<(...)>[],
              ref: ClassArgRef | undefined,
          ) => RNode<(...)> | undefined;
          declared: (graph: DataflowGraph) => Map<string, DeclaredClass>;
          isDeclaring(
              this: void,
              vertex: DataflowGraphVertexInfo | undefined,
          ): boolean;
          of: <Info>(
              config: ClassDeclarationConfig,
              args: readonly PotentiallyEmptyRArgument<(...)>[],
          ) => ClassDeclaration;
          superOf: (
              name: string,
              classes: ReadonlyMap<string, ClassDeclaration>,
          ) => string[];
          toSig: (
              classes: ReadonlyMap<string, DeclaredClass>,
              ownerOf?: (name: ...) => ...,
          ) => SigClassInfo[];
      }

      What the project declares as a class, and how those relate.

    • Readonlyexceptions: (
          this: void,
          id: NodeId,
          graph: CallGraph,
          __namedParameters?: FunctionExceptionsOptions,
      ) => ExceptionsByFunction

      The exceptions a definition may raise.

    • ReadonlyframeReflection: (
          this: void,
          definition: DataflowGraphVertexFunctionDefinition,
          graph: DataflowGraph,
          __namedParameters: FrameReflectionOptions,
      ) => number

      The reflective argument bits of one definition.

    • ReadonlyisHigherOrder: (
          this: void,
          id: NodeId,
          graph: DataflowGraph,
          __namedParameters: HigherOrderFunctionsOptions,
      ) => boolean

      Whether one definition is higher-order, i.e. whether it calls what it is handed.

    • Readonlyname: "FunctionSemantics"
    • Readonlyprops: (
          this: void,
          definitions: readonly NodeId[],
          graph: DataflowGraph,
          options?: FunctionPropsOptions,
      ) => InferredFunctions

      What several definitions and their formals do.

    • Readonlystrictness: (
          this: void,
          ids: Iterable<NodeId>,
          graph: DataflowGraph,
          __namedParameters?: FunctionStrictnessesOptions,
      ) => Record<NodeId, FunctionStrictness>

      The strictness of several definitions, sharing the work between them.

    FunctionSemantics.props(definitions, graph);            // what the definitions do with what they get
    FunctionSemantics.exceptions(definition, callGraph); // what they may raise
    FunctionSemantics.strictness(definitions, graph); // which formals they force
    FunctionSemantics.isHigherOrder(definition, graph); // whether they call what they are handed
    FunctionSemantics.argumentRoles(definitions, graph); // what each formal is used as
    FunctionSemantics.classes.declared(graph); // the classes the project declares
    FunctionSemantics.call.props.hasAny(stated, CallProp.Scope); // what flowR states one call does
    FunctionSemantics.call.match(call, formals); // how R binds its arguments