UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

36 lines (35 loc) 1.92 kB
import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format'; import type { SlicingCriterion } from '../../../slicing/criterion/parse'; import type { ParsedQueryLine } from '../../query'; import Joi from 'joi'; import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id'; import type { ReplOutput } from '../../../cli/repl/commands/repl-main'; import type { FlowrConfig } from '../../../config'; import { executeProvenanceQuery } from './provenance-query-executor'; /** Calculates the provenance starting from a given criterion */ export interface ProvenanceQuery extends BaseQueryFormat { readonly type: 'provenance'; /** The slicing criterion to use as a start*/ readonly criterion: SlicingCriterion; /** Whether to stop on fdef boundaries */ readonly restrictFdef?: boolean; } export interface ProvenanceQueryResult extends BaseQueryResult { /** * Maps the requested criteria to the returned ids */ results: Record<string, NodeId[]>; } /** * Checks whether the given argument represents a fdef boundary with an `f` suffix. */ export declare function fdefBoundaryParser(argument: string): boolean; declare function provenanceQueryLineParser(output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'provenance'>; export declare const ProvenanceQueryDefinition: { readonly executor: typeof executeProvenanceQuery; readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>; readonly fromLine: typeof provenanceQueryLineParser; readonly schema: Joi.ObjectSchema<any>; readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[]; }; export {};