@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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { NormalizedAst } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
2
2
|
import type { KnownParser } from '../../r-bridge/parser';
|
|
3
|
+
import type { GeneralDocContext } from '../wiki-mk/doc-context';
|
|
3
4
|
import type { DataflowInformation } from '../../dataflow/info';
|
|
4
5
|
import type { ControlFlowInformation } from '../../control-flow/control-flow-graph';
|
|
5
6
|
import { type CfgSimplificationPassName } from '../../control-flow/cfg-simplification';
|
|
@@ -21,9 +22,10 @@ export interface PrintCfgOptions {
|
|
|
21
22
|
readonly simplifications?: readonly CfgSimplificationPassName[];
|
|
22
23
|
readonly simplify?: boolean;
|
|
23
24
|
readonly useDfg?: boolean;
|
|
25
|
+
readonly ctx?: GeneralDocContext;
|
|
24
26
|
}
|
|
25
27
|
/**
|
|
26
28
|
* Generates and prints the control flow graph for the given code, along with optional metadata and the original code.
|
|
27
29
|
*/
|
|
28
|
-
export declare function printCfgCode(parser: KnownParser, code: string, { showCode, openCode, prefix, simplifications, simplify, useDfg }?: PrintCfgOptions): Promise<string>;
|
|
30
|
+
export declare function printCfgCode(parser: KnownParser, code: string, { showCode, openCode, prefix, simplifications, simplify, useDfg, ctx }?: PrintCfgOptions): Promise<string>;
|
|
29
31
|
export {};
|
|
@@ -36,12 +36,12 @@ ${(0, doc_code_1.codeBlock)('mermaid', (0, cfg_1.cfgToMermaid)(cfg, ast, { prefi
|
|
|
36
36
|
/**
|
|
37
37
|
* Generates and prints the control flow graph for the given code, along with optional metadata and the original code.
|
|
38
38
|
*/
|
|
39
|
-
async function printCfgCode(parser, code, { showCode = true, openCode = false, prefix = 'flowchart BT\n', simplifications = [], simplify = false, useDfg = true } = {}) {
|
|
39
|
+
async function printCfgCode(parser, code, { showCode = true, openCode = false, prefix = 'flowchart BT\n', simplifications = [], simplify = false, useDfg = true, ctx } = {}) {
|
|
40
40
|
const now = performance.now();
|
|
41
41
|
const res = await getCfg(parser, code, simplifications, useDfg);
|
|
42
42
|
const duration = performance.now() - now;
|
|
43
|
-
const metaInfo = `The analysis required _${(0, time_1.printAsMs)(duration)}_ (including the ${useDfg ? 'dataflow analysis, ' : ''} normalization${useDfg ? ', ' : ''} and parsing with the [${parser.name}](${doc_files_1.FlowrWikiBaseRef}/Engines) engine) within the generation environment.
|
|
44
|
-
We used the following simplification${(simplifications?.length ?? 0) + cfg_simplification_1.DefaultCfgSimplificationOrder.length
|
|
43
|
+
const metaInfo = `The analysis required _${(0, time_1.printAsMs)(duration)}_ (including the ${useDfg ? 'dataflow analysis, ' : ''} normalization${useDfg ? ', ' : ''} and parsing with the ${ctx ? ctx.linkPage('wiki/Engines', parser.name) : `[${parser.name}](${doc_files_1.FlowrWikiBaseRef}/Engines)`} engine) within the generation environment.
|
|
44
|
+
We used the following simplification${(simplifications?.length ?? 0) + cfg_simplification_1.DefaultCfgSimplificationOrder.length !== 1 ? 's' : ''}: ${[...cfg_simplification_1.DefaultCfgSimplificationOrder, ...simplifications].map(s => '`' + s + '`').join(', ')} ${simplify ? ' and render a simplified/compacted version' : ''}.
|
|
45
45
|
`;
|
|
46
46
|
return '\n\n' + printCfg(res.info, res.ast, prefix, simplify) + (showCode ? `
|
|
47
47
|
<details${openCode ? ' open' : ''}>
|
|
@@ -2,10 +2,11 @@ import type { DataflowGraph, UnknownSideEffect } from '../../dataflow/graph/grap
|
|
|
2
2
|
import type { DEFAULT_DATAFLOW_PIPELINE } from '../../core/steps/pipeline/default-pipelines';
|
|
3
3
|
import type { PipelineOutput } from '../../core/steps/pipeline/pipeline';
|
|
4
4
|
import type { KnownParser } from '../../r-bridge/parser';
|
|
5
|
+
import type { GeneralDocContext } from '../wiki-mk/doc-context';
|
|
5
6
|
import type { MermaidMarkdownMark } from '../../util/mermaid/info';
|
|
6
7
|
/**
|
|
7
8
|
* Visualizes the dataflow graph as a mermaid graph inside a markdown code block.
|
|
8
|
-
* Please use this only for documentation purposes, for programmatic usage use {@link
|
|
9
|
+
* Please use this only for documentation purposes, for programmatic usage use {@link DataflowMermaid.convert} directly.
|
|
9
10
|
*/
|
|
10
11
|
export declare function printDfGraph(graph: DataflowGraph, mark?: ReadonlySet<MermaidMarkdownMark>, simplified?: boolean): string;
|
|
11
12
|
/**
|
|
@@ -19,6 +20,7 @@ export interface PrintDataflowGraphOptions {
|
|
|
19
20
|
readonly switchCodeAndGraph?: boolean;
|
|
20
21
|
readonly simplified?: boolean;
|
|
21
22
|
readonly callGraph?: boolean;
|
|
23
|
+
readonly ctx?: GeneralDocContext;
|
|
22
24
|
}
|
|
23
25
|
/**
|
|
24
26
|
* Visualizes a side effect for documentation purposes.
|
|
@@ -15,7 +15,7 @@ const df_helper_1 = require("../../dataflow/graph/df-helper");
|
|
|
15
15
|
const call_graph_1 = require("../../dataflow/graph/call-graph");
|
|
16
16
|
/**
|
|
17
17
|
* Visualizes the dataflow graph as a mermaid graph inside a markdown code block.
|
|
18
|
-
* Please use this only for documentation purposes, for programmatic usage use {@link
|
|
18
|
+
* Please use this only for documentation purposes, for programmatic usage use {@link DataflowMermaid.convert} directly.
|
|
19
19
|
*/
|
|
20
20
|
function printDfGraph(graph, mark, simplified = false) {
|
|
21
21
|
return `
|
|
@@ -43,7 +43,7 @@ function formatSideEffect(ef) {
|
|
|
43
43
|
* This function returns a markdown string containing the dataflow graph as a mermaid code block,
|
|
44
44
|
* along with the R code itself in a collapsible section.
|
|
45
45
|
*/
|
|
46
|
-
async function printDfGraphForCode(parser, code, { callGraph = false, simplified = false, mark, showCode = true, codeOpen = false, exposeResult, switchCodeAndGraph = false } = {}) {
|
|
46
|
+
async function printDfGraphForCode(parser, code, { callGraph = false, simplified = false, mark, showCode = true, codeOpen = false, exposeResult, switchCodeAndGraph = false, ctx } = {}) {
|
|
47
47
|
const now = performance.now();
|
|
48
48
|
const result = await (0, default_pipelines_1.createDataflowPipeline)(parser, {
|
|
49
49
|
context: (0, flowr_analyzer_context_1.contextFromInput)(code)
|
|
@@ -52,7 +52,7 @@ async function printDfGraphForCode(parser, code, { callGraph = false, simplified
|
|
|
52
52
|
if (switchCodeAndGraph) {
|
|
53
53
|
(0, assert_1.guard)(showCode, 'can not switch code and graph if code is not shown');
|
|
54
54
|
}
|
|
55
|
-
const metaInfo = `The analysis required _${(0, time_1.printAsMs)(duration)}_ (including parse and normalize, using the [${parser.name}](${doc_files_1.FlowrWikiBaseRef}/Engines) engine) within the generation environment.`;
|
|
55
|
+
const metaInfo = `The analysis required _${(0, time_1.printAsMs)(duration)}_ (including parse and normalize, using the ${ctx ? ctx.linkPage('wiki/Engines', parser.name) : `[${parser.name}](${doc_files_1.FlowrWikiBaseRef}/Engines)`} engine) within the generation environment.`;
|
|
56
56
|
const graph = callGraph ? call_graph_1.CallGraph.compute(result.dataflow.graph) : result.dataflow.graph;
|
|
57
57
|
const dfGraph = printDfGraph(graph, mark, simplified);
|
|
58
58
|
const simplyText = simplified ? '(simplified) ' : '';
|
|
@@ -11,10 +11,12 @@ export declare const FlowrVsCode = "https://marketplace.visualstudio.com/items?i
|
|
|
11
11
|
export declare const FlowrPositron = "https://open-vsx.org/extension/code-inspect/vscode-flowr";
|
|
12
12
|
export declare const FlowrRStudioAddin = "https://github.com/flowr-analysis/rstudio-addin-flowr";
|
|
13
13
|
export declare const FlowrRAdapter = "https://github.com/flowr-analysis/flowr-r-adapter";
|
|
14
|
+
/** Converts backslashes to forward slashes (Windows paths). */
|
|
15
|
+
export declare function toPosixPath(p: string): string;
|
|
14
16
|
/**
|
|
15
17
|
* Returns a markdown link to the given file path relative to the project root.
|
|
16
18
|
*/
|
|
17
|
-
export declare function getFilePathMd(
|
|
19
|
+
export declare function getFilePathMd(filePath: string): string;
|
|
18
20
|
/**
|
|
19
21
|
* Returns the content of a file located at the given path relative to the project root.
|
|
20
22
|
* This reads the file synchronously from disk.
|
|
@@ -4,10 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.FlowrRAdapter = exports.FlowrRStudioAddin = exports.FlowrPositron = exports.FlowrVsCode = exports.FlowrCodecovRef = exports.FlowrDockerRef = exports.FlowrNpmRef = exports.FlowrGithubRef = exports.FlowrWikiBaseRef = exports.RemoteFlowrFilePathBaseRef = exports.FlowrSiteBaseRef = exports.FlowrGithubBaseRef = exports.FlowrGithubGroupName = void 0;
|
|
7
|
+
exports.toPosixPath = toPosixPath;
|
|
7
8
|
exports.getFilePathMd = getFilePathMd;
|
|
8
9
|
exports.getFileContentFromRoot = getFileContentFromRoot;
|
|
9
10
|
exports.linkFlowRSourceFile = linkFlowRSourceFile;
|
|
10
11
|
const fs_1 = __importDefault(require("fs"));
|
|
12
|
+
const path_1 = __importDefault(require("path"));
|
|
11
13
|
exports.FlowrGithubGroupName = 'flowr-analysis';
|
|
12
14
|
exports.FlowrGithubBaseRef = `https://github.com/${exports.FlowrGithubGroupName}`;
|
|
13
15
|
exports.FlowrSiteBaseRef = `https://${exports.FlowrGithubGroupName}.github.io/flowr`;
|
|
@@ -21,16 +23,17 @@ exports.FlowrVsCode = 'https://marketplace.visualstudio.com/items?itemName=code-
|
|
|
21
23
|
exports.FlowrPositron = 'https://open-vsx.org/extension/code-inspect/vscode-flowr';
|
|
22
24
|
exports.FlowrRStudioAddin = `${exports.FlowrGithubBaseRef}/rstudio-addin-flowr`;
|
|
23
25
|
exports.FlowrRAdapter = `${exports.FlowrGithubBaseRef}/flowr-r-adapter`;
|
|
26
|
+
/** Converts backslashes to forward slashes (Windows paths). */
|
|
27
|
+
function toPosixPath(p) {
|
|
28
|
+
return p.replaceAll('\\', '/');
|
|
29
|
+
}
|
|
24
30
|
/**
|
|
25
31
|
* Returns a markdown link to the given file path relative to the project root.
|
|
26
32
|
*/
|
|
27
|
-
function getFilePathMd(
|
|
33
|
+
function getFilePathMd(filePath) {
|
|
28
34
|
// we go one up as we are in doc-util now :D #convenience
|
|
29
|
-
const fullpath = require.resolve('../' +
|
|
30
|
-
|
|
31
|
-
const cwd = process.cwd().replaceAll('\\', '/');
|
|
32
|
-
const relative = fullpath.replaceAll('\\', '/').replace(cwd, '.');
|
|
33
|
-
/* remove project prefix */
|
|
35
|
+
const fullpath = require.resolve('../' + filePath);
|
|
36
|
+
const relative = './' + toPosixPath(path_1.default.relative(process.cwd(), fullpath));
|
|
34
37
|
return `[\`${relative}\`](${exports.RemoteFlowrFilePathBaseRef}${relative})`;
|
|
35
38
|
}
|
|
36
39
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ParentInformation, type RNodeWithParent } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
|
|
2
2
|
import type { KnownParser } from '../../r-bridge/parser';
|
|
3
|
+
import type { GeneralDocContext } from '../wiki-mk/doc-context';
|
|
3
4
|
import type { RProject } from '../../r-bridge/lang-4.x/ast/model/nodes/r-project';
|
|
4
5
|
/**
|
|
5
6
|
* Visualizes the normalized AST using mermaid syntax.
|
|
@@ -9,9 +10,10 @@ export declare function printNormalizedAst(ast: RProject<ParentInformation> | RN
|
|
|
9
10
|
export interface PrintNormalizedAstOptions {
|
|
10
11
|
readonly showCode?: boolean;
|
|
11
12
|
readonly prefix?: string;
|
|
13
|
+
readonly ctx?: GeneralDocContext;
|
|
12
14
|
}
|
|
13
15
|
/**
|
|
14
16
|
* Generates and prints the normalized AST for the given code, along with optional metadata and the original code.
|
|
15
17
|
* This is intended for documentation purposes.
|
|
16
18
|
*/
|
|
17
|
-
export declare function printNormalizedAstForCode(parser: KnownParser, code: string, { showCode, prefix }?: PrintNormalizedAstOptions): Promise<string>;
|
|
19
|
+
export declare function printNormalizedAstForCode(parser: KnownParser, code: string, { showCode, prefix, ctx }?: PrintNormalizedAstOptions): Promise<string>;
|
|
@@ -22,13 +22,13 @@ ${(0, ast_1.normalizedAstToMermaid)(ast, { prefix })}
|
|
|
22
22
|
* Generates and prints the normalized AST for the given code, along with optional metadata and the original code.
|
|
23
23
|
* This is intended for documentation purposes.
|
|
24
24
|
*/
|
|
25
|
-
async function printNormalizedAstForCode(parser, code, { showCode = true, prefix = 'flowchart TD\n' } = {}) {
|
|
25
|
+
async function printNormalizedAstForCode(parser, code, { showCode = true, prefix = 'flowchart TD\n', ctx } = {}) {
|
|
26
26
|
const now = performance.now();
|
|
27
27
|
const result = await (0, default_pipelines_1.createNormalizePipeline)(parser, {
|
|
28
28
|
context: (0, flowr_analyzer_context_1.contextFromInput)(code)
|
|
29
29
|
}).allRemainingSteps();
|
|
30
30
|
const duration = performance.now() - now;
|
|
31
|
-
const metaInfo = `The analysis required _${(0, time_1.printAsMs)(duration)}_ (including parsing with the [${parser.name}](${doc_files_1.FlowrWikiBaseRef}/Engines) engine) within the generation environment.`;
|
|
31
|
+
const metaInfo = `The analysis required _${(0, time_1.printAsMs)(duration)}_ (including parsing with the ${ctx ? ctx.linkPage('wiki/Engines', parser.name) : `[${parser.name}](${doc_files_1.FlowrWikiBaseRef}/Engines)`} engine) within the generation environment.`;
|
|
32
32
|
return '\n\n' + printNormalizedAst(result.normalize.ast, prefix) + (showCode ? `
|
|
33
33
|
<details>
|
|
34
34
|
|
|
@@ -10,11 +10,12 @@ export interface ShowQueryOptions {
|
|
|
10
10
|
readonly collapseResult?: boolean;
|
|
11
11
|
readonly collapseQuery?: boolean;
|
|
12
12
|
readonly shorthand?: string;
|
|
13
|
+
readonly ctx?: GeneralDocContext;
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* Visualizes a query and its results in markdown format.
|
|
16
17
|
*/
|
|
17
|
-
export declare function showQuery<Base extends SupportedQueryTypes, VirtualArguments extends VirtualCompoundConstraint<Base> = VirtualCompoundConstraint<Base>>(parser: KnownParser, code: string, queries: Queries<Base, VirtualArguments>, { showCode, collapseResult, collapseQuery, shorthand }?: ShowQueryOptions): Promise<string>;
|
|
18
|
+
export declare function showQuery<Base extends SupportedQueryTypes, VirtualArguments extends VirtualCompoundConstraint<Base> = VirtualCompoundConstraint<Base>>(parser: KnownParser, code: string, queries: Queries<Base, VirtualArguments>, { showCode, collapseResult, collapseQuery, shorthand, ctx }?: ShowQueryOptions): Promise<string>;
|
|
18
19
|
export interface QueryDocumentation {
|
|
19
20
|
readonly name: string;
|
|
20
21
|
readonly type: 'virtual' | 'active';
|
|
@@ -19,7 +19,7 @@ const doc_cli_option_1 = require("./doc-cli-option");
|
|
|
19
19
|
/**
|
|
20
20
|
* Visualizes a query and its results in markdown format.
|
|
21
21
|
*/
|
|
22
|
-
async function showQuery(parser, code, queries, { showCode, collapseResult, collapseQuery, shorthand } = {}) {
|
|
22
|
+
async function showQuery(parser, code, queries, { showCode, collapseResult, collapseQuery, shorthand, ctx } = {}) {
|
|
23
23
|
const now = performance.now();
|
|
24
24
|
const analyzer = await new flowr_analyzer_builder_1.FlowrAnalyzerBuilder().setParser(parser).build();
|
|
25
25
|
analyzer.addRequest(code);
|
|
@@ -53,7 +53,7 @@ ${await (0, query_print_1.asciiSummaryOfQueryResult)(ansi_1.markdownFormatter, d
|
|
|
53
53
|
${metaInfo}
|
|
54
54
|
|
|
55
55
|
In general, the JSON contains the Ids of the nodes in question as they are present in the normalized AST or the dataflow graph of flowR.
|
|
56
|
-
Please consult the [Interface](${doc_files_1.FlowrWikiBaseRef}/Interface) wiki page for more information on how to get those.
|
|
56
|
+
Please consult the ${ctx ? ctx.linkPage('wiki/Interface', 'Interface') : `[Interface](${doc_files_1.FlowrWikiBaseRef}/Interface)`} wiki page for more information on how to get those.
|
|
57
57
|
|
|
58
58
|
${(0, doc_code_1.jsonWithLimit)(results)}
|
|
59
59
|
|
|
@@ -59,6 +59,7 @@ async function documentReplSession(parser, commands, options) {
|
|
|
59
59
|
const entry = { command, lines: [] };
|
|
60
60
|
const collectingOutput = {
|
|
61
61
|
formatter: ansi_1.voidFormatter,
|
|
62
|
+
allowClipboard: false,
|
|
62
63
|
stdout(msg) {
|
|
63
64
|
entry.lines.push(dropAnsiEscapeCodesAndCodeTags(msg));
|
|
64
65
|
},
|
|
@@ -57,7 +57,7 @@ export declare function removeCommentSymbolsFromTypeScriptComment(comment: strin
|
|
|
57
57
|
export declare function getStartLineOfTypeScriptNode(node: ts.Node, sourceFile: ts.SourceFile): number;
|
|
58
58
|
/**
|
|
59
59
|
* Return the link to the type in the source code.
|
|
60
|
-
* If you create a wiki, please refer to the functions provided by the {@link
|
|
60
|
+
* If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
|
|
61
61
|
*/
|
|
62
62
|
export declare function getTypePathLink(elem: Pick<TypeElementInSource, 'filePath' | 'lineNumber'>, relative?: boolean): string;
|
|
63
63
|
export interface MermaidClassDiagramArguments {
|
|
@@ -111,7 +111,7 @@ export interface PrintHierarchyArguments {
|
|
|
111
111
|
export declare const mermaidHide: string[];
|
|
112
112
|
/**
|
|
113
113
|
* Print the hierarchy of types starting from the given root.
|
|
114
|
-
* If you create a wiki, please refer to the functions provided by the {@link
|
|
114
|
+
* If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
|
|
115
115
|
*/
|
|
116
116
|
export declare function printHierarchy({ program, info, root, ignoredTypes, collapseFromNesting, initialNesting, maxDepth, skipNesting, openTop, showImplSnippet, reverse }: PrintHierarchyArguments): string;
|
|
117
117
|
/**
|
|
@@ -135,14 +135,14 @@ export interface FnElementInfo {
|
|
|
135
135
|
}
|
|
136
136
|
/**
|
|
137
137
|
* Print an element from the info as code block.
|
|
138
|
-
* If you create a wiki, please refer to the functions provided by the {@link
|
|
138
|
+
* If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
|
|
139
139
|
*
|
|
140
140
|
* This is great to show examples that are directly taken from the source code.
|
|
141
141
|
*/
|
|
142
142
|
export declare function printCodeOfElement(info: FnElementInfo, name: string): string;
|
|
143
143
|
/**
|
|
144
144
|
* Print a source file as code block.
|
|
145
|
-
* If you create a wiki, please refer to the functions provided by the {@link
|
|
145
|
+
* If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
|
|
146
146
|
*
|
|
147
147
|
* This is great to show examples that are directly taken from the source code.
|
|
148
148
|
*/
|
|
@@ -161,7 +161,7 @@ export declare function printCodeOfFile(info: FnElementInfo, relativePath: strin
|
|
|
161
161
|
export declare function shortLink(name: string, hierarchy: readonly TypeElementInSource[], codeStyle?: boolean, realNameWrapper?: string, fuzzy?: boolean, type?: TypeElementKind): string;
|
|
162
162
|
/**
|
|
163
163
|
* Create a short link to a type in the documentation.
|
|
164
|
-
* If you create a wiki, please refer to the functions provided by the {@link
|
|
164
|
+
* If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
|
|
165
165
|
* @param name - The name of the type, e.g. `MyType`, may include a container, e.g.,`MyContainer::MyType` (this works with function nestings too)
|
|
166
166
|
* Use `:::` if you want to access a scoped function, but the name should be displayed without the scope
|
|
167
167
|
* @param hierarchy - The hierarchy of types to search in
|
|
@@ -173,7 +173,7 @@ export interface GetDocumentationForTypeFilters {
|
|
|
173
173
|
}
|
|
174
174
|
/**
|
|
175
175
|
* Retrieve documentation comments for a type.
|
|
176
|
-
* If you create a wiki, please refer to the functions provided by the {@link
|
|
176
|
+
* If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
|
|
177
177
|
* @param name - The name of the type, e.g. `MyType`, may include a container, e.g.,`MyContainer::MyType` (this works with function nestings too)
|
|
178
178
|
* Use `:::` if you want to access a scoped function, but the name should be displayed without the scope
|
|
179
179
|
* @param hierarchy - The hierarchy of types to search in
|
|
@@ -89,8 +89,10 @@ const options = {
|
|
|
89
89
|
*/
|
|
90
90
|
function getTypeScriptSourceFiles(fileNames) {
|
|
91
91
|
try {
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
// keeps wiki/doc links consistent across OSes (Windows uses backslashes)
|
|
93
|
+
const normalizedFileNames = fileNames.map(doc_files_1.toPosixPath);
|
|
94
|
+
const program = typescript_1.default.createProgram(normalizedFileNames, options);
|
|
95
|
+
return { program, files: normalizedFileNames.map(fileName => program.getSourceFile(fileName)).filter(file => !!file) };
|
|
94
96
|
}
|
|
95
97
|
catch (err) {
|
|
96
98
|
console.error('Failed to get source files', err);
|
|
@@ -352,7 +354,7 @@ function getTypePathForTypeScript({ filePath }) {
|
|
|
352
354
|
}
|
|
353
355
|
/**
|
|
354
356
|
* Return the link to the type in the source code.
|
|
355
|
-
* If you create a wiki, please refer to the functions provided by the {@link
|
|
357
|
+
* If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
|
|
356
358
|
*/
|
|
357
359
|
function getTypePathLink(elem, relative = false) {
|
|
358
360
|
const fromSource = getTypePathForTypeScript(elem);
|
|
@@ -492,7 +494,7 @@ function implSnippet(node, program, showName = true, nesting = 0, open = false,
|
|
|
492
494
|
exports.mermaidHide = ['MergeableRecord', 'Leaf', 'Location', 'Namespace', 'Base', 'WithChildren', 'Partial', 'RAccessBase'];
|
|
493
495
|
/**
|
|
494
496
|
* Print the hierarchy of types starting from the given root.
|
|
495
|
-
* If you create a wiki, please refer to the functions provided by the {@link
|
|
497
|
+
* If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
|
|
496
498
|
*/
|
|
497
499
|
function printHierarchy({ program, info, root, ignoredTypes, collapseFromNesting = 1, initialNesting = 0, maxDepth = 20, skipNesting = 0, openTop, showImplSnippet = true, reverse = false }) {
|
|
498
500
|
if (initialNesting > maxDepth) {
|
|
@@ -532,7 +534,7 @@ function printHierarchy({ program, info, root, ignoredTypes, collapseFromNesting
|
|
|
532
534
|
}
|
|
533
535
|
/**
|
|
534
536
|
* Print an element from the info as code block.
|
|
535
|
-
* If you create a wiki, please refer to the functions provided by the {@link
|
|
537
|
+
* If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
|
|
536
538
|
*
|
|
537
539
|
* This is great to show examples that are directly taken from the source code.
|
|
538
540
|
*/
|
|
@@ -547,12 +549,12 @@ function printCodeOfElement(info, name) {
|
|
|
547
549
|
}
|
|
548
550
|
/**
|
|
549
551
|
* Print a source file as code block.
|
|
550
|
-
* If you create a wiki, please refer to the functions provided by the {@link
|
|
552
|
+
* If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
|
|
551
553
|
*
|
|
552
554
|
* This is great to show examples that are directly taken from the source code.
|
|
553
555
|
*/
|
|
554
556
|
function printCodeOfFile(info, relativePath) {
|
|
555
|
-
const fullPath = path_1.default.resolve(__dirname, `../../../${relativePath}`);
|
|
557
|
+
const fullPath = (0, doc_files_1.toPosixPath)(path_1.default.resolve(__dirname, `../../../${relativePath}`));
|
|
556
558
|
const code = info.program.getSourceFile(fullPath)?.getFullText().trim();
|
|
557
559
|
if (!code) {
|
|
558
560
|
console.error(`Could not find source file ${relativePath}!`);
|
|
@@ -649,7 +651,7 @@ function shortLink(name, hierarchy, codeStyle = true, realNameWrapper = 'b', fuz
|
|
|
649
651
|
}
|
|
650
652
|
/**
|
|
651
653
|
* Create a short link to a type in the documentation.
|
|
652
|
-
* If you create a wiki, please refer to the functions provided by the {@link
|
|
654
|
+
* If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
|
|
653
655
|
* @param name - The name of the type, e.g. `MyType`, may include a container, e.g.,`MyContainer::MyType` (this works with function nestings too)
|
|
654
656
|
* Use `:::` if you want to access a scoped function, but the name should be displayed without the scope
|
|
655
657
|
* @param hierarchy - The hierarchy of types to search in
|
|
@@ -665,7 +667,7 @@ function shortLinkFile(name, hierarchy) {
|
|
|
665
667
|
}
|
|
666
668
|
/**
|
|
667
669
|
* Retrieve documentation comments for a type.
|
|
668
|
-
* If you create a wiki, please refer to the functions provided by the {@link
|
|
670
|
+
* If you create a wiki, please refer to the functions provided by the {@link GeneralDocContext}.
|
|
669
671
|
* @param name - The name of the type, e.g. `MyType`, may include a container, e.g.,`MyContainer::MyType` (this works with function nestings too)
|
|
670
672
|
* Use `:::` if you want to access a scoped function, but the name should be displayed without the scope
|
|
671
673
|
* @param hierarchy - The hierarchy of types to search in
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.IssueLintingRule = void 0;
|
|
4
4
|
const linter_tags_1 = require("../linter/linter-tags");
|
|
5
5
|
const doc_general_1 = require("./doc-util/doc-general");
|
|
6
|
-
const doc_files_1 = require("./doc-util/doc-files");
|
|
7
6
|
const linter_rules_1 = require("../linter/linter-rules");
|
|
8
7
|
const doc_maker_1 = require("./wiki-mk/doc-maker");
|
|
9
8
|
/* this prints the yaml configuration for the GitHub issue template to request a new linter rule / an update */
|
|
@@ -30,7 +29,7 @@ body:
|
|
|
30
29
|
- type: markdown
|
|
31
30
|
attributes:
|
|
32
31
|
value: |
|
|
33
|
-
Thank you for suggesting a new linting rule or an improvement to an existing one. Please provide as much detail as possible to help us understand your request. See the
|
|
32
|
+
Thank you for suggesting a new linting rule or an improvement to an existing one. Please provide as much detail as possible to help us understand your request. See the ${ctx.linkPage('wiki/Linter', 'Linter Wiki Page')} for more information.
|
|
34
33
|
- type: textarea
|
|
35
34
|
id: description
|
|
36
35
|
attributes:
|
|
@@ -94,14 +94,14 @@ ${(0, doc_structure_1.section)('Overview', 2)}
|
|
|
94
94
|
No matter whether you want to analyze a single R script, a couple of R notebooks, a complete project, or an R package,
|
|
95
95
|
your journey starts with the ${ctx.link(flowr_analyzer_builder_1.FlowrAnalyzerBuilder)} (further described in [Builder Configuration](#builder-configuration) below).
|
|
96
96
|
This builder allows you to configure the analysis in many different ways, for example, by specifying which [plugins](#Plugins) to use or
|
|
97
|
-
what
|
|
97
|
+
what ${ctx.linkPage('wiki/Engines', 'engine')} to use for the analysis.
|
|
98
98
|
|
|
99
99
|
When building the ${ctx.link(flowr_analyzer_1.FlowrAnalyzer)} instance, the builder will take care to
|
|
100
100
|
|
|
101
101
|
* load the [requested plugins](#Plugins)
|
|
102
102
|
* setup an initial [context](#Context_Information)
|
|
103
103
|
* create a [cache](#Caching) for speeding up future analyses
|
|
104
|
-
* initialize the
|
|
104
|
+
* initialize the ${ctx.linkPage('wiki/Engines', 'engine')} (e.g., TreeSitter) if needed
|
|
105
105
|
|
|
106
106
|
The builder provides two methods for building the analyzer:
|
|
107
107
|
|
|
@@ -141,19 +141,19 @@ Please make sure to add all of the files, folder, and projects you want to analy
|
|
|
141
141
|
${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'addRequest')} method (or ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'addFile')} for virtual files).
|
|
142
142
|
Afterwards, you can request different kinds of analysis results, such as:
|
|
143
143
|
|
|
144
|
-
* ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'parse')} to get the parsed information by the respective
|
|
144
|
+
* ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'parse')} to get the parsed information by the respective ${ctx.linkPage('wiki/Engines', 'engine')}\\
|
|
145
145
|
You can also use ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'peekParse', { codeFont: true, realNameWrapper: 'i' })} to inspect the parse information if it was already computed (but without triggering a computation).
|
|
146
146
|
With ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'parserInformation', { codeFont: true, realNameWrapper: 'i' })}, you get additional information on the parser used for the analysis.
|
|
147
|
-
* ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'normalize')} to compute the
|
|
147
|
+
* ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'normalize')} to compute the ${ctx.linkPage('wiki/Normalized AST', 'Normalized AST')}\\
|
|
148
148
|
Likewise, ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'peekNormalize', { codeFont: true, realNameWrapper: 'i' })} returns the normalized AST if it was already computed but without triggering a computation.
|
|
149
|
-
* ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'dataflow')} to compute the
|
|
149
|
+
* ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'dataflow')} to compute the ${ctx.linkPage('wiki/Dataflow Graph', 'Dataflow Graph')}\\
|
|
150
150
|
Again, ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'peekDataflow', { codeFont: true, realNameWrapper: 'i' })} allows you to inspect the dataflow graph if it was already computed (but without triggering a computation).
|
|
151
|
-
* ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'controlflow')} to compute the
|
|
151
|
+
* ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'controlflow')} to compute the ${ctx.linkPage('wiki/Control Flow Graph', 'Control Flow Graph')}\\
|
|
152
152
|
Also, ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'peekControlflow', { codeFont: true, realNameWrapper: 'i' })} returns the control flow graph if it was already computed but without triggering a computation.
|
|
153
153
|
* ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'callGraph')} to compute the ${ctx.linkPage('wiki/Dataflow Graph', 'call graph', 'perspectives-cg')} of the analyzed code\\
|
|
154
154
|
Likewise, ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'peekCallGraph', { codeFont: true, realNameWrapper: 'i' })} allows you to inspect the call graph if it was already computed (but without triggering a computation).
|
|
155
|
-
* ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'query')} to run
|
|
156
|
-
* ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'runSearch')} to run a search query on the analyzed code using the
|
|
155
|
+
* ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'query')} to run ${ctx.linkPage('wiki/Query API', 'queries')} on the analyzed code.
|
|
156
|
+
* ${ctx.linkM(flowr_analyzer_1.FlowrAnalyzer, 'runSearch')} to run a search query on the analyzed code using the ${ctx.linkPage('wiki/Search API', 'search API')}
|
|
157
157
|
|
|
158
158
|
We work on providing a set of example repositories that demonstrate how to use the analyzer in different scenarios:
|
|
159
159
|
|
|
@@ -171,7 +171,7 @@ The following sections highlight some of the most important configuration option
|
|
|
171
171
|
|
|
172
172
|
${(0, doc_structure_1.section)('Configuring flowR', 3)}
|
|
173
173
|
|
|
174
|
-
You can fundamentally change the behavior of flowR using the
|
|
174
|
+
You can fundamentally change the behavior of flowR using the ${ctx.linkPage('wiki/Interface', 'config file', 'configuring-flowr')},
|
|
175
175
|
embedded in the interface ${ctx.link(config_1.FlowrConfig)}.
|
|
176
176
|
With the builder you can either provide a complete configuration or amend the default configuration using:
|
|
177
177
|
|