Answer for a successful FileAnalysisRequestMessage. It contains the results of the analysis in JSON format (guided by FileAnalysisRequestMessage#format).

The idMap of the normalization step (see NormalizedAst) is not serialized as it would essentially repeat the complete normalized AST, you have to re-create it yourself if you require it.

The serialization of maps and sets is controlled by the jsonReplacer as part of sendMessage.

FileAnalysisResponseMessageNQuads

interface FileAnalysisResponseMessageJson {
    cfg?: ControlFlowInformation;
    format: "json";
    id: undefined | string;
    results: PipelineOutput<Pipeline<
        | {
            dependencies: readonly [];
            description: "Parse the given R code into an AST";
            executed: OncePerFile;
            humanReadableName: "parse with R shell";
            name: "parse";
            printer: {
                0: (<Input>(input: Input) => Input);
                2: {
                    (value: any, replacer?: ((this: any, key: string, value: any) => any), space?: string | number): string;
                    (value: any, replacer?: null | (string | number)[], space?: string | number): string;
                };
                5: ((__namedParameters: ParseStepOutput, config: QuadSerializationConfiguration) => string);
            };
            processor: ((_results: unknown, input: Partial<ParseRequiredInput>) => Promise<ParseStepOutput>);
            requiredInput: ParseRequiredInput;
        }
        | {
            dependencies: readonly ["parse"];
            description: "Normalize the AST to flowR's AST";
            executed: OncePerFile;
            humanReadableName: "normalize";
            name: "normalize";
            printer: {
                0: (<Input>(input: Input) => Input);
                2: ((ast: NormalizedAst<ParentInformation, RNode<ParentInformation>>) => string);
                3: ((ast: NormalizedAst<ParentInformation, RNode<ParentInformation>>) => string);
                4: ((ast: NormalizedAst<ParentInformation, RNode<ParentInformation>>) => string);
                5: ((ast: NormalizedAst<ParentInformation, RNode<ParentInformation>>, config: QuadSerializationConfiguration) => string);
            };
            processor: ((results: {
                parse?: ParseStepOutput;
            }, input: Partial<NormalizeRequiredInput>) => NormalizedAst<ParentInformation, RNode<ParentInformation>>);
            requiredInput: NormalizeRequiredInput;
        }
        | {
            dependencies: readonly ["normalize"];
            description: "Construct the dataflow graph";
            executed: OncePerFile;
            humanReadableName: "dataflow";
            name: "dataflow";
            printer: {
                0: (<Input>(input: Input) => Input);
                2: ((df: DataflowInformation) => string);
                3: ((df: DataflowInformation) => string);
                4: ((df: DataflowInformation) => string);
                5: ((df: DataflowInformation, config: QuadSerializationConfiguration) => string);
            };
            processor: ((results: {
                normalize?: NormalizedAst<ParentInformation, RNode<ParentInformation>>;
            }, input: {
                request?: RParseRequests;
            }) => DataflowInformation);
            requiredInput: {};
        }
        | {
            dependencies: readonly ["dataflow"];
            description: "Calculate the actual static slice from the dataflow graph and the given slicing criteria";
            executed: OncePerRequest;
            humanReadableName: "static slice";
            name: "slice";
            printer: {
                0: (<Input>(input: Input) => Input);
            };
            processor: ((results: {
                dataflow?: DataflowInformation;
                normalize?: NormalizedAst<ParentInformation, RNode<ParentInformation>>;
            }, input: Partial<SliceRequiredInput>) => Readonly<SliceResult>);
            requiredInput: SliceRequiredInput;
        }
        | {
            dependencies: readonly ["slice"];
            description: "Reconstruct R code from the static slice";
            executed: OncePerRequest;
            humanReadableName: "static code reconstruction";
            name: "reconstruct";
            printer: {
                0: (<Input>(input: Input) => Input);
            };
            processor: ((results: {
                normalize?: NormalizedAst<ParentInformation, RNode<ParentInformation>>;
                slice?: SliceResult;
            }, input: Partial<ReconstructRequiredInput>) => ReconstructionResult);
            requiredInput: ReconstructRequiredInput;
        }>>;
    type: "response-file-analysis";
}

Hierarchy (view full)

Hierarchy-Diagram

UML class diagram of FileAnalysisResponseMessageJson

Properties

Only if the FileAnalysisRequestMessage contained a cfg: true this will contain the ControlFlowInformation of the file.

format: "json"
id: undefined | string

The id that links a request with its responses, it is up to the calling client to make sure it is unique. However, the client does not have to pass the id if it does not need to link the request with its response. The id is always undefined if the message is unprompted (e.g., with hello) or the id unknown.

results: PipelineOutput<Pipeline<
    | {
        dependencies: readonly [];
        description: "Parse the given R code into an AST";
        executed: OncePerFile;
        humanReadableName: "parse with R shell";
        name: "parse";
        printer: {
            0: (<Input>(input: Input) => Input);
            2: {
                (value: any, replacer?: ((this: any, key: string, value: any) => any), space?: string | number): string;
                (value: any, replacer?: null | (string | number)[], space?: string | number): string;
            };
            5: ((__namedParameters: ParseStepOutput, config: QuadSerializationConfiguration) => string);
        };
        processor: ((_results: unknown, input: Partial<ParseRequiredInput>) => Promise<ParseStepOutput>);
        requiredInput: ParseRequiredInput;
    }
    | {
        dependencies: readonly ["parse"];
        description: "Normalize the AST to flowR's AST";
        executed: OncePerFile;
        humanReadableName: "normalize";
        name: "normalize";
        printer: {
            0: (<Input>(input: Input) => Input);
            2: ((ast: NormalizedAst<ParentInformation, RNode<ParentInformation>>) => string);
            3: ((ast: NormalizedAst<ParentInformation, RNode<ParentInformation>>) => string);
            4: ((ast: NormalizedAst<ParentInformation, RNode<ParentInformation>>) => string);
            5: ((ast: NormalizedAst<ParentInformation, RNode<ParentInformation>>, config: QuadSerializationConfiguration) => string);
        };
        processor: ((results: {
            parse?: ParseStepOutput;
        }, input: Partial<NormalizeRequiredInput>) => NormalizedAst<ParentInformation, RNode<ParentInformation>>);
        requiredInput: NormalizeRequiredInput;
    }
    | {
        dependencies: readonly ["normalize"];
        description: "Construct the dataflow graph";
        executed: OncePerFile;
        humanReadableName: "dataflow";
        name: "dataflow";
        printer: {
            0: (<Input>(input: Input) => Input);
            2: ((df: DataflowInformation) => string);
            3: ((df: DataflowInformation) => string);
            4: ((df: DataflowInformation) => string);
            5: ((df: DataflowInformation, config: QuadSerializationConfiguration) => string);
        };
        processor: ((results: {
            normalize?: NormalizedAst<ParentInformation, RNode<ParentInformation>>;
        }, input: {
            request?: RParseRequests;
        }) => DataflowInformation);
        requiredInput: {};
    }
    | {
        dependencies: readonly ["dataflow"];
        description: "Calculate the actual static slice from the dataflow graph and the given slicing criteria";
        executed: OncePerRequest;
        humanReadableName: "static slice";
        name: "slice";
        printer: {
            0: (<Input>(input: Input) => Input);
        };
        processor: ((results: {
            dataflow?: DataflowInformation;
            normalize?: NormalizedAst<ParentInformation, RNode<ParentInformation>>;
        }, input: Partial<SliceRequiredInput>) => Readonly<SliceResult>);
        requiredInput: SliceRequiredInput;
    }
    | {
        dependencies: readonly ["slice"];
        description: "Reconstruct R code from the static slice";
        executed: OncePerRequest;
        humanReadableName: "static code reconstruction";
        name: "reconstruct";
        printer: {
            0: (<Input>(input: Input) => Input);
        };
        processor: ((results: {
            normalize?: NormalizedAst<ParentInformation, RNode<ParentInformation>>;
            slice?: SliceResult;
        }, input: Partial<ReconstructRequiredInput>) => ReconstructionResult);
        requiredInput: ReconstructRequiredInput;
    }>>

See the SteppingSlicer and StepResults for details on the results.

type: "response-file-analysis"

The at this time unknown type