amendConfig( config: FlowrConfigOptions, amendmentFunc: ( config: { abstractInterpretation: { dataFrame: { maxColNames: number; readLoadedData: { maxReadLines: number; readExternalFiles: boolean }; }; wideningThreshold: number; }; defaultEngine?: "r-shell" | "tree-sitter"; engines: (
| { rPath?: string; type: "r-shell"; [key: string]: unknown } | { lax?: boolean; treeSitterWasmPath?: string; type: "tree-sitter"; wasmPath?: string; [key: string]: unknown; } )
[]; ignoreSourceCalls: boolean; project: { resolveUnknownPathsOnDisk: boolean }; repl: { dfProcessorHeat: boolean; quickStats: boolean }; semantics: { environment: { overwriteBuiltIns: { definitions: (
| { assumePrimitive?: boolean; names: (
BrandedIdentifier | [id
: ...
, namespace
: ...
, internal
?: ...
] )
[]; type: "constant"; value: unknown; } | { assumePrimitive?: boolean; config: { libFn?: boolean; readIndices: boolean }; names: (
BrandedIdentifier | [id
: ...
, namespace
: ...
, internal
?: ...
] )
[]; suffixes: (
"<-" | "<<-")
[]; type: "replacement"; } | { assumePrimitive?: boolean; config?: | { forceFollow?: (...)
| (...)
| (...)
; includeFunctionCall?: (...)
| (...)
| (...)
; libFn?: (...)
| (...)
| (...)
; } | { forceArgs?: (...)
| (...)
| (...)
; libFn?: (...)
| (...)
| (...)
; treatIndicesAsString: boolean; } | { indexOfFunction?: (...)
| (...)
; libFn?: (...)
| (...)
| (...)
; nameOfFunctionArgument?: (...)
| (...)
; resolveInEnvironment?: (...)
| (...)
| (...)
; resolveValue?: (...)
| (...)
| (...)
; unquoteFunction?: (...)
| (...)
| (...)
; [key: string]: unknown; } | { canBeReplacement?: (...)
| (...)
| (...)
; forceArgs?: (...)
| (...)
| (...)
; libFn?: (...)
| (...)
| (...)
; makeMaybe?: (...)
| (...)
| (...)
; mayHaveMoreArgs?: (...)
| (...)
| (...)
; quoteSource?: (...)
| (...)
| (...)
; superAssignment?: (...)
| (...)
| (...)
; swapSourceAndTarget?: (...)
| (...)
| (...)
; targetVariable?: (...)
| (...)
| (...)
; } | { canBeReplacement?: (...)
| (...)
| (...)
; forceArgs?: (...)
| (...)
| (...)
; libFn?: (...)
| (...)
| (...)
; makeMaybe?: (...)
| (...)
| (...)
; mayHaveMoreArgs?: (...)
| (...)
| (...)
; quoteSource?: (...)
| (...)
| (...)
; source: { idx?: ...
; name: ...
}; superAssignment?: (...)
| (...)
| (...)
; swapSourceAndTarget?: (...)
| (...)
| (...)
; target: { idx?: ...
; name: ...
}; targetVariable?: (...)
| (...)
| (...)
; } | { cfg?: (...)
| (...)
; forceArgs?: (...)
| (...)
| (...)
; hasUnknownSideEffects?: (...)
| (...)
| (...)
| (...)
| (...)
; libFn?: (...)
| (...)
| (...)
; readAllArguments?: (...)
| (...)
| (...)
; returnsNthArgument?: (...)
| (...)
| (...)
; treatAsFnCall?: (...)
| (...)
; useAsProcessor?: (...)
| (...)
; } | { includeFunctionCall?: (...)
| (...)
| (...)
; libFn?: (...)
| (...)
| (...)
; } | { args?: (...)
| (...)
; libFn?: (...)
| (...)
| (...)
} | { args: { env: ...
; expr: ...
}; libFn?: (...)
| (...)
| (...)
} | { forceArgs?: (...)
| (...)
| (...)
; libFn?: (...)
| (...)
| (...)
; quoteArgumentsWithIndex?: (...)
| (...)
; } | { args: { add?: ...
; after?: ...
; expr: ...
}; hook: OnFnExit; libFn?: (...)
| (...)
| (...)
; } | { assignmentOperator?: (...)
| (...)
| (...)
; assignRootId?: (...)
| (...)
; forceArgs?: (...)
| (...)
| (...)
; libFn?: (...)
| (...)
| (...)
; makeMaybe?: (...)
| (...)
| (...)
; readIndices?: (...)
| (...)
| (...)
; } | { args: { generic: ...
; object: ...
}; libFn?: (...)
| (...)
| (...)
; } | { evalRhsWhen: boolean; forceArgs?: (...)
| (...)
| (...)
; lazy: boolean; libFn?: (...)
| (...)
| (...)
; } | { block: string; handlers: { error?: ...
; finally?: ...
}; libFn?: (...)
| (...)
| (...)
; }; evalHandler?: string; names: (
BrandedIdentifier | [id
: ...
, namespace
: ...
, internal
?: ...
] )
[]; processor: | Access | Apply | Assignment | AssignmentLike | Default | Eval | ExpressionList | ForLoop | FunctionDefinition | Get | IfThenElse | Library | List | Local | Pipe | Quote | Recall | RegisterHook | RepeatLoop | Replacement | Rm | S3Dispatch | Source | SpecialBinOp | StopIfNot | Try | Vector | WhileLoop; type: "function"; } )
[]; loadDefaults?: boolean; }; }; }; solver: { evalStrings: boolean; instrument: { dataflowExtractors?: ( extractor: DataflowProcessors<ParentInformation>, ctx: FlowrAnalyzerContext, ) => DataflowProcessors<ParentInformation>; }; resolveSource?: { applyReplacements?: { [key: string]: string }[]; dropPaths: DropPathsOption; ignoreCapitalization: boolean; inferWorkingDirectory: InferWorkingDirectory; repeatedSourceLimit?: number; searchPath: string[]; [key: string]: unknown; }; slicer?: { threshold?: number }; variables: VariableResolve; }; [key: string]: unknown; }, ) => void | FlowrConfigOptions,): FlowrConfigOptions Parameters
- config: FlowrConfigOptions
- amendmentFunc: (
config: {
abstractInterpretation: {
dataFrame: {
maxColNames: number;
readLoadedData: { maxReadLines: number; readExternalFiles: boolean };
};
wideningThreshold: number;
};
defaultEngine?: "r-shell"
| "tree-sitter";
engines: (
| { rPath?: string; type: "r-shell"; [key: string]: unknown }
| {
lax?: boolean;
treeSitterWasmPath?: string;
type: "tree-sitter";
wasmPath?: string;
[key: string]: unknown;
}
)[];
ignoreSourceCalls: boolean;
project: { resolveUnknownPathsOnDisk: boolean };
repl: { dfProcessorHeat: boolean; quickStats: boolean };
semantics: {
environment: {
overwriteBuiltIns: {
definitions: (
| {
assumePrimitive?: boolean;
names: (
BrandedIdentifier
| [id: ..., namespace: ..., internal?: ...]
)[];
type: "constant";
value: unknown;
}
| {
assumePrimitive?: boolean;
config: { libFn?: boolean; readIndices: boolean };
names: (
BrandedIdentifier
| [id: ..., namespace: ..., internal?: ...]
)[];
suffixes: ("<-" | "<<-")[];
type: "replacement";
}
| {
assumePrimitive?: boolean;
config?: | {
forceFollow?: (...)
| (...)
| (...);
includeFunctionCall?: (...) | (...) | (...);
libFn?: (...) | (...) | (...);
}
| {
forceArgs?: (...)
| (...)
| (...);
libFn?: (...) | (...) | (...);
treatIndicesAsString: boolean;
}
| {
indexOfFunction?: (...)
| (...);
libFn?: (...) | (...) | (...);
nameOfFunctionArgument?: (...) | (...);
resolveInEnvironment?: (...) | (...) | (...);
resolveValue?: (...) | (...) | (...);
unquoteFunction?: (...) | (...) | (...);
[key: string]: unknown;
}
| {
canBeReplacement?: (...)
| (...)
| (...);
forceArgs?: (...) | (...) | (...);
libFn?: (...) | (...) | (...);
makeMaybe?: (...) | (...) | (...);
mayHaveMoreArgs?: (...) | (...) | (...);
quoteSource?: (...) | (...) | (...);
superAssignment?: (...) | (...) | (...);
swapSourceAndTarget?: (...) | (...) | (...);
targetVariable?: (...) | (...) | (...);
}
| {
canBeReplacement?: (...)
| (...)
| (...);
forceArgs?: (...) | (...) | (...);
libFn?: (...) | (...) | (...);
makeMaybe?: (...) | (...) | (...);
mayHaveMoreArgs?: (...) | (...) | (...);
quoteSource?: (...) | (...) | (...);
source: { idx?: ...; name: ... };
superAssignment?: (...) | (...) | (...);
swapSourceAndTarget?: (...) | (...) | (...);
target: { idx?: ...; name: ... };
targetVariable?: (...) | (...) | (...);
}
| {
cfg?: (...)
| (...);
forceArgs?: (...) | (...) | (...);
hasUnknownSideEffects?: (...) | (...) | (...) | (...) | (...);
libFn?: (...) | (...) | (...);
readAllArguments?: (...) | (...) | (...);
returnsNthArgument?: (...) | (...) | (...);
treatAsFnCall?: (...) | (...);
useAsProcessor?: (...) | (...);
}
| {
includeFunctionCall?: (...)
| (...)
| (...);
libFn?: (...) | (...) | (...);
}
| { args?: (...)
| (...); libFn?: (...) | (...) | (...) }
| { args: { env: ...; expr: ... }; libFn?: (...) | (...) | (...) }
| {
forceArgs?: (...) | (...) | (...);
libFn?: (...) | (...) | (...);
quoteArgumentsWithIndex?: (...) | (...);
}
| {
args: { add?: ...; after?: ...; expr: ... };
hook: OnFnExit;
libFn?: (...) | (...) | (...);
}
| {
assignmentOperator?: (...)
| (...)
| (...);
assignRootId?: (...) | (...);
forceArgs?: (...) | (...) | (...);
libFn?: (...) | (...) | (...);
makeMaybe?: (...) | (...) | (...);
readIndices?: (...) | (...) | (...);
}
| {
args: { generic: ...; object: ... };
libFn?: (...) | (...) | (...);
}
| {
evalRhsWhen: boolean;
forceArgs?: (...)
| (...)
| (...);
lazy: boolean;
libFn?: (...) | (...) | (...);
}
| {
block: string;
handlers: { error?: ...; finally?: ... };
libFn?: (...) | (...) | (...);
};
evalHandler?: string;
names: (
BrandedIdentifier
| [id: ..., namespace: ..., internal?: ...]
)[];
processor:
| Access
| Apply
| Assignment
| AssignmentLike
| Default
| Eval
| ExpressionList
| ForLoop
| FunctionDefinition
| Get
| IfThenElse
| Library
| List
| Local
| Pipe
| Quote
| Recall
| RegisterHook
| RepeatLoop
| Replacement
| Rm
| S3Dispatch
| Source
| SpecialBinOp
| StopIfNot
| Try
| Vector
| WhileLoop;
type: "function";
}
)[];
loadDefaults?: boolean;
};
};
};
solver: {
evalStrings: boolean;
instrument: {
dataflowExtractors?: (
extractor: DataflowProcessors<ParentInformation>,
ctx: FlowrAnalyzerContext,
) => DataflowProcessors<ParentInformation>;
};
resolveSource?: {
applyReplacements?: { [key: string]: string }[];
dropPaths: DropPathsOption;
ignoreCapitalization: boolean;
inferWorkingDirectory: InferWorkingDirectory;
repeatedSourceLimit?: number;
searchPath: string[];
[key: string]: unknown;
};
slicer?: { threshold?: number };
variables: VariableResolve;
};
[key: string]: unknown;
},
) => void
| FlowrConfigOptions
Creates a new flowr config that has the updated values.