@eagleoutice/flowr 2.10.9 → 2.10.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +103 -33
- package/abstract-interpretation/absint-visitor.js +6 -3
- package/abstract-interpretation/domains/abstract-domain.d.ts +1 -1
- package/abstract-interpretation/domains/bounded-set-domain.d.ts +1 -1
- package/abstract-interpretation/domains/bounded-set-domain.js +1 -1
- package/abstract-interpretation/domains/interval-domain.d.ts +1 -1
- package/abstract-interpretation/domains/interval-domain.js +1 -1
- package/abstract-interpretation/domains/lattice.d.ts +1 -1
- package/abstract-interpretation/domains/partial-product-domain.d.ts +1 -1
- package/abstract-interpretation/domains/partial-product-domain.js +2 -2
- package/abstract-interpretation/domains/set-range-domain.d.ts +1 -1
- package/abstract-interpretation/domains/set-range-domain.js +1 -1
- package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +1 -1
- package/abstract-interpretation/domains/set-upper-bound-domain.js +1 -1
- package/abstract-interpretation/domains/singleton-domain.d.ts +1 -1
- package/abstract-interpretation/domains/singleton-domain.js +1 -1
- package/abstract-interpretation/domains/state-abstract-domain.d.ts +1 -1
- package/abstract-interpretation/domains/state-abstract-domain.js +2 -2
- package/abstract-interpretation/unsupported-functions.d.ts +3 -2
- package/abstract-interpretation/unsupported-functions.js +38 -28
- package/cli/benchmark-app.js +2 -1
- package/cli/common/script.js +3 -2
- package/cli/flowr.js +47 -10
- package/cli/repl/commands/repl-cfg.js +9 -9
- package/cli/repl/commands/repl-commands.js +5 -0
- package/cli/repl/commands/repl-dataflow.js +31 -24
- package/cli/repl/commands/repl-main.d.ts +6 -0
- package/cli/repl/commands/repl-normalize.js +15 -12
- package/cli/repl/commands/repl-parse.js +1 -1
- package/cli/repl/commands/repl-query.js +4 -5
- package/cli/repl/commands/repl-quit.js +2 -1
- package/cli/repl/core.d.ts +11 -0
- package/cli/repl/core.js +101 -3
- package/cli/repl/execute.js +3 -2
- package/cli/repl/parser/slice-query-parser.d.ts +16 -0
- package/cli/repl/parser/slice-query-parser.js +52 -0
- package/cli/repl/server/connection.d.ts +1 -0
- package/cli/repl/server/connection.js +25 -0
- package/cli/repl/server/messages/message-analysis.d.ts +10 -0
- package/cli/repl/server/messages/message-analysis.js +6 -2
- package/cli/repl/server/messages/message-slice.d.ts +1 -1
- package/cli/script-core/statistics-core.js +2 -1
- package/cli/script-core/statistics-helper-core.js +2 -1
- package/cli/wiki.d.ts +2 -1
- package/cli/wiki.js +4 -1
- package/config.d.ts +9 -10
- package/config.js +25 -7
- package/control-flow/diff-cfg.d.ts +1 -1
- package/control-flow/diff-cfg.js +1 -1
- package/control-flow/semantic-cfg-guided-visitor.js +1 -0
- package/control-flow/simple-visitor.js +6 -5
- package/control-flow/useless-loop.js +2 -2
- package/core/print/dataflow-printer.d.ts +2 -2
- package/core/print/dataflow-printer.js +2 -2
- package/core/steps/all/static-slicing/00-slice.js +1 -1
- package/core/steps/pipeline/default-pipelines.d.ts +146 -146
- package/dataflow/environments/append.d.ts +2 -1
- package/dataflow/environments/append.js +2 -1
- package/dataflow/environments/built-in-proc-name.d.ts +2 -0
- package/dataflow/environments/built-in-proc-name.js +2 -0
- package/dataflow/environments/built-in.d.ts +2 -0
- package/dataflow/environments/built-in.js +2 -0
- package/dataflow/environments/default-builtin-config.d.ts +122 -66
- package/dataflow/environments/default-builtin-config.js +324 -145
- package/dataflow/environments/environment.d.ts +2 -1
- package/dataflow/environments/environment.js +13 -9
- package/dataflow/environments/identifier.d.ts +55 -2
- package/dataflow/environments/identifier.js +14 -2
- package/dataflow/environments/reference-to-maybe.d.ts +2 -0
- package/dataflow/environments/reference-to-maybe.js +56 -11
- package/dataflow/environments/resolve-by-name.js +13 -7
- package/dataflow/eval/values/general.js +4 -0
- package/dataflow/extractor.js +12 -2
- package/dataflow/graph/df-helper.d.ts +6 -0
- package/dataflow/graph/df-helper.js +33 -0
- package/dataflow/graph/graph.js +1 -1
- package/dataflow/info.d.ts +1 -1
- package/dataflow/internal/linker.d.ts +5 -1
- package/dataflow/internal/linker.js +34 -9
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +53 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.d.ts +13 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.js +58 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +38 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +9 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +1 -1
- package/dataflow/internal/process/functions/call/known-call-handling.js +4 -3
- package/dataflow/internal/process/functions/call/named-call-handling.js +6 -0
- package/dataflow/origin/dfg-get-origin.d.ts +1 -1
- package/dataflow/origin/dfg-get-origin.js +1 -1
- package/dataflow/processor.d.ts +6 -0
- package/documentation/data/faq/faqs.d.ts +2 -1
- package/documentation/data/faq/faqs.js +75 -57
- package/documentation/data/server/doc-data-server-messages.d.ts +2 -1
- package/documentation/data/server/doc-data-server-messages.js +15 -7
- package/documentation/doc-readme.js +15 -15
- package/documentation/doc-util/doc-cfg.d.ts +3 -1
- package/documentation/doc-util/doc-cfg.js +3 -3
- package/documentation/doc-util/doc-dfg.d.ts +3 -1
- package/documentation/doc-util/doc-dfg.js +3 -3
- package/documentation/doc-util/doc-files.d.ts +3 -1
- package/documentation/doc-util/doc-files.js +9 -6
- package/documentation/doc-util/doc-normalized-ast.d.ts +3 -1
- package/documentation/doc-util/doc-normalized-ast.js +2 -2
- package/documentation/doc-util/doc-query.d.ts +2 -1
- package/documentation/doc-util/doc-query.js +2 -2
- package/documentation/doc-util/doc-repl.js +1 -0
- package/documentation/doc-util/doc-types.d.ts +6 -6
- package/documentation/doc-util/doc-types.js +11 -9
- package/documentation/issue-linting-rule.js +1 -2
- package/documentation/wiki-analyzer.js +9 -9
- package/documentation/wiki-cfg.js +40 -41
- package/documentation/wiki-core.js +119 -31
- package/documentation/wiki-create-linting-rules.d.ts +6 -0
- package/documentation/wiki-create-linting-rules.js +95 -0
- package/documentation/wiki-dataflow-graph.js +77 -76
- package/documentation/wiki-engine.js +1 -2
- package/documentation/wiki-faq.d.ts +2 -1
- package/documentation/wiki-faq.js +4 -4
- package/documentation/wiki-interface.js +19 -6
- package/documentation/wiki-linter.d.ts +1 -1
- package/documentation/wiki-linter.js +14 -6
- package/documentation/wiki-linting-and-testing.js +2 -2
- package/documentation/wiki-mk/doc-context.d.ts +3 -3
- package/documentation/wiki-mk/doc-maker.d.ts +2 -0
- package/documentation/wiki-mk/doc-maker.js +7 -1
- package/documentation/wiki-normalized-ast.js +5 -5
- package/documentation/wiki-onboarding.d.ts +2 -1
- package/documentation/wiki-onboarding.js +5 -5
- package/documentation/wiki-overview.js +3 -3
- package/documentation/wiki-query.js +85 -84
- package/documentation/wiki-search.js +4 -5
- package/documentation/wiki-setup.js +6 -7
- package/gas.d.ts +74 -0
- package/gas.js +18 -0
- package/linter/linter-executor.js +2 -8
- package/linter/linter-format.d.ts +4 -11
- package/linter/linter-rules.d.ts +88 -86
- package/linter/linter-rules.js +7 -1
- package/linter/rules/absolute-path.d.ts +2 -7
- package/linter/rules/absolute-path.js +6 -4
- package/linter/rules/dataframe-access-validation.d.ts +1 -6
- package/linter/rules/dataframe-access-validation.js +8 -6
- package/linter/rules/dead-code.d.ts +2 -11
- package/linter/rules/dead-code.js +16 -11
- package/linter/rules/deprecated-functions.d.ts +3 -3
- package/linter/rules/file-path-validity.d.ts +1 -6
- package/linter/rules/file-path-validity.js +5 -5
- package/linter/rules/function-finder-util.d.ts +7 -11
- package/linter/rules/function-finder-util.js +9 -6
- package/linter/rules/naming-convention.d.ts +2 -7
- package/linter/rules/naming-convention.js +3 -2
- package/linter/rules/network-functions.d.ts +2 -7
- package/linter/rules/network-functions.js +14 -12
- package/linter/rules/no-leaked-credentials.d.ts +36 -0
- package/linter/rules/no-leaked-credentials.js +75 -0
- package/linter/rules/problematic-inputs.d.ts +1 -8
- package/linter/rules/problematic-inputs.js +5 -4
- package/linter/rules/roxygen-arguments.d.ts +2 -7
- package/linter/rules/roxygen-arguments.js +13 -20
- package/linter/rules/seeded-randomness.d.ts +2 -7
- package/linter/rules/seeded-randomness.js +7 -4
- package/linter/rules/software-has-license.d.ts +31 -0
- package/linter/rules/software-has-license.js +46 -0
- package/linter/rules/software-has-tests.d.ts +38 -0
- package/linter/rules/software-has-tests.js +48 -0
- package/linter/rules/stop-with-call-arg.d.ts +2 -7
- package/linter/rules/stop-with-call-arg.js +3 -2
- package/linter/rules/unused-definition.d.ts +3 -8
- package/linter/rules/unused-definition.js +7 -5
- package/linter/rules/useless-loop.d.ts +2 -7
- package/linter/rules/useless-loop.js +5 -2
- package/package.json +3 -2
- package/project/context/flowr-analyzer-context.d.ts +13 -14
- package/project/context/flowr-analyzer-context.js +4 -0
- package/project/context/flowr-analyzer-files-context.d.ts +12 -0
- package/project/context/flowr-analyzer-files-context.js +12 -2
- package/project/context/flowr-analyzer-gas-context.d.ts +28 -0
- package/project/context/flowr-analyzer-gas-context.js +101 -0
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +13 -7
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +56 -11
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.js +2 -2
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.d.ts +2 -1
- package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.js +5 -5
- package/project/plugins/flowr-analyzer-plugin.d.ts +15 -8
- package/project/plugins/flowr-analyzer-plugin.js +14 -7
- package/project/plugins/gas-plugins/flowr-analyzer-gas-plugin.d.ts +19 -0
- package/project/plugins/gas-plugins/flowr-analyzer-gas-plugin.js +35 -0
- package/project/plugins/plugin-registry.d.ts +2 -1
- package/project/plugins/plugin-registry.js +3 -1
- package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.d.ts +22 -0
- package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.js +47 -0
- package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +1 -1
- package/queries/catalog/call-context-query/call-context-query-executor.js +54 -8
- package/queries/catalog/call-context-query/call-context-query-format.d.ts +2 -2
- package/queries/catalog/dependencies-query/function-info/test-functions.d.ts +2 -0
- package/queries/catalog/dependencies-query/function-info/test-functions.js +18 -177
- package/queries/catalog/df-shape-query/df-shape-query-format.js +1 -1
- package/queries/catalog/dice-query/dice-query-executor.d.ts +8 -0
- package/queries/catalog/dice-query/dice-query-executor.js +52 -0
- package/queries/catalog/dice-query/dice-query-format.d.ts +53 -0
- package/queries/catalog/dice-query/dice-query-format.js +102 -0
- package/queries/catalog/happens-before-query/happens-before-query-executor.js +2 -2
- package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +2 -0
- package/queries/catalog/input-sources-query/input-sources-query-format.js +1 -0
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -0
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +1 -0
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -0
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +1 -0
- package/queries/catalog/linter-query/linter-query-executor.js +7 -0
- package/queries/catalog/location-map-query/location-map-query-format.d.ts +2 -0
- package/queries/catalog/location-map-query/location-map-query-format.js +1 -0
- package/queries/catalog/origin-query/origin-query-format.d.ts +2 -0
- package/queries/catalog/origin-query/origin-query-format.js +1 -0
- package/queries/catalog/provenance-query/provenance-query-format.d.ts +2 -0
- package/queries/catalog/provenance-query/provenance-query-format.js +1 -0
- package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +2 -0
- package/queries/catalog/resolve-value-query/resolve-value-query-format.js +1 -0
- package/queries/catalog/static-slice-query/static-slice-query-executor.js +1 -1
- package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +2 -0
- package/queries/catalog/static-slice-query/static-slice-query-format.js +1 -0
- package/queries/query.d.ts +18 -1
- package/queries/query.js +3 -1
- package/r-bridge/data/data.d.ts +5 -0
- package/r-bridge/data/data.js +6 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +0 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-number.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-number.js +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-string.d.ts +1 -1
- package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-string.js +1 -1
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +55 -44
- package/r-bridge/parser.js +2 -9
- package/r-bridge/shell.d.ts +8 -1
- package/r-bridge/shell.js +26 -7
- package/search/flowr-search-builder.d.ts +2 -2
- package/search/flowr-search-builder.js +1 -1
- package/search/flowr-search-filters.d.ts +30 -9
- package/search/flowr-search-filters.js +26 -21
- package/search/search-executor/search-enrichers.d.ts +600 -0
- package/search/search-executor/search-enrichers.js +23 -2
- package/slicing/static/static-slicer.d.ts +39 -11
- package/slicing/static/static-slicer.js +44 -14
- package/util/collections/queue.d.ts +16 -0
- package/util/collections/queue.js +38 -0
- package/util/log.d.ts +1 -1
- package/util/log.js +1 -1
- package/util/mermaid/dfg.d.ts +2 -2
- package/util/mermaid/dfg.js +2 -2
- package/util/objects.d.ts +9 -0
- package/util/objects.js +54 -0
- package/util/proc.d.ts +6 -0
- package/util/proc.js +20 -0
- package/util/version.js +1 -1
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.executeHappensBefore = executeHappensBefore;
|
|
4
4
|
const logic_1 = require("../../../util/logic");
|
|
5
5
|
const log_1 = require("../../../util/log");
|
|
6
|
-
const extract_cfg_1 = require("../../../control-flow/extract-cfg");
|
|
7
6
|
const happens_before_1 = require("../../../control-flow/happens-before");
|
|
8
7
|
const parse_1 = require("../../../slicing/criterion/parse");
|
|
8
|
+
const cfg_kind_1 = require("../../../project/cfg-kind");
|
|
9
9
|
/**
|
|
10
10
|
* Execute happens-before queries on the given analyzer.
|
|
11
11
|
* This checks, whether for two given slicing criteria `a` and `b`, `a` happens before `b` in the control flow graph.
|
|
@@ -14,7 +14,7 @@ async function executeHappensBefore({ analyzer }, queries) {
|
|
|
14
14
|
const start = Date.now();
|
|
15
15
|
const results = {};
|
|
16
16
|
const ast = await analyzer.normalize();
|
|
17
|
-
const cfg = (
|
|
17
|
+
const cfg = await analyzer.controlflow(undefined, cfg_kind_1.CfgKind.Quick);
|
|
18
18
|
for (const query of queries) {
|
|
19
19
|
const { a, b } = query;
|
|
20
20
|
const fingerprint = `${a}<${b}`;
|
|
@@ -6,6 +6,7 @@ import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/nod
|
|
|
6
6
|
import { type InputClassifierConfig, type InputSources } from './simple-input-classifier';
|
|
7
7
|
import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
|
|
8
8
|
import type { FlowrConfig } from '../../../config';
|
|
9
|
+
import { criteriaQueryCompleter } from '../../../cli/repl/parser/slice-query-parser';
|
|
9
10
|
import { executeInputSourcesQuery } from './input-sources-query-executor';
|
|
10
11
|
export type InputSourcesQueryConfig = InputClassifierConfig;
|
|
11
12
|
/**
|
|
@@ -33,6 +34,7 @@ export declare const InputSourcesDefinition: {
|
|
|
33
34
|
readonly executor: typeof executeInputSourcesQuery;
|
|
34
35
|
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>;
|
|
35
36
|
readonly fromLine: typeof inputSourcesQueryLineParser;
|
|
37
|
+
readonly completer: typeof criteriaQueryCompleter;
|
|
36
38
|
readonly schema: Joi.ObjectSchema<any>;
|
|
37
39
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
38
40
|
};
|
|
@@ -57,6 +57,7 @@ exports.InputSourcesDefinition = {
|
|
|
57
57
|
return true;
|
|
58
58
|
},
|
|
59
59
|
fromLine: inputSourcesQueryLineParser,
|
|
60
|
+
completer: slice_query_parser_1.criteriaQueryCompleter,
|
|
60
61
|
schema: joi_1.default.object({
|
|
61
62
|
type: joi_1.default.string().valid('input-sources').required().description('The type of the query.'),
|
|
62
63
|
criterion: joi_1.default.alternatives(joi_1.default.string(), joi_1.default.array().items(joi_1.default.string())).required().description('The slicing criterion or array of criteria to use.'),
|
|
@@ -5,6 +5,7 @@ import { executeExceptionQuery } from './inspect-exception-query-executor';
|
|
|
5
5
|
import { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
6
6
|
import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
|
|
7
7
|
import type { FlowrConfig } from '../../../config';
|
|
8
|
+
import { criteriaQueryCompleter } from '../../../cli/repl/parser/slice-query-parser';
|
|
8
9
|
import type { ExceptionPoint } from '../../../dataflow/fn/exceptions-of-function';
|
|
9
10
|
import type { SlicingCriterion } from '../../../slicing/criterion/parse';
|
|
10
11
|
/**
|
|
@@ -28,6 +29,7 @@ export declare const InspectExceptionQueryDefinition: {
|
|
|
28
29
|
readonly executor: typeof executeExceptionQuery;
|
|
29
30
|
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>;
|
|
30
31
|
readonly fromLine: typeof inspectExceptionLineParser;
|
|
32
|
+
readonly completer: typeof criteriaQueryCompleter;
|
|
31
33
|
readonly schema: Joi.ObjectSchema<any>;
|
|
32
34
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
33
35
|
};
|
|
@@ -43,6 +43,7 @@ exports.InspectExceptionQueryDefinition = {
|
|
|
43
43
|
return true;
|
|
44
44
|
},
|
|
45
45
|
fromLine: inspectExceptionLineParser,
|
|
46
|
+
completer: slice_query_parser_1.criteriaQueryCompleter,
|
|
46
47
|
schema: joi_1.default.object({
|
|
47
48
|
type: joi_1.default.string().valid('inspect-exception').required().description('The type of the query.'),
|
|
48
49
|
filter: joi_1.default.array().items(joi_1.default.string().required()).optional().description('If given, only function definitions that match one of the given slicing criteria are considered. Each criterion can be either `line:column`, `line@variable-name`, or `$id`, where the latter directly specifies the node id of the function definition to be considered.'),
|
|
@@ -6,6 +6,7 @@ import { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id'
|
|
|
6
6
|
import type { SlicingCriterion } from '../../../slicing/criterion/parse';
|
|
7
7
|
import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
|
|
8
8
|
import type { FlowrConfig } from '../../../config';
|
|
9
|
+
import { criteriaQueryCompleter } from '../../../cli/repl/parser/slice-query-parser';
|
|
9
10
|
/**
|
|
10
11
|
* Either returns all function definitions alongside whether they are higher-order functions,
|
|
11
12
|
* or just those matching the filters.
|
|
@@ -22,6 +23,7 @@ export declare const InspectHigherOrderQueryDefinition: {
|
|
|
22
23
|
readonly executor: typeof executeHigherOrderQuery;
|
|
23
24
|
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>;
|
|
24
25
|
readonly fromLine: typeof inspectHoLineParser;
|
|
26
|
+
readonly completer: typeof criteriaQueryCompleter;
|
|
25
27
|
readonly schema: Joi.ObjectSchema<any>;
|
|
26
28
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
27
29
|
};
|
|
@@ -33,6 +33,7 @@ exports.InspectHigherOrderQueryDefinition = {
|
|
|
33
33
|
return true;
|
|
34
34
|
},
|
|
35
35
|
fromLine: inspectHoLineParser,
|
|
36
|
+
completer: slice_query_parser_1.criteriaQueryCompleter,
|
|
36
37
|
schema: joi_1.default.object({
|
|
37
38
|
type: joi_1.default.string().valid('inspect-higher-order').required().description('The type of the query.'),
|
|
38
39
|
filter: joi_1.default.array().items(joi_1.default.string().required()).optional().description('If given, only function definitions that match one of the given slicing criteria are considered. Each criterion can be either `line:column`, `line@variable-name`, or `$id`, where the latter directly specifies the node id of the function definition to be considered.')
|
|
@@ -4,6 +4,7 @@ exports.executeLinterQuery = executeLinterQuery;
|
|
|
4
4
|
const linter_rules_1 = require("../../../linter/linter-rules");
|
|
5
5
|
const log_1 = require("../../../util/log");
|
|
6
6
|
const linter_executor_1 = require("../../../linter/linter-executor");
|
|
7
|
+
const gas_1 = require("../../../gas");
|
|
7
8
|
/**
|
|
8
9
|
* Executes the given linter queries using the provided analyzer.
|
|
9
10
|
* @see {@link executeLintingRule}
|
|
@@ -17,8 +18,14 @@ async function executeLinterQuery({ analyzer }, queries) {
|
|
|
17
18
|
}
|
|
18
19
|
const results = { results: {} };
|
|
19
20
|
const start = Date.now();
|
|
21
|
+
const gas = analyzer.inspectContext().gas;
|
|
20
22
|
for (const entry of distinct) {
|
|
21
23
|
const ruleName = typeof entry === 'string' ? entry : entry.name;
|
|
24
|
+
if (gas.checkGas(gas_1.GasFeatureKey.Linter) >= 2 /* GasLevel.Critical */) {
|
|
25
|
+
log_1.log.warn(`Skipping linting rule ${ruleName} due to resource pressure (gas: critical). See ${gas_1.GasWikiRef}`);
|
|
26
|
+
results.results[ruleName] = { error: new Error(`skipped due to resource pressure (gas: critical), see ${gas_1.GasWikiRef}`) };
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
22
29
|
results.results[ruleName] = await (0, linter_executor_1.executeLintingRule)(ruleName, analyzer, entry?.config);
|
|
23
30
|
}
|
|
24
31
|
return {
|
|
@@ -8,6 +8,7 @@ import type { SlicingCriterion } from '../../../slicing/criterion/parse';
|
|
|
8
8
|
import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
|
|
9
9
|
import type { FlowrConfig } from '../../../config';
|
|
10
10
|
import type { ParsedQueryLine } from '../../query';
|
|
11
|
+
import { criteriaQueryCompleter } from '../../../cli/repl/parser/slice-query-parser';
|
|
11
12
|
export interface LocationMapQuery extends BaseQueryFormat {
|
|
12
13
|
readonly type: 'location-map';
|
|
13
14
|
/** Optional list of ids to filter the results by. If not provided, all ids will be included. */
|
|
@@ -30,6 +31,7 @@ export declare const LocationMapQueryDefinition: {
|
|
|
30
31
|
readonly executor: typeof executeLocationMapQuery;
|
|
31
32
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: unknown, queryResults: BaseQueryResult, result: string[]) => true;
|
|
32
33
|
readonly fromLine: typeof locationMapLineParser;
|
|
34
|
+
readonly completer: typeof criteriaQueryCompleter;
|
|
33
35
|
readonly schema: Joi.ObjectSchema<any>;
|
|
34
36
|
readonly flattenInvolvedNodes: () => never[];
|
|
35
37
|
};
|
|
@@ -33,6 +33,7 @@ exports.LocationMapQueryDefinition = {
|
|
|
33
33
|
return true;
|
|
34
34
|
},
|
|
35
35
|
fromLine: locationMapLineParser,
|
|
36
|
+
completer: slice_query_parser_1.criteriaQueryCompleter,
|
|
36
37
|
schema: joi_1.default.object({
|
|
37
38
|
type: joi_1.default.string().valid('location-map').required().description('The type of the query.'),
|
|
38
39
|
ids: joi_1.default.array().items(joi_1.default.string()).optional().description('Optional list of ids to filter the results by.')
|
|
@@ -7,6 +7,7 @@ import type { Origin } from '../../../dataflow/origin/dfg-get-origin';
|
|
|
7
7
|
import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
8
8
|
import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
|
|
9
9
|
import type { FlowrConfig } from '../../../config';
|
|
10
|
+
import { criteriaQueryCompleter } from '../../../cli/repl/parser/slice-query-parser';
|
|
10
11
|
export interface OriginQuery extends BaseQueryFormat {
|
|
11
12
|
readonly type: 'origin';
|
|
12
13
|
/** The slicing criteria to use */
|
|
@@ -20,6 +21,7 @@ export declare const OriginQueryDefinition: {
|
|
|
20
21
|
readonly executor: typeof executeResolveValueQuery;
|
|
21
22
|
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
22
23
|
readonly fromLine: typeof originQueryLineParser;
|
|
24
|
+
readonly completer: typeof criteriaQueryCompleter;
|
|
23
25
|
readonly schema: Joi.ObjectSchema<any>;
|
|
24
26
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
25
27
|
};
|
|
@@ -35,6 +35,7 @@ exports.OriginQueryDefinition = {
|
|
|
35
35
|
return true;
|
|
36
36
|
},
|
|
37
37
|
fromLine: originQueryLineParser,
|
|
38
|
+
completer: slice_query_parser_1.criteriaQueryCompleter,
|
|
38
39
|
schema: joi_1.default.object({
|
|
39
40
|
type: joi_1.default.string().valid('origin').required().description('The type of the query.'),
|
|
40
41
|
criterion: joi_1.default.string().required().description('The slicing criteria to use'),
|
|
@@ -5,6 +5,7 @@ import Joi from 'joi';
|
|
|
5
5
|
import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
6
6
|
import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
|
|
7
7
|
import type { FlowrConfig } from '../../../config';
|
|
8
|
+
import { criteriaQueryCompleter } from '../../../cli/repl/parser/slice-query-parser';
|
|
8
9
|
import { executeProvenanceQuery } from './provenance-query-executor';
|
|
9
10
|
/** Calculates the provenance starting from a given criterion */
|
|
10
11
|
export interface ProvenanceQuery extends BaseQueryFormat {
|
|
@@ -29,6 +30,7 @@ export declare const ProvenanceQueryDefinition: {
|
|
|
29
30
|
readonly executor: typeof executeProvenanceQuery;
|
|
30
31
|
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>;
|
|
31
32
|
readonly fromLine: typeof provenanceQueryLineParser;
|
|
33
|
+
readonly completer: typeof criteriaQueryCompleter;
|
|
32
34
|
readonly schema: Joi.ObjectSchema<any>;
|
|
33
35
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
34
36
|
};
|
|
@@ -45,6 +45,7 @@ exports.ProvenanceQueryDefinition = {
|
|
|
45
45
|
return true;
|
|
46
46
|
},
|
|
47
47
|
fromLine: provenanceQueryLineParser,
|
|
48
|
+
completer: slice_query_parser_1.criteriaQueryCompleter,
|
|
48
49
|
schema: joi_1.default.object({
|
|
49
50
|
type: joi_1.default.string().valid('provenance').required().description('The type of the query.'),
|
|
50
51
|
criterion: joi_1.default.string().required().description('The slicing criterion to use.'),
|
|
@@ -6,6 +6,7 @@ import { executeResolveValueQuery } from './resolve-value-query-executor';
|
|
|
6
6
|
import type { ResolveResult } from '../../../dataflow/eval/resolve/alias-tracking';
|
|
7
7
|
import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
|
|
8
8
|
import type { FlowrConfig } from '../../../config';
|
|
9
|
+
import { criteriaQueryCompleter } from '../../../cli/repl/parser/slice-query-parser';
|
|
9
10
|
export interface ResolveValueQuery extends BaseQueryFormat {
|
|
10
11
|
readonly type: 'resolve-value';
|
|
11
12
|
/** The slicing criteria to use */
|
|
@@ -21,6 +22,7 @@ export declare const ResolveValueQueryDefinition: {
|
|
|
21
22
|
readonly executor: typeof executeResolveValueQuery;
|
|
22
23
|
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
23
24
|
readonly fromLine: typeof resolveValueLineParser;
|
|
25
|
+
readonly completer: typeof criteriaQueryCompleter;
|
|
24
26
|
readonly schema: Joi.ObjectSchema<any>;
|
|
25
27
|
readonly flattenInvolvedNodes: () => never[];
|
|
26
28
|
};
|
|
@@ -43,6 +43,7 @@ exports.ResolveValueQueryDefinition = {
|
|
|
43
43
|
return true;
|
|
44
44
|
},
|
|
45
45
|
fromLine: resolveValueLineParser,
|
|
46
|
+
completer: slice_query_parser_1.criteriaQueryCompleter,
|
|
46
47
|
schema: joi_1.default.object({
|
|
47
48
|
type: joi_1.default.string().valid('resolve-value').required().description('The type of the query.'),
|
|
48
49
|
criteria: joi_1.default.array().items(joi_1.default.string()).min(1).required().description('The slicing criteria to use.'),
|
|
@@ -32,7 +32,7 @@ async function executeStaticSliceQuery({ analyzer }, queries) {
|
|
|
32
32
|
const { criteria, noReconstruction, noMagicComments } = query;
|
|
33
33
|
const sliceStart = Date.now();
|
|
34
34
|
const n = await analyzer.normalize();
|
|
35
|
-
const slice = (0, static_slicer_1.staticSlice)(analyzer.inspectContext(), await analyzer.dataflow(), n, parse_1.SlicingCriteria.convertAll(criteria, n.idMap), query.direction ?? slice_direction_1.SliceDirection.Backward, analyzer.flowrConfig.solver.slicer?.threshold);
|
|
35
|
+
const slice = (0, static_slicer_1.staticSlice)({ ctx: analyzer.inspectContext(), info: await analyzer.dataflow(), ast: n, ids: parse_1.SlicingCriteria.convertAll(criteria, n.idMap), direction: query.direction ?? slice_direction_1.SliceDirection.Backward, threshold: analyzer.flowrConfig.solver.slicer?.threshold });
|
|
36
36
|
const sliceEnd = Date.now();
|
|
37
37
|
if (noReconstruction) {
|
|
38
38
|
results[key] = { slice: { ...slice, '.meta': { timing: sliceEnd - sliceStart } } };
|
|
@@ -8,6 +8,7 @@ import { executeStaticSliceQuery } from './static-slice-query-executor';
|
|
|
8
8
|
import type { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
9
9
|
import type { ReplOutput } from '../../../cli/repl/commands/repl-main';
|
|
10
10
|
import type { FlowrConfig } from '../../../config';
|
|
11
|
+
import { criteriaQueryCompleter } from '../../../cli/repl/parser/slice-query-parser';
|
|
11
12
|
import { SliceDirection } from '../../../util/slice-direction';
|
|
12
13
|
/** Calculates and returns the static backward or forward slice from the given criteria */
|
|
13
14
|
export interface StaticSliceQuery extends BaseQueryFormat {
|
|
@@ -36,6 +37,7 @@ export declare const StaticSliceQueryDefinition: {
|
|
|
36
37
|
readonly executor: typeof executeStaticSliceQuery;
|
|
37
38
|
readonly asciiSummarizer: (formatter: import("../../../util/text/ansi").OutputFormatter, _analyzer: import("../../../project/flowr-analyzer").ReadonlyFlowrAnalysisProvider<import("../../../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
38
39
|
readonly fromLine: typeof sliceQueryLineParser;
|
|
40
|
+
readonly completer: typeof criteriaQueryCompleter;
|
|
39
41
|
readonly schema: Joi.ObjectSchema<any>;
|
|
40
42
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
41
43
|
};
|
|
@@ -63,6 +63,7 @@ exports.StaticSliceQueryDefinition = {
|
|
|
63
63
|
return true;
|
|
64
64
|
},
|
|
65
65
|
fromLine: sliceQueryLineParser,
|
|
66
|
+
completer: slice_query_parser_1.criteriaQueryCompleter,
|
|
66
67
|
schema: joi_1.default.object({
|
|
67
68
|
type: joi_1.default.string().valid('static-slice').required().description('The type of the query.'),
|
|
68
69
|
criteria: joi_1.default.array().items(joi_1.default.string()).min(0).required().description('The slicing criteria to use.'),
|
package/queries/query.d.ts
CHANGED
|
@@ -36,10 +36,11 @@ import type { InspectExceptionQuery } from './catalog/inspect-exceptions-query/i
|
|
|
36
36
|
import type { InputSourcesQuery } from './catalog/input-sources-query/input-sources-query-format';
|
|
37
37
|
import type { ProvenanceQuery } from './catalog/provenance-query/provenance-query-format';
|
|
38
38
|
import type { LintingResultCertainty } from '../linter/linter-format';
|
|
39
|
+
import { type DiceQuery } from './catalog/dice-query/dice-query-format';
|
|
39
40
|
/**
|
|
40
41
|
* These are all queries that can be executed from within flowR
|
|
41
42
|
*/
|
|
42
|
-
export type Query = CallContextQuery | ConfigQuery | SearchQuery | DataflowQuery | DoesCallQuery | CallGraphQuery | ControlFlowQuery | DataflowLensQuery | FilesQuery | DfShapeQuery | NormalizedAstQuery | IdMapQuery | DataflowClusterQuery | StaticSliceQuery | DependenciesQuery | LocationMapQuery | HappensBeforeQuery | InspectExceptionQuery | InspectHigherOrderQuery | InspectRecursionQuery | ResolveValueQuery | ProjectQuery | OriginQuery | LinterQuery | ProvenanceQuery | InputSourcesQuery;
|
|
43
|
+
export type Query = CallContextQuery | ConfigQuery | SearchQuery | DataflowQuery | DoesCallQuery | CallGraphQuery | ControlFlowQuery | DataflowLensQuery | FilesQuery | DfShapeQuery | NormalizedAstQuery | IdMapQuery | DataflowClusterQuery | StaticSliceQuery | DependenciesQuery | LocationMapQuery | HappensBeforeQuery | InspectExceptionQuery | InspectHigherOrderQuery | InspectRecursionQuery | ResolveValueQuery | ProjectQuery | OriginQuery | LinterQuery | ProvenanceQuery | InputSourcesQuery | DiceQuery;
|
|
43
44
|
export type QueryArgumentsWithType<QueryType extends BaseQueryFormat['type']> = Query & {
|
|
44
45
|
type: QueryType;
|
|
45
46
|
};
|
|
@@ -156,6 +157,7 @@ export declare const SupportedQueries: {
|
|
|
156
157
|
readonly executor: typeof import("./catalog/static-slice-query/static-slice-query-executor").executeStaticSliceQuery;
|
|
157
158
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
158
159
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"static-slice">;
|
|
160
|
+
readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
|
|
159
161
|
readonly schema: Joi.ObjectSchema<any>;
|
|
160
162
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
161
163
|
};
|
|
@@ -163,6 +165,7 @@ export declare const SupportedQueries: {
|
|
|
163
165
|
readonly executor: typeof import("./catalog/provenance-query/provenance-query-executor").executeProvenanceQuery;
|
|
164
166
|
readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
|
|
165
167
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"provenance">;
|
|
168
|
+
readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
|
|
166
169
|
readonly schema: Joi.ObjectSchema<any>;
|
|
167
170
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
168
171
|
};
|
|
@@ -170,6 +173,7 @@ export declare const SupportedQueries: {
|
|
|
170
173
|
readonly executor: typeof import("./catalog/input-sources-query/input-sources-query-executor").executeInputSourcesQuery;
|
|
171
174
|
readonly asciiSummarizer: (formatter: OutputFormatter, analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
|
|
172
175
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"input-sources">;
|
|
176
|
+
readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
|
|
173
177
|
readonly schema: Joi.ObjectSchema<any>;
|
|
174
178
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
175
179
|
};
|
|
@@ -183,6 +187,7 @@ export declare const SupportedQueries: {
|
|
|
183
187
|
readonly executor: typeof import("./catalog/location-map-query/location-map-query-executor").executeLocationMapQuery;
|
|
184
188
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: unknown, queryResults: BaseQueryResult, result: string[]) => true;
|
|
185
189
|
readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"location-map">;
|
|
190
|
+
readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
|
|
186
191
|
readonly schema: Joi.ObjectSchema<any>;
|
|
187
192
|
readonly flattenInvolvedNodes: () => never[];
|
|
188
193
|
};
|
|
@@ -202,6 +207,7 @@ export declare const SupportedQueries: {
|
|
|
202
207
|
readonly executor: typeof import("./catalog/inspect-exceptions-query/inspect-exception-query-executor").executeExceptionQuery;
|
|
203
208
|
readonly asciiSummarizer: (formatter: OutputFormatter, processed: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
|
|
204
209
|
readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"inspect-exception">;
|
|
210
|
+
readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
|
|
205
211
|
readonly schema: Joi.ObjectSchema<any>;
|
|
206
212
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
207
213
|
};
|
|
@@ -209,6 +215,7 @@ export declare const SupportedQueries: {
|
|
|
209
215
|
readonly executor: typeof import("./catalog/inspect-higher-order-query/inspect-higher-order-query-executor").executeHigherOrderQuery;
|
|
210
216
|
readonly asciiSummarizer: (formatter: OutputFormatter, processed: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => Promise<boolean>;
|
|
211
217
|
readonly fromLine: (_output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"inspect-higher-order">;
|
|
218
|
+
readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
|
|
212
219
|
readonly schema: Joi.ObjectSchema<any>;
|
|
213
220
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
214
221
|
};
|
|
@@ -223,6 +230,7 @@ export declare const SupportedQueries: {
|
|
|
223
230
|
readonly executor: typeof import("./catalog/resolve-value-query/resolve-value-query-executor").executeResolveValueQuery;
|
|
224
231
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
225
232
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"resolve-value">;
|
|
233
|
+
readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
|
|
226
234
|
readonly schema: Joi.ObjectSchema<any>;
|
|
227
235
|
readonly flattenInvolvedNodes: () => never[];
|
|
228
236
|
};
|
|
@@ -236,6 +244,7 @@ export declare const SupportedQueries: {
|
|
|
236
244
|
readonly executor: typeof import("./catalog/origin-query/origin-query-executor").executeResolveValueQuery;
|
|
237
245
|
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
238
246
|
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"origin">;
|
|
247
|
+
readonly completer: typeof import("../cli/repl/parser/slice-query-parser").criteriaQueryCompleter;
|
|
239
248
|
readonly schema: Joi.ObjectSchema<any>;
|
|
240
249
|
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
241
250
|
};
|
|
@@ -251,6 +260,14 @@ export declare const SupportedQueries: {
|
|
|
251
260
|
__brand?: "node-id";
|
|
252
261
|
}))[];
|
|
253
262
|
};
|
|
263
|
+
readonly dice: {
|
|
264
|
+
readonly executor: typeof import("./catalog/dice-query/dice-query-executor").executeDiceQuery;
|
|
265
|
+
readonly asciiSummarizer: (formatter: OutputFormatter, _analyzer: ReadonlyFlowrAnalysisProvider<import("../r-bridge/parser").KnownParser>, queryResults: BaseQueryResult, result: string[]) => true;
|
|
266
|
+
readonly fromLine: (output: ReplOutput, line: readonly string[], _config: FlowrConfig) => ParsedQueryLine<"dice">;
|
|
267
|
+
readonly completer: (line: readonly string[], startingNewArg: boolean, _config: FlowrConfig) => CommandCompletions;
|
|
268
|
+
readonly schema: Joi.ObjectSchema<any>;
|
|
269
|
+
readonly flattenInvolvedNodes: (queryResults: BaseQueryResult) => NodeId[];
|
|
270
|
+
};
|
|
254
271
|
};
|
|
255
272
|
export type SupportedQueryTypes = keyof typeof SupportedQueries;
|
|
256
273
|
export type QueryResult<Type extends Query['type']> = Promise<ReturnType<typeof SupportedQueries[Type]['executor']>>;
|
package/queries/query.js
CHANGED
|
@@ -42,6 +42,7 @@ const does_call_query_format_1 = require("./catalog/does-call-query/does-call-qu
|
|
|
42
42
|
const inspect_exception_query_format_1 = require("./catalog/inspect-exceptions-query/inspect-exception-query-format");
|
|
43
43
|
const input_sources_query_format_1 = require("./catalog/input-sources-query/input-sources-query-format");
|
|
44
44
|
const provenance_query_format_1 = require("./catalog/provenance-query/provenance-query-format");
|
|
45
|
+
const dice_query_format_1 = require("./catalog/dice-query/dice-query-format");
|
|
45
46
|
exports.SupportedQueries = {
|
|
46
47
|
'call-context': call_context_query_format_1.CallContextQueryDefinition,
|
|
47
48
|
'config': config_query_format_1.ConfigQueryDefinition,
|
|
@@ -68,7 +69,8 @@ exports.SupportedQueries = {
|
|
|
68
69
|
'resolve-value': resolve_value_query_format_1.ResolveValueQueryDefinition,
|
|
69
70
|
'project': project_query_format_1.ProjectQueryDefinition,
|
|
70
71
|
'origin': origin_query_format_1.OriginQueryDefinition,
|
|
71
|
-
'linter': linter_query_format_1.LinterQueryDefinition
|
|
72
|
+
'linter': linter_query_format_1.LinterQueryDefinition,
|
|
73
|
+
'dice': dice_query_format_1.DiceQueryDefinition
|
|
72
74
|
};
|
|
73
75
|
/**
|
|
74
76
|
* Executes a set of queries that are all of the same type.
|
package/r-bridge/data/data.d.ts
CHANGED
|
@@ -98,6 +98,11 @@ export declare const flowrCapabilities: {
|
|
|
98
98
|
readonly id: "environment-with";
|
|
99
99
|
readonly supported: "partially";
|
|
100
100
|
readonly description: "_Evaluating an expression inside a named environment with `with(data, expr)` or `within(data, expr)`. When `data` is a tracked env variable, reads of names defined in that env resolve correctly. Writes inside `expr` are ephemeral (not persisted back to the env)._";
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "Dynamic Variable Removal";
|
|
103
|
+
readonly id: "dynamic-variable-removal";
|
|
104
|
+
readonly supported: "partially";
|
|
105
|
+
readonly description: "_Support for `rm(list=..., envir=sys.frame(N))` removing variables from a specific call frame. Currently handles negative and zero offsets from within depth-1 functions._";
|
|
101
106
|
}];
|
|
102
107
|
}, {
|
|
103
108
|
readonly name: "Environment Sharing";
|
package/r-bridge/data/data.js
CHANGED
|
@@ -136,6 +136,12 @@ ${await (0, doc_dfg_1.printDfGraphForCode)(parser, code, { simplified: true })}
|
|
|
136
136
|
id: 'environment-with',
|
|
137
137
|
supported: 'partially',
|
|
138
138
|
description: '_Evaluating an expression inside a named environment with `with(data, expr)` or `within(data, expr)`. When `data` is a tracked env variable, reads of names defined in that env resolve correctly. Writes inside `expr` are ephemeral (not persisted back to the env)._'
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: 'Dynamic Variable Removal',
|
|
142
|
+
id: 'dynamic-variable-removal',
|
|
143
|
+
supported: 'partially',
|
|
144
|
+
description: '_Support for `rm(list=..., envir=sys.frame(N))` removing variables from a specific call frame. Currently handles negative and zero offsets from within depth-1 functions._'
|
|
139
145
|
}
|
|
140
146
|
]
|
|
141
147
|
},
|
|
@@ -5,7 +5,6 @@ import { RType } from '../type';
|
|
|
5
5
|
import { SemVer } from 'semver';
|
|
6
6
|
/**
|
|
7
7
|
* Represents a string like `"hello"`, including raw strings like `r"(hello)"`.
|
|
8
|
-
* @see {@link isRString} - to check whether a node is an R string
|
|
9
8
|
*/
|
|
10
9
|
export interface RString<Info = NoInfo> extends Leaf<Info>, Location {
|
|
11
10
|
readonly type: RType.String;
|
|
@@ -6,7 +6,7 @@ import type { RSymbol } from '../../../../model/nodes/r-symbol';
|
|
|
6
6
|
import type { NoInfo } from '../../../../model/model';
|
|
7
7
|
import type { JsonEntry } from '../../../json/format';
|
|
8
8
|
/**
|
|
9
|
-
* Normalize the given object as a R number (see {@link
|
|
9
|
+
* Normalize the given object as a R number (see {@link RNumberValue.fromRLexeme}), supporting booleans (see {@link boolean2ts}),
|
|
10
10
|
* and special values.
|
|
11
11
|
* This requires you to check the corresponding name beforehand.
|
|
12
12
|
* @param data - The data used by the parser (see {@link NormalizerData})
|
|
@@ -5,7 +5,7 @@ const convert_values_1 = require("../../../../../convert-values");
|
|
|
5
5
|
const normalize_meta_1 = require("../../normalize-meta");
|
|
6
6
|
const type_1 = require("../../../../model/type");
|
|
7
7
|
/**
|
|
8
|
-
* Normalize the given object as a R number (see {@link
|
|
8
|
+
* Normalize the given object as a R number (see {@link RNumberValue.fromRLexeme}), supporting booleans (see {@link boolean2ts}),
|
|
9
9
|
* and special values.
|
|
10
10
|
* This requires you to check the corresponding name beforehand.
|
|
11
11
|
* @param data - The data used by the parser (see {@link NormalizerData})
|
|
@@ -2,7 +2,7 @@ import type { NormalizerData } from '../../normalizer-data';
|
|
|
2
2
|
import type { RString } from '../../../../model/nodes/r-string';
|
|
3
3
|
import type { JsonEntry } from '../../../json/format';
|
|
4
4
|
/**
|
|
5
|
-
* Normalize the given object as a R string (see {@link
|
|
5
|
+
* Normalize the given object as a R string (see {@link RStringValue.fromRLexeme}).
|
|
6
6
|
* This requires you to check the corresponding name beforehand.
|
|
7
7
|
* @param data - The data used by the parser (see {@link NormalizerData})
|
|
8
8
|
* @param obj - The JSON object to extract the meta-information from
|
|
@@ -6,7 +6,7 @@ const assert_1 = require("../../../../../../../util/assert");
|
|
|
6
6
|
const type_1 = require("../../../../model/type");
|
|
7
7
|
const convert_values_1 = require("../../../../../convert-values");
|
|
8
8
|
/**
|
|
9
|
-
* Normalize the given object as a R string (see {@link
|
|
9
|
+
* Normalize the given object as a R string (see {@link RStringValue.fromRLexeme}).
|
|
10
10
|
* This requires you to check the corresponding name beforehand.
|
|
11
11
|
* @param data - The data used by the parser (see {@link NormalizerData})
|
|
12
12
|
* @param obj - The JSON object to extract the meta-information from
|