@eagleoutice/flowr
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
73 lines (72 loc) • 5.04 kB
TypeScript
import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format';
import type { DataflowGraph } from '../../../dataflow/graph/graph';
import { executeDataflowQuery } from './dataflow-query-executor';
import Joi from 'joi';
/**
* Simple re-returns the dataflow graph of the analysis.
*/
export interface DataflowQuery extends BaseQueryFormat {
readonly type: 'dataflow';
}
export interface DataflowQueryResult extends BaseQueryResult {
/** Please be aware that this is the graph in its JSON representation, use {@link DataflowGraph#fromJson} if the result is serialized */
readonly graph: DataflowGraph;
}
export declare const DataflowQueryDefinition: {
readonly executor: typeof executeDataflowQuery;
readonly asciiSummarizer: (formatter: import("../../../util/ansi").OutputFormatter, _processed: import("../../../core/steps/pipeline/pipeline").PipelineOutput<import("../../../core/steps/pipeline/pipeline").Pipeline<{
readonly name: "parse";
readonly humanReadableName: "parse with R shell";
readonly description: "Parse the given R code into an AST";
readonly processor: (_results: unknown, input: Partial<import("../../../r-bridge/parser").ParseRequiredInput<string>>) => Promise<import("../../../r-bridge/parser").ParseStepOutput<string>>;
readonly executed: import("../../../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
readonly printer: {
readonly 0: typeof import("../../../core/print/print").internalPrinter;
readonly 2: {
(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
};
readonly 5: ({ parsed }: import("../../../r-bridge/parser").ParseStepOutput<string>, config: import("../../../util/quads").QuadSerializationConfiguration) => string;
};
readonly dependencies: readonly [];
readonly requiredInput: import("../../../r-bridge/parser").ParseRequiredInput<string>;
} | {
readonly name: "normalize";
readonly humanReadableName: "normalize";
readonly description: "Normalize the AST to flowR's AST";
readonly processor: (results: {
parse?: import("../../../r-bridge/parser").ParseStepOutput<string>;
}, input: Partial<import("../../../core/steps/all/core/10-normalize").NormalizeRequiredInput>) => import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst<import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation, import("../../../r-bridge/lang-4.x/ast/model/model").RNode<import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").ParentInformation>>;
readonly executed: import("../../../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
readonly printer: {
readonly 0: typeof import("../../../core/print/print").internalPrinter;
readonly 2: typeof import("../../../core/print/normalize-printer").normalizedAstToJson;
readonly 5: typeof import("../../../core/print/normalize-printer").normalizedAstToQuads;
readonly 3: typeof import("../../../core/print/normalize-printer").printNormalizedAstToMermaid;
readonly 4: typeof import("../../../core/print/normalize-printer").printNormalizedAstToMermaidUrl;
};
readonly dependencies: readonly ["parse"];
readonly requiredInput: import("../../../core/steps/all/core/10-normalize").NormalizeRequiredInput;
} | {
readonly humanReadableName: "dataflow";
readonly processor: (results: {
normalize?: import("../../../r-bridge/lang-4.x/ast/model/processing/decorate").NormalizedAst;
}, input: {
request?: import("../../../r-bridge/retriever").RParseRequests;
parser?: import("../../../r-bridge/parser").Parser<import("../../../r-bridge/parser").KnownParserType>;
}) => import("../../../dataflow/info").DataflowInformation;
readonly requiredInput: {};
readonly name: "dataflow";
readonly description: "Construct the dataflow graph";
readonly executed: import("../../../core/steps/pipeline-step").PipelineStepStage.OncePerFile;
readonly printer: {
readonly 0: typeof import("../../../core/print/print").internalPrinter;
readonly 2: typeof import("../../../core/print/dataflow-printer").dataflowGraphToJson;
readonly 5: typeof import("../../../core/print/dataflow-printer").dataflowGraphToQuads;
readonly 3: typeof import("../../../core/print/dataflow-printer").dataflowGraphToMermaid;
readonly 4: typeof import("../../../core/print/dataflow-printer").dataflowGraphToMermaidUrl;
};
readonly dependencies: readonly ["normalize"];
}>>, queryResults: BaseQueryResult, result: string[]) => true;
readonly schema: Joi.ObjectSchema<any>;
};