UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

35 lines (34 loc) 2.06 kB
import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format'; import Joi from 'joi'; import type { ParsedQueryLine } from '../../query'; import { executeExceptionQuery } from './inspect-exception-query-executor'; import { 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 type { ExceptionPoint } from '../../../dataflow/fn/exceptions-of-function'; import type { SlicingCriterion } from '../../../slicing/criterion/parse'; /** * Either returns all function definitions alongside exception information, * or just those matching the filters. */ export interface InspectExceptionQuery extends BaseQueryFormat { readonly type: 'inspect-exception'; /** If given, only function definitions that match one of the given slicing criteria are considered. */ readonly filter?: SlicingCriterion[]; } export interface InspectExceptionQueryResult extends BaseQueryResult { /** * If a function throws exceptions, the Ids of the throwing functions (at least the functions flowr knows about). * An empty array means the function does not throw any exceptions. */ readonly exceptions: Record<NodeId, ExceptionPoint[]>; } declare function inspectExceptionLineParser(_output: ReplOutput, line: readonly string[], _config: FlowrConfig): ParsedQueryLine<'inspect-exception'>; export declare const InspectExceptionQueryDefinition: { readonly executor: typeof executeExceptionQuery; readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, processed: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>; readonly fromLine: typeof inspectExceptionLineParser; readonly schema: Joi.ObjectSchema<any>; readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[]; }; export {};