UNPKG

@eagleoutice/flowr-dev

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

32 lines (31 loc) 1.82 kB
import type { BaseQueryFormat, BaseQueryResult } from '../../base-query-format'; import { executeCallGraphQuery } from './call-graph-query-executor'; import Joi from 'joi'; import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id'; import { CallGraph } from '../../../dataflow/graph/call-graph'; /** * Computes the Call Graph of the analyzed project. */ export interface CallGraphQuery extends BaseQueryFormat { readonly type: 'call-graph'; /** * If set, expand library/built-in leaf calls into their internal callees using the signature database's * `transitiveCallees` (a no-op if no signature database is loaded). Default false. */ readonly expandLibraryInternals?: boolean; /** If set, also report the calls top-level execution never reaches. Default false. */ readonly reportUnreachable?: boolean; } export interface CallGraphQueryResult 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: CallGraph; /** the calls no top-level execution reaches, only present if {@link CallGraphQuery#reportUnreachable} was set */ readonly unreachable?: readonly NodeId[]; } export declare const CallGraphQueryDefinition: { readonly title: "Call-Graph Query"; readonly executor: typeof executeCallGraphQuery; readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true; readonly schema: Joi.ObjectSchema<any>; readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[]; };