UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

35 lines (34 loc) 1.74 kB
import type { IdMessageBase, MessageDefinition } from './all-messages'; import type { SlicingCriteria } from '../../../../slicing/criterion/parse'; import type { PipelineOutput } from '../../../../core/steps/pipeline/pipeline'; import type { DEFAULT_DATAFLOW_PIPELINE, DEFAULT_SLICING_PIPELINE } from '../../../../core/steps/pipeline/default-pipelines'; import { SliceDirection } from '../../../../util/slice-direction'; /** * Can only be sent after you have sent the {@link FileAnalysisRequestMessage}. * Using the same `filetoken` as in the {@link FileAnalysisRequestMessage} you * can slice the respective file given the respective criteria. */ export interface SliceRequestMessage extends IdMessageBase { type: 'request-slice'; /** The {@link FileAnalysisRequestMessage#filetoken} of the file/data to slice */ filetoken: string; /** The slicing criteria to use */ criterion: SlicingCriteria; /** The direction to slice in. Defaults to backward slicing if unset. */ direction?: SliceDirection; /** * Should the magic comments (force-including lines within the slice) be ignored? */ noMagicComments?: boolean; } export declare const requestSliceMessage: MessageDefinition<SliceRequestMessage>; /** * Similar to {@link FileAnalysisResponseMessage} this only contains the results of * the slice steps. */ export interface SliceResponseMessage extends IdMessageBase { type: 'response-slice'; /** only contains the results of the slice steps to not repeat ourselves */ results: Omit<PipelineOutput<typeof DEFAULT_SLICING_PIPELINE>, keyof PipelineOutput<typeof DEFAULT_DATAFLOW_PIPELINE>>; } export declare const responseSliceMessage: MessageDefinition<SliceResponseMessage>;