@eagleoutice/flowr 2.10.8 → 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 +106 -36
- 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 -0
- package/config.js +23 -1
- package/control-flow/diff-cfg.d.ts +1 -1
- package/control-flow/diff-cfg.js +1 -1
- package/control-flow/extract-cfg.js +9 -3
- 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 +22 -3
- package/dataflow/graph/df-helper.d.ts +6 -0
- package/dataflow/graph/df-helper.js +33 -0
- package/dataflow/graph/graph.js +7 -3
- package/dataflow/info.d.ts +1 -1
- package/dataflow/info.js +3 -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-expression-list.js +3 -1
- 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 +19 -0
- 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/model/processing/decorate.js +10 -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 +63 -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 +57 -1
- package/util/proc.d.ts +6 -0
- package/util/proc.js +20 -0
- package/util/version.js +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.WikiCfg = void 0;
|
|
4
|
-
const doc_files_1 = require("./doc-util/doc-files");
|
|
5
4
|
const doc_cli_option_1 = require("./doc-util/doc-cli-option");
|
|
6
5
|
const doc_structure_1 = require("./doc-util/doc-structure");
|
|
7
6
|
const doc_cfg_1 = require("./doc-util/doc-cfg");
|
|
@@ -120,18 +119,18 @@ class WikiCfg extends doc_maker_1.DocMaker {
|
|
|
120
119
|
}
|
|
121
120
|
async text({ ctx, shell }) {
|
|
122
121
|
return `
|
|
123
|
-
_flowR_ produces three main perspectives of the program: 1) a
|
|
124
|
-
and 2) a
|
|
125
|
-
flowR uses this CFG interweaved with its data flow analysis and for some of its queries (e.g., to link to the last call in a
|
|
122
|
+
_flowR_ produces three main perspectives of the program: 1) a ${ctx.linkPage('wiki/Normalized AST', 'normalized version of the AST')}
|
|
123
|
+
and 2) a ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graph')}, and 3) a control flow graph (CFG).
|
|
124
|
+
flowR uses this CFG interweaved with its data flow analysis and for some of its queries (e.g., to link to the last call in a ${ctx.linkPage('wiki/Query API', 'Call-Context Query', 'call-context-query')}).
|
|
126
125
|
|
|
127
|
-
Please note that, mostly due to historical reasons, the
|
|
126
|
+
Please note that, mostly due to historical reasons, the ${ctx.linkPage('wiki/Dataflow Graph', 'control dependencies', 'control-dependencies')} that are stored directly within the
|
|
128
127
|
DFG provide only a partial view of the CFG. While they provide you with information on the conditional execution of vertices, they do not encode the order of execution.
|
|
129
128
|
In contrast, the CFG describes a complete view of the program's control flow.
|
|
130
129
|
|
|
131
130
|
${(0, doc_structure_1.block)({
|
|
132
131
|
type: 'TIP',
|
|
133
132
|
content: `If you want to investigate the Control Flow Graph,
|
|
134
|
-
you can use the ${(0, doc_cli_option_1.getReplCommand)('controlflow*')} command in the REPL (see the
|
|
133
|
+
you can use the ${(0, doc_cli_option_1.getReplCommand)('controlflow*')} command in the REPL (see the ${ctx.linkPage('wiki/Interface', 'Interface wiki page')} for more information).
|
|
135
134
|
By default, this view does _not_ use basic blocks as, for example, R allows unconditional jumps to occur in spots where conventional languages would assume expressions (e.g., if-conditions).
|
|
136
135
|
Yet, by using ${(0, doc_cli_option_1.getReplCommand)('controlflowbb*')} you can inspect the CFG with basic blocks (although you have to keep in mind that now, there can be a value flow between basic blocks)`
|
|
137
136
|
})}
|
|
@@ -163,39 +162,39 @@ ${(0, doc_code_1.codeBlock)('r', 'x <- 2 * 3 + 1')}
|
|
|
163
162
|
|
|
164
163
|
The corresponding CFG is a directed, labeled graph with two types of edges (control and flow dependencies).
|
|
165
164
|
|
|
166
|
-
${await (0, doc_cfg_1.printCfgCode)(shell, 'x <- 2 * 3 + 1', { showCode: false, prefix: 'flowchart RL\n' })}
|
|
165
|
+
${await (0, doc_cfg_1.printCfgCode)(shell, 'x <- 2 * 3 + 1', { showCode: false, prefix: 'flowchart RL\n', ctx })}
|
|
167
166
|
|
|
168
167
|
${(0, doc_structure_1.block)({
|
|
169
168
|
type: 'IMPORTANT',
|
|
170
169
|
content: 'As the edges describe dependencies they point in the inverse order of execution (which is very helpful for backward analyses)! The [visitors](#cfg-working) abstract away from this and there is no harm in considering an inverted CFG. Yet, you should keep this in mind!'
|
|
171
170
|
})}
|
|
172
171
|
|
|
173
|
-
Every normalized node of the
|
|
174
|
-
execution is added and automatically linked using its id (similarly to vertices of the
|
|
172
|
+
Every normalized node of the ${ctx.linkPage('wiki/Normalized AST', 'normalized AST')} that has any relevance to the
|
|
173
|
+
execution is added and automatically linked using its id (similarly to vertices of the ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graph')}).
|
|
175
174
|
Expressions, such as \`2 * 3\` get an additional node with an artificial id that ends in \`-exit\` to mark whenever their calculation is over.
|
|
176
175
|
|
|
177
176
|
To gain a better understanding, let's have a look at a simple program with a single branching structure:
|
|
178
177
|
|
|
179
|
-
${await (0, doc_cfg_1.printCfgCode)(shell, 'if(u) 3 else 2', { showCode: true, openCode: false, prefix: 'flowchart RL\n' })}
|
|
178
|
+
${await (0, doc_cfg_1.printCfgCode)(shell, 'if(u) 3 else 2', { showCode: true, openCode: false, prefix: 'flowchart RL\n', ctx })}
|
|
180
179
|
|
|
181
180
|
Here, you can see the \`if\` node followed by the condition (in this case merely \`u\`) that then splits into two branches for the two possible outcomes.
|
|
182
181
|
The \`if\` structure is terminated by the corresponding \`-exit\` node (see the [structure](#cfg-structure) section for more details).
|
|
183
182
|
|
|
184
183
|
For you to compare, the following shows the CFG of an \`if\` without an \`else\` branch:
|
|
185
184
|
|
|
186
|
-
${await (0, doc_cfg_1.printCfgCode)(shell, 'if(u || v) 3', { showCode: true, openCode: false, prefix: 'flowchart RL\n' })}
|
|
185
|
+
${await (0, doc_cfg_1.printCfgCode)(shell, 'if(u || v) 3', { showCode: true, openCode: false, prefix: 'flowchart RL\n', ctx })}
|
|
187
186
|
|
|
188
187
|
Activating the calculation of basic blocks produces the following:
|
|
189
188
|
|
|
190
|
-
${await (0, doc_cfg_1.printCfgCode)(shell, 'if(u || v) 3', { showCode: true, openCode: false, prefix: 'flowchart RL\n', simplifications: ['to-basic-blocks'] })}
|
|
189
|
+
${await (0, doc_cfg_1.printCfgCode)(shell, 'if(u || v) 3', { showCode: true, openCode: false, prefix: 'flowchart RL\n', simplifications: ['to-basic-blocks'], ctx })}
|
|
191
190
|
|
|
192
191
|
Which is probably much more readable if compacted (although the reconstucted code can sometimes be slightly mislieading as flowR tries its best to make it syntactically correct and hence add closing braces etc. which are technically not part of the respective block):
|
|
193
192
|
|
|
194
|
-
${await (0, doc_cfg_1.printCfgCode)(shell, 'if(u || v) 3', { showCode: true, openCode: false, prefix: 'flowchart RL\n', simplifications: ['to-basic-blocks'], simplify: true })}
|
|
193
|
+
${await (0, doc_cfg_1.printCfgCode)(shell, 'if(u || v) 3', { showCode: true, openCode: false, prefix: 'flowchart RL\n', simplifications: ['to-basic-blocks'], simplify: true, ctx })}
|
|
195
194
|
|
|
196
195
|
The control flow graph also harmonizes with function definitions, and calls:
|
|
197
196
|
|
|
198
|
-
${await (0, doc_cfg_1.printCfgCode)(shell, 'f <- function() { 3 }\nf()', { showCode: true, openCode: true, prefix: 'flowchart RL\n' })}
|
|
197
|
+
${await (0, doc_cfg_1.printCfgCode)(shell, 'f <- function() { 3 }\nf()', { showCode: true, openCode: true, prefix: 'flowchart RL\n', ctx })}
|
|
199
198
|
|
|
200
199
|
${(0, doc_structure_1.section)('Structure of the Control Flow Graph', 2, 'cfg-structure')}
|
|
201
200
|
|
|
@@ -237,7 +236,7 @@ Blocks are visualized as boxes around the contained vertices.
|
|
|
237
236
|
${(0, doc_structure_1.block)({
|
|
238
237
|
type: 'NOTE',
|
|
239
238
|
content: `
|
|
240
|
-
Every CFG vertex has a ${ctx.link('NodeId')} that links it to the
|
|
239
|
+
Every CFG vertex has a ${ctx.link('NodeId')} that links it to the ${ctx.linkPage('wiki/Normalized AST', 'normalized AST')} (although basic blocks will find no counterpart as they are a structuring element of the CFG).
|
|
241
240
|
Additionally, it may provide information on the called functions (in case that the current element is a function call).
|
|
242
241
|
Have a look at the ${ctx.link('CfgBaseVertexWithMarker')} interface for more information.
|
|
243
242
|
`.trim()
|
|
@@ -253,7 +252,7 @@ ${(0, doc_structure_1.section)('Flow Dependencies', 4, 'cfg-flow-dependency')}
|
|
|
253
252
|
The most common edge is the flow dependency (FD) which simply signals that the source vertex happens _after_ the target vertex in the control flow.
|
|
254
253
|
So \`x; y\` would produce a flow dependency from \`y\` to \`x\` (additionally to the program-enveloping root expression list):
|
|
255
254
|
|
|
256
|
-
${await (0, doc_cfg_1.printCfgCode)(shell, 'x; y', { showCode: false, prefix: 'flowchart RL\n' })}
|
|
255
|
+
${await (0, doc_cfg_1.printCfgCode)(shell, 'x; y', { showCode: false, prefix: 'flowchart RL\n', ctx })}
|
|
257
256
|
|
|
258
257
|
${(0, doc_structure_1.section)('Control Dependencies', 4, 'cfg-control-dependency')}
|
|
259
258
|
|
|
@@ -266,12 +265,12 @@ The extra \`caused\` link signals the vertex that caused the control flow influe
|
|
|
266
265
|
|
|
267
266
|
|
|
268
267
|
${await (async () => {
|
|
269
|
-
const exa = await (0, doc_cfg_1.printCfgCode)(shell, 'if(u) 3 else 2', { showCode: true, prefix: 'flowchart RL\n' });
|
|
268
|
+
const exa = await (0, doc_cfg_1.printCfgCode)(shell, 'if(u) 3 else 2', { showCode: true, prefix: 'flowchart RL\n', ctx });
|
|
270
269
|
return (0, doc_structure_1.details)('Example: if-else', exa);
|
|
271
270
|
})()}
|
|
272
271
|
|
|
273
272
|
${await (async () => {
|
|
274
|
-
const exa = await (0, doc_cfg_1.printCfgCode)(shell, 'while(u) b', { showCode: true, prefix: 'flowchart RL\n' });
|
|
273
|
+
const exa = await (0, doc_cfg_1.printCfgCode)(shell, 'while(u) b', { showCode: true, prefix: 'flowchart RL\n', ctx });
|
|
275
274
|
return (0, doc_structure_1.details)('Example: while-loop', exa);
|
|
276
275
|
})()}
|
|
277
276
|
<br/>
|
|
@@ -281,12 +280,12 @@ Additionally, the control flow graph does not have to be connected. If you use a
|
|
|
281
280
|
the corresponding exit markers are not reachable from the entry:
|
|
282
281
|
|
|
283
282
|
${await (async () => {
|
|
284
|
-
const exa = await (0, doc_cfg_1.printCfgCode)(shell, 'repeat { b }; after', { showCode: true, prefix: 'flowchart RL\n' });
|
|
283
|
+
const exa = await (0, doc_cfg_1.printCfgCode)(shell, 'repeat { b }; after', { showCode: true, prefix: 'flowchart RL\n', ctx });
|
|
285
284
|
return (0, doc_structure_1.details)('Example: repeat-loop (infinite)', exa);
|
|
286
285
|
})()}
|
|
287
286
|
|
|
288
287
|
${await (async () => {
|
|
289
|
-
const exa = await (0, doc_cfg_1.printCfgCode)(shell, 'repeat { b; if(u) break; }; after', { showCode: true, prefix: 'flowchart RL\n' });
|
|
288
|
+
const exa = await (0, doc_cfg_1.printCfgCode)(shell, 'repeat { b; if(u) break; }; after', { showCode: true, prefix: 'flowchart RL\n', ctx });
|
|
290
289
|
return (0, doc_structure_1.details)('Example: repeat-loop (with break)', exa);
|
|
291
290
|
})()}
|
|
292
291
|
<br/>
|
|
@@ -294,22 +293,22 @@ ${await (async () => {
|
|
|
294
293
|
In the context of a for-loop, the control dependency refer to whether the respective vector still has values to iterate over.
|
|
295
294
|
|
|
296
295
|
${await (async () => {
|
|
297
|
-
const exa = await (0, doc_cfg_1.printCfgCode)(shell, 'for(i in 1:10) b', { showCode: true, prefix: 'flowchart RL\n' });
|
|
296
|
+
const exa = await (0, doc_cfg_1.printCfgCode)(shell, 'for(i in 1:10) b', { showCode: true, prefix: 'flowchart RL\n', ctx });
|
|
298
297
|
return (0, doc_structure_1.details)('Example: for-loop', exa);
|
|
299
298
|
})()}
|
|
300
299
|
|
|
301
300
|
${(0, doc_structure_1.section)('Extra: Call Links', 4, 'cfg-call-links')}
|
|
302
301
|
|
|
303
302
|
If you generate the CFG with the ${ctx.link(extract_cfg_1.extractCfg)} function you can (and, if you want to gain inter-procedural information, should)
|
|
304
|
-
pass a matching
|
|
303
|
+
pass a matching ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graph')} to it to incorporate the dataflow perspective into the CFG.
|
|
305
304
|
|
|
306
305
|
The difference becomes obvious when we look at the code \`f <- function() b; f()\` first without the dataflow graph:
|
|
307
306
|
|
|
308
|
-
${await (0, doc_cfg_1.printCfgCode)(shell, 'f <- function() b; f()', { showCode: true, prefix: 'flowchart RL\n', useDfg: false })}
|
|
307
|
+
${await (0, doc_cfg_1.printCfgCode)(shell, 'f <- function() b; f()', { showCode: true, prefix: 'flowchart RL\n', useDfg: false, ctx })}
|
|
309
308
|
|
|
310
309
|
And now, including dataflow information:
|
|
311
310
|
|
|
312
|
-
${await (0, doc_cfg_1.printCfgCode)(shell, 'f <- function() b; f()', { showCode: true, prefix: 'flowchart RL\n', useDfg: true })}
|
|
311
|
+
${await (0, doc_cfg_1.printCfgCode)(shell, 'f <- function() b; f()', { showCode: true, prefix: 'flowchart RL\n', useDfg: true, ctx })}
|
|
313
312
|
|
|
314
313
|
There are two important additions:
|
|
315
314
|
|
|
@@ -317,14 +316,14 @@ There are two important additions:
|
|
|
317
316
|
This marker always follows the exit marker of the function call and links not just the call but also the exit points of the function definition.
|
|
318
317
|
2. A new _calls_ attribute attached to the function call vertex. This holds the ${ctx.link('NodeId')} of the function definitions that are called from this vertex.
|
|
319
318
|
|
|
320
|
-
For built-in functions that are provided by flowR's built-in configuration (see the
|
|
319
|
+
For built-in functions that are provided by flowR's built-in configuration (see the ${ctx.linkPage('wiki/Interface', 'interface wiki page')}) the CFG does not contain
|
|
321
320
|
the additional information directly:
|
|
322
321
|
|
|
323
|
-
${await (0, doc_cfg_1.printCfgCode)(shell, 'print(3)', { showCode: true, prefix: 'flowchart RL\n' })}
|
|
322
|
+
${await (0, doc_cfg_1.printCfgCode)(shell, 'print(3)', { showCode: true, prefix: 'flowchart RL\n', ctx })}
|
|
324
323
|
|
|
325
|
-
This is due to the fact that the
|
|
324
|
+
This is due to the fact that the ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graph')} does contain the required call information (and there are no new control vertices to add as the built-in call has no target in the source code):
|
|
326
325
|
|
|
327
|
-
${await (0, doc_dfg_1.printDfGraphForCode)(shell, 'print(3)', { showCode: true })}
|
|
326
|
+
${await (0, doc_dfg_1.printDfGraphForCode)(shell, 'print(3)', { showCode: true, ctx })}
|
|
328
327
|
|
|
329
328
|
${(0, doc_structure_1.section)('Adding Basic Blocks', 3, 'cfg-basic-blocks')}
|
|
330
329
|
|
|
@@ -335,16 +334,16 @@ Yet, we can request basic blocks or transform an existing CFG into basic blocks
|
|
|
335
334
|
|
|
336
335
|
Any program without any (un-)conditional jumps now contains a single basic block:
|
|
337
336
|
|
|
338
|
-
${await (0, doc_cfg_1.printCfgCode)(shell, 'x <- 2 * 3 + 1', { showCode: true, openCode: true, prefix: 'flowchart RL\n', simplifications: ['to-basic-blocks'], simplify: true })}
|
|
337
|
+
${await (0, doc_cfg_1.printCfgCode)(shell, 'x <- 2 * 3 + 1', { showCode: true, openCode: true, prefix: 'flowchart RL\n', simplifications: ['to-basic-blocks'], simplify: true, ctx })}
|
|
339
338
|
|
|
340
339
|
While the CFG without basic blocks is much bigger:
|
|
341
340
|
|
|
342
|
-
${await (0, doc_cfg_1.printCfgCode)(shell, 'x <- 2 * 3 + 1', { showCode: false, prefix: 'flowchart RL\n' })}
|
|
341
|
+
${await (0, doc_cfg_1.printCfgCode)(shell, 'x <- 2 * 3 + 1', { showCode: false, prefix: 'flowchart RL\n', ctx })}
|
|
343
342
|
|
|
344
343
|
In a way, using the basic blocks perspective does not remove any of these vertices (we just usually visualize them compacted as their execution order should be "obvious").
|
|
345
344
|
The vertices are still there, as elems of the ${ctx.link('CfgBasicBlockVertex')}:
|
|
346
345
|
|
|
347
|
-
${await (0, doc_cfg_1.printCfgCode)(shell, 'x <- 2 * 3 + 1', { showCode: false, prefix: 'flowchart RL\n', simplifications: ['to-basic-blocks'], simplify: false })}
|
|
346
|
+
${await (0, doc_cfg_1.printCfgCode)(shell, 'x <- 2 * 3 + 1', { showCode: false, prefix: 'flowchart RL\n', simplifications: ['to-basic-blocks'], simplify: false, ctx })}
|
|
348
347
|
|
|
349
348
|
The benefit (for comprehensibility and algorithms) becomes more apparent when we look at a more complicated program:
|
|
350
349
|
|
|
@@ -352,12 +351,12 @@ ${(0, doc_code_1.codeBlock)('r', CfgLongExample)}
|
|
|
352
351
|
|
|
353
352
|
With basic blocks, this code looks like this:
|
|
354
353
|
|
|
355
|
-
${await (0, doc_cfg_1.printCfgCode)(shell, CfgLongExample, { showCode: false, prefix: 'flowchart RL\n', simplifications: ['to-basic-blocks'], simplify: true })}
|
|
354
|
+
${await (0, doc_cfg_1.printCfgCode)(shell, CfgLongExample, { showCode: false, prefix: 'flowchart RL\n', simplifications: ['to-basic-blocks'], simplify: true, ctx })}
|
|
356
355
|
|
|
357
356
|
Now, without basic blocks, this is a different story...
|
|
358
357
|
|
|
359
358
|
${await (async () => {
|
|
360
|
-
const exa = await (0, doc_cfg_1.printCfgCode)(shell, CfgLongExample, { showCode: false, prefix: 'flowchart RL\n' });
|
|
359
|
+
const exa = await (0, doc_cfg_1.printCfgCode)(shell, CfgLongExample, { showCode: false, prefix: 'flowchart RL\n', ctx });
|
|
361
360
|
return (0, doc_structure_1.details)('The full CFG', exa);
|
|
362
361
|
})()}
|
|
363
362
|
|
|
@@ -365,7 +364,7 @@ And again it should be noted that even though the example code is more complicat
|
|
|
365
364
|
|
|
366
365
|
${(0, doc_structure_1.section)('Working with the CFG', 2, 'cfg-working')}
|
|
367
366
|
|
|
368
|
-
There is a plethora of functions that you can use the traverse the
|
|
367
|
+
There is a plethora of functions that you can use the traverse the ${ctx.linkPage('wiki/Normalized AST', 'normalized AST')} and the ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graph')}.
|
|
369
368
|
Similarly, flowR provides you with a set of utility functions and classes that you can use to interact with the control flow graph:
|
|
370
369
|
|
|
371
370
|
* ${ctx.link(simple_visitor_1.visitCfgInOrder)} and ${ctx.link(simple_visitor_1.visitCfgInReverseOrder)} for simple traversals
|
|
@@ -392,7 +391,7 @@ ${await (async () => {
|
|
|
392
391
|
})()}
|
|
393
392
|
|
|
394
393
|
A more useful appearance of these visitors occurs with ${ctx.link(happens_before_1.happensBefore)} which uses the CFG to determine whether the execution
|
|
395
|
-
of one vertex always, maybe, or never happens before another vertex (see the corresponding
|
|
394
|
+
of one vertex always, maybe, or never happens before another vertex (see the corresponding ${ctx.linkPage('wiki/Query API', 'query documentation', 'happens-before-query')} for more information).
|
|
396
395
|
|
|
397
396
|
|
|
398
397
|
${(0, doc_structure_1.section)('Diffing and Testing', 3, 'cfg-diff-and-test')}
|
|
@@ -417,9 +416,9 @@ visitors that incorporate various alternative perspectives:
|
|
|
417
416
|
- [Basic CFG Visitor](#cfg-traversal-basic):\\
|
|
418
417
|
As a class-based version of the [simple traversal](#cfg-traversal-basic) functions
|
|
419
418
|
- [Syntax-Aware CFG Visitor](#cfg-traversal-syntax):\\
|
|
420
|
-
If you want directly incorporate the type of the respective vertex in the
|
|
419
|
+
If you want directly incorporate the type of the respective vertex in the ${ctx.linkPage('wiki/Normalized AST', 'normalized AST')} into your visitor
|
|
421
420
|
- [Dataflow-Aware CFG Visitor](#cfg-traversal-dfg):\\
|
|
422
|
-
If you require the
|
|
421
|
+
If you require the ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow information')} as well (e.g., to track built-in function calls, ...)
|
|
423
422
|
- [Semantic CFG Visitor](#cfg-traversal-semantic):\\
|
|
424
423
|
Currently the most advanced visitor that combines syntactic with dataflow information.
|
|
425
424
|
|
|
@@ -446,7 +445,7 @@ ${await (async () => {
|
|
|
446
445
|
|
|
447
446
|
${(0, doc_structure_1.section)('Syntax-Aware CFG Visitor', 4, 'cfg-traversal-syntax')}
|
|
448
447
|
|
|
449
|
-
The ${ctx.link(syntax_cfg_guided_visitor_1.SyntaxAwareCfgGuidedVisitor)} class incorporates knowledge of the
|
|
448
|
+
The ${ctx.link(syntax_cfg_guided_visitor_1.SyntaxAwareCfgGuidedVisitor)} class incorporates knowledge of the ${ctx.linkPage('wiki/Normalized AST', 'normalized AST')} into the CFG traversal and
|
|
450
449
|
directly provides specialized visitors for the various node types.
|
|
451
450
|
Now, our running example of collecting all numbers simplifies to this:
|
|
452
451
|
|
|
@@ -464,7 +463,7 @@ ${await (async () => {
|
|
|
464
463
|
|
|
465
464
|
${(0, doc_structure_1.section)('Dataflow-Aware CFG Visitor', 4, 'cfg-traversal-dfg')}
|
|
466
465
|
|
|
467
|
-
There is a lot of benefit in incorporating the
|
|
466
|
+
There is a lot of benefit in incorporating the ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow information')} into the CFG traversal, as it contains
|
|
468
467
|
information about overwritten function calls, definition targets, and so on.
|
|
469
468
|
Our best friend is the ${ctx.link(dfg_get_origin_1.getOriginInDfg)} function which provides the important information about the origin of a vertex in the dataflow graph.
|
|
470
469
|
The ${ctx.link(dfg_cfg_guided_visitor_1.DataflowAwareCfgGuidedVisitor)} class does some of the basic lifting for us.
|
|
@@ -530,7 +529,7 @@ ${await (async function () {
|
|
|
530
529
|
(0, assert_1.guard)(control_flow_graph_1.CfgVertex.isExpression(plusVertex));
|
|
531
530
|
const numOfExits = control_flow_graph_1.CfgVertex.getEnd(plusVertex)?.length ?? 0;
|
|
532
531
|
(0, assert_1.guard)(numOfExits === 1);
|
|
533
|
-
return `${await (0, doc_cfg_1.printCfgCode)(shell, 'x + 1', { showCode: true, prefix: 'flowchart RL\n' })}
|
|
532
|
+
return `${await (0, doc_cfg_1.printCfgCode)(shell, 'x + 1', { showCode: true, prefix: 'flowchart RL\n', ctx })}
|
|
534
533
|
|
|
535
534
|
Looking at the binary operation vertex for \`+\` (with id \`${plusVertexId}\`) we see that it is linked to a single exit ("end marker") point: \`${control_flow_graph_1.CfgVertex.getEnd(plusVertex)?.[0] ?? '??'}\`.
|
|
536
535
|
Checking this vertex essentially reveals all exit points of the expression ‐ in this case, this simply refers to the operands of the addition.
|
|
@@ -545,7 +544,7 @@ ${(0, doc_structure_1.details)('Example: Exit Points for an if', await (async fu
|
|
|
545
544
|
(0, assert_1.guard)(control_flow_graph_1.CfgVertex.isStatement(ifVertex));
|
|
546
545
|
const numOfExits = control_flow_graph_1.CfgVertex.getEnd(ifVertex)?.length ?? 0;
|
|
547
546
|
(0, assert_1.guard)(numOfExits === 1);
|
|
548
|
-
return `${await (0, doc_cfg_1.printCfgCode)(shell, expr, { showCode: true, prefix: 'flowchart RL\n' })}
|
|
547
|
+
return `${await (0, doc_cfg_1.printCfgCode)(shell, expr, { showCode: true, prefix: 'flowchart RL\n', ctx })}
|
|
549
548
|
|
|
550
549
|
Looking at the if vertex for (with id \`${ifVertexId}\`) we see that it is again linked to a single exit point: \`${control_flow_graph_1.CfgVertex.getEnd(ifVertex)?.[0] ?? '??'}\`.
|
|
551
550
|
Yet, now this exit vertex is linked to the two branches of the if statement (the \`then\` and \`else\` branch).
|
|
@@ -35,6 +35,10 @@ const static_slicer_1 = require("../slicing/static/static-slicer");
|
|
|
35
35
|
const flowr_analyzer_builder_1 = require("../project/flowr-analyzer-builder");
|
|
36
36
|
const flowr_analyzer_1 = require("../project/flowr-analyzer");
|
|
37
37
|
const flowr_analyzer_context_1 = require("../project/context/flowr-analyzer-context");
|
|
38
|
+
const flowr_analyzer_gas_context_1 = require("../project/context/flowr-analyzer-gas-context");
|
|
39
|
+
const flowr_analyzer_gas_plugin_1 = require("../project/plugins/gas-plugins/flowr-analyzer-gas-plugin");
|
|
40
|
+
const gas_1 = require("../gas");
|
|
41
|
+
const semver_1 = require("semver");
|
|
38
42
|
const doc_maker_1 = require("./wiki-mk/doc-maker");
|
|
39
43
|
const process_value_1 = require("../dataflow/internal/process/process-value");
|
|
40
44
|
const graph_1 = require("../dataflow/graph/graph");
|
|
@@ -78,6 +82,29 @@ function inspectContextExample(analyzer) {
|
|
|
78
82
|
console.log('dplyr version', ctx.deps.getDependency('dplyr'));
|
|
79
83
|
console.log('loading order', ctx.files.loadingOrder.getLoadingOrder());
|
|
80
84
|
}
|
|
85
|
+
async function gasPluginExample() {
|
|
86
|
+
class MyGasPlugin extends flowr_analyzer_gas_plugin_1.FlowrAnalyzerGasPlugin {
|
|
87
|
+
name = 'my-gas-plugin';
|
|
88
|
+
description = 'Returns Critical for source when RSS exceeds 1 GB.';
|
|
89
|
+
version = new semver_1.SemVer('1.0.0');
|
|
90
|
+
process(_ctx, key) {
|
|
91
|
+
if (key === gas_1.GasFeatureKey.Source) {
|
|
92
|
+
const { rss } = process.memoryUsage();
|
|
93
|
+
if (rss > 1024 * 1024 * 1024) {
|
|
94
|
+
return 2 /* GasLevel.Critical */;
|
|
95
|
+
}
|
|
96
|
+
if (rss > 512 * 1024 * 1024) {
|
|
97
|
+
return 1 /* GasLevel.Problematic */;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return await new flowr_analyzer_builder_1.FlowrAnalyzerBuilder()
|
|
104
|
+
.registerPlugins(new MyGasPlugin())
|
|
105
|
+
.setEngine('tree-sitter')
|
|
106
|
+
.build();
|
|
107
|
+
}
|
|
81
108
|
/**
|
|
82
109
|
* https://github.com/flowr-analysis/flowr/wiki/Core
|
|
83
110
|
*/
|
|
@@ -92,13 +119,13 @@ This wiki page provides an overview of the inner workings of _flowR_.
|
|
|
92
119
|
It is mostly intended for developers that want to extend the capabilities of _flowR_
|
|
93
120
|
and assumes knowledge of [TypeScript](https://www.typescriptlang.org/) and [R](https://www.r-project.org/).
|
|
94
121
|
If you think parts of the wiki are missing, wrong, or outdated, please do not hesitate to [open a new issue](${doc_issue_1.NewIssueUrl})!
|
|
95
|
-
In case you are new and want to develop for flowR, please check out the relevant
|
|
122
|
+
In case you are new and want to develop for flowR, please check out the relevant ${ctx.linkPage('wiki/Setup', 'Setup', '-developing-for-flowr')} wiki page
|
|
96
123
|
and the [Contributing Guidelines](${doc_files_1.RemoteFlowrFilePathBaseRef}/.github/CONTRIBUTING.md).
|
|
97
124
|
|
|
98
125
|
${(0, doc_structure_1.block)({
|
|
99
126
|
type: 'NOTE',
|
|
100
127
|
content: `
|
|
101
|
-
Essentially every step we explain here can be explored directly from flowR's REPL in an interactive fashion (see the
|
|
128
|
+
Essentially every step we explain here can be explored directly from flowR's REPL in an interactive fashion (see the ${ctx.linkPage('wiki/Interface', 'Interface', 'using-the-repl')} wiki page).
|
|
102
129
|
We recommend to use commands like ${(0, doc_cli_option_1.getReplCommand)('parse')} or ${(0, doc_cli_option_1.getReplCommand)('dataflow*')} to explore the output of flowR using your own samples.
|
|
103
130
|
As a quickstart you may use:
|
|
104
131
|
|
|
@@ -121,6 +148,7 @@ See the [Getting flowR to Talk](#getting-flowr-to-talk) section below for more i
|
|
|
121
148
|
* [Dataflow Graph Generation](#dataflow-graph-generation)
|
|
122
149
|
* [Beyond the Dataflow Graph](#beyond-the-dataflow-graph)
|
|
123
150
|
* [Static Backward Slicing](#static-backward-slicing)
|
|
151
|
+
* [Gas (Resource Guard)](#gas-resource-guard)
|
|
124
152
|
* [Getting flowR to Talk](#getting-flowr-to-talk)
|
|
125
153
|
|
|
126
154
|
## Creating and Using a flowR Analyzer Instance
|
|
@@ -130,15 +158,15 @@ It provides a fluent interface for the configuration and creation of a ${ctx.lin
|
|
|
130
158
|
|
|
131
159
|
${ctx.code(makeAnalyzerExample, { dropLinesStart: 1, dropLinesEnd: 2, hideDefinedAt: true })}
|
|
132
160
|
|
|
133
|
-
Have a look at the
|
|
161
|
+
Have a look at the ${ctx.linkPage('wiki/Engines', 'Engine')} wiki page to understand the different engines and parsers you can use.
|
|
134
162
|
|
|
135
|
-
The analyzer instance can then be used to access analysis results like the
|
|
136
|
-
the
|
|
163
|
+
The analyzer instance can then be used to access analysis results like the ${ctx.linkPage('wiki/Normalized AST', 'normalized AST')},
|
|
164
|
+
the ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graph')}, and the ${ctx.linkPage('wiki/Control Flow Graph', 'controlflow graph')}:
|
|
137
165
|
|
|
138
166
|
${ctx.code(extractStepsExample, { dropLinesStart: 1, dropLinesEnd: 2, hideDefinedAt: true })}
|
|
139
167
|
|
|
140
168
|
The underlying ${ctx.link(flowr_analyzer_1.FlowrAnalyzer.name)} instance will take care of caching, updates, and running the appropriate steps.
|
|
141
|
-
It also exposes the
|
|
169
|
+
It also exposes the ${ctx.linkPage('wiki/Query API', 'query API')}:
|
|
142
170
|
|
|
143
171
|
${ctx.code(sliceQueryExample, { dropLinesStart: 1, dropLinesEnd: 2, hideDefinedAt: true })}
|
|
144
172
|
|
|
@@ -151,7 +179,7 @@ ${ctx.code(inspectContextExample, { dropLinesStart: 1, dropLinesEnd: 1, hideDefi
|
|
|
151
179
|
At the core of every analysis done via a ${ctx.link(flowr_analyzer_1.FlowrAnalyzer)} is the ${ctx.link(pipeline_executor_1.PipelineExecutor)} class which takes a sequence of analysis steps (in the form of a ${ctx.link('Pipeline')}) and executes it
|
|
152
180
|
on a given input. In general, these pipeline steps are analysis agnostic and may use arbitrary input and ordering. However, two important and predefined pipelines,
|
|
153
181
|
the ${ctx.link('DEFAULT_DATAFLOW_PIPELINE')} and the ${ctx.link('TREE_SITTER_DATAFLOW_PIPELINE')} adequately cover the most common analysis steps
|
|
154
|
-
(differentiated only by the
|
|
182
|
+
(differentiated only by the ${ctx.linkPage('wiki/Engines', 'Engine')} used).
|
|
155
183
|
|
|
156
184
|
${(0, doc_structure_1.block)({
|
|
157
185
|
type: 'TIP',
|
|
@@ -161,7 +189,7 @@ ${(0, doc_structure_1.block)({
|
|
|
161
189
|
`
|
|
162
190
|
})}
|
|
163
191
|
|
|
164
|
-
Using the
|
|
192
|
+
Using the ${ctx.linkPage('wiki/Engines', '`tree-sitter` engine')} you can request a dataflow analysis of a sample piece of R code like the following:
|
|
165
193
|
|
|
166
194
|
${(0, doc_code_1.codeBlock)('typescript', `
|
|
167
195
|
const executor = new PipelineExecutor(TREE_SITTER_DATAFLOW_PIPELINE, {
|
|
@@ -171,7 +199,7 @@ const executor = new PipelineExecutor(TREE_SITTER_DATAFLOW_PIPELINE, {
|
|
|
171
199
|
const result = await executor.allRemainingSteps();
|
|
172
200
|
`)}
|
|
173
201
|
|
|
174
|
-
This is, roughly, what the ${ctx.link('dataflow')} function does when using the
|
|
202
|
+
This is, roughly, what the ${ctx.link('dataflow')} function does when using the ${ctx.linkPage('wiki/Engines', '`tree-sitter` engine')}.
|
|
175
203
|
We create a new ${ctx.link(pipeline_executor_1.PipelineExecutor)} with the ${ctx.link('TREE_SITTER_DATAFLOW_PIPELINE')} and then use
|
|
176
204
|
${ctx.link(`${pipeline_executor_1.PipelineExecutor.name}::${pipeline_executor_1.PipelineExecutor.prototype.allRemainingSteps.name}`)}
|
|
177
205
|
to cause the execution of all contained steps (in general, pipelines can be executed step-by-step, but this is usually not required if you just want the result).
|
|
@@ -183,8 +211,8 @@ automatically selects the correct pipeline based on the engine used.
|
|
|
183
211
|
|
|
184
212
|
Everything that complies to the ${ctx.link('IPipelineStep')} interface can be used as a step in a pipeline, with the most important definition being the
|
|
185
213
|
\`processor\` function, which refers to the actual work performed by the step.
|
|
186
|
-
For example, the ${ctx.link('STATIC_DATAFLOW')} step ultimately relies on the ${ctx.link(extractor_1.produceDataFlowGraph)} function to create a
|
|
187
|
-
using the
|
|
214
|
+
For example, the ${ctx.link('STATIC_DATAFLOW')} step ultimately relies on the ${ctx.link(extractor_1.produceDataFlowGraph)} function to create a ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graph')}
|
|
215
|
+
using the ${ctx.linkPage('wiki/Normalized AST', 'normalized AST')} of the program.
|
|
188
216
|
|
|
189
217
|
### Shape of a Pipeline Step
|
|
190
218
|
|
|
@@ -208,10 +236,10 @@ However, as such steps are currently not relevant for any of flowR's core analys
|
|
|
208
236
|
|
|
209
237
|
## How flowR Produces Dataflow Graphs
|
|
210
238
|
|
|
211
|
-
This section focuses on the generation of a
|
|
212
|
-
${ctx.link('DEFAULT_DATAFLOW_PIPELINE')}. The
|
|
213
|
-
which replaces the parser with the integrated tree-sitter parser and hence uses a slightly adapted normalization step to produce a similar
|
|
214
|
-
The
|
|
239
|
+
This section focuses on the generation of a ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graph')} from a given R program, using the ${ctx.linkPage('wiki/Engines', 'RShell Engine')} and hence the
|
|
240
|
+
${ctx.link('DEFAULT_DATAFLOW_PIPELINE')}. The ${ctx.linkPage('wiki/Engines', '`tree-sitter` engine')} uses the ${ctx.link('TREE_SITTER_DATAFLOW_PIPELINE')}),
|
|
241
|
+
which replaces the parser with the integrated tree-sitter parser and hence uses a slightly adapted normalization step to produce a similar ${ctx.linkPage('wiki/Normalized AST', 'normalized AST')}.
|
|
242
|
+
The ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graph')} should be the same for both engines (although ${ctx.linkPage('wiki/Engines', '`tree-sitter`')} is faster and may be able to parse more files).
|
|
215
243
|
|
|
216
244
|
### Overview
|
|
217
245
|
|
|
@@ -223,9 +251,9 @@ We can see that it relies on three steps:
|
|
|
223
251
|
|
|
224
252
|
1. **${ctx.link('PARSE_WITH_R_SHELL_STEP', { codeFont: false })}** ([parsing](#parsing)): Uses the ${ctx.link(shell_1.RShell)} to parse the input program.\\
|
|
225
253
|
_Its main function linked as the processor is the ${ctx.link(parser_1.parseRequests, { codeFont: false })} function._
|
|
226
|
-
2. **${ctx.link('NORMALIZE', { codeFont: false })}** ([normalization](#normalization)): Normalizes the AST produced by the parser (to create a
|
|
254
|
+
2. **${ctx.link('NORMALIZE', { codeFont: false })}** ([normalization](#normalization)): Normalizes the AST produced by the parser (to create a ${ctx.linkPage('wiki/Normalized AST', 'normalized AST')}).\\
|
|
227
255
|
_Its main function linked as the processor is the ${ctx.link(parser_2.normalize, { codeFont: false })} function._
|
|
228
|
-
3. **${ctx.link('STATIC_DATAFLOW', { codeFont: false })}** ([dataflow](#dataflow-graph-generation)): Produces the actual
|
|
256
|
+
3. **${ctx.link('STATIC_DATAFLOW', { codeFont: false })}** ([dataflow](#dataflow-graph-generation)): Produces the actual ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graph')} from the normalized AST.\\
|
|
229
257
|
_Its main function linked as the processor is the ${ctx.link(extractor_1.produceDataFlowGraph, { codeFont: false })} function._
|
|
230
258
|
|
|
231
259
|
To explore these steps, let's use the REPL with the (very simple and contrived) R code: \`${sampleCode}\`.
|
|
@@ -257,13 +285,13 @@ ${(0, doc_structure_1.block)({
|
|
|
257
285
|
type: 'NOTE',
|
|
258
286
|
content: 'Maybe you are left with the question: What is tree-sitter doing differently? Expand the following to get more information!\n\n' + (0, doc_structure_1.details)('And what changes with tree-sitter?', `
|
|
259
287
|
|
|
260
|
-
Essentially not much (from a user perspective, it does essentially everything and all differently under the hood)! Have a look at the
|
|
288
|
+
Essentially not much (from a user perspective, it does essentially everything and all differently under the hood)! Have a look at the ${ctx.linkPage('wiki/Engines', 'Engines')} wiki page for more information on the differences between the engines.
|
|
261
289
|
Below you can see the Repl commands for the tree-sitter engine (using ${(0, doc_cli_option_1.getCliLongOptionOf)('flowr', 'default-engine')} to set the engine to tree-sitter):
|
|
262
290
|
|
|
263
291
|
${await (async () => {
|
|
264
292
|
return await (0, doc_repl_1.documentReplSession)(treeSitter, [{
|
|
265
293
|
command: `:parse "${sampleCode}"`,
|
|
266
|
-
description: `This shows the ASCII-Art representation of the parse-tree of the R code \`${sampleCode}\`, as it is provided by the ${ctx.link(tree_sitter_executor_1.TreeSitterExecutor)}. See the
|
|
294
|
+
description: `This shows the ASCII-Art representation of the parse-tree of the R code \`${sampleCode}\`, as it is provided by the ${ctx.link(tree_sitter_executor_1.TreeSitterExecutor)}. See the ${ctx.linkPage('wiki/Engines', 'Engines')} wiki page for more information on the differences between the engines.`
|
|
267
295
|
},
|
|
268
296
|
{
|
|
269
297
|
command: `:normalize* "${sampleCode}"`,
|
|
@@ -279,7 +307,7 @@ ${await (async () => {
|
|
|
279
307
|
|
|
280
308
|
### Parsing
|
|
281
309
|
|
|
282
|
-
The parsing step uses the ${ctx.link(shell_1.RShell)} to parse the input program (or, of course, the ${ctx.link(tree_sitter_executor_1.TreeSitterExecutor)} when using the
|
|
310
|
+
The parsing step uses the ${ctx.link(shell_1.RShell)} to parse the input program (or, of course, the ${ctx.link(tree_sitter_executor_1.TreeSitterExecutor)} when using the ${ctx.linkPage('wiki/Engines', '`tree-sitter` engine')}).
|
|
283
311
|
To speed up the process, we use the ${ctx.link(init_1.initCommand)} function to compile the parsing function and rely on a
|
|
284
312
|
custom serialization, which outputs the information in a CSV-like format.
|
|
285
313
|
This means, that the ${(0, doc_cli_option_1.getReplCommand)('parse')} command actually kind-of lies to you, as it does pretty print the serialized version which looks more like the following (this uses the ${ctx.link(retriever_1.retrieveParseDataFromRCode.name)} function with the sample code \`${sampleCode}\`):
|
|
@@ -300,7 +328,7 @@ ${await (0, retriever_1.retrieveParseDataFromRCode)((0, retriever_1.requestFromI
|
|
|
300
328
|
</details>
|
|
301
329
|
|
|
302
330
|
In fact, this data is merely what R's [\`base::parse\`](https://stat.ethz.ch/R-manual/R-devel/library/base/html/parse.html) and [\`utils::getParseData\`](https://stat.ethz.ch/R-manual/R-devel/library/utils/html/getParseData.html) functions provide.
|
|
303
|
-
We then use this data in the [normalization](#normalization) step to create a
|
|
331
|
+
We then use this data in the [normalization](#normalization) step to create a ${ctx.linkPage('wiki/Normalized AST', 'normalized AST')}.
|
|
304
332
|
|
|
305
333
|
If you are interested in the raw token types that we may encounter, have a look at the ${ctx.link('RawRType')} enum.
|
|
306
334
|
|
|
@@ -311,12 +339,12 @@ ${ctx.link(format_1.convertPreparedParsedData)} functions to first transform the
|
|
|
311
339
|
Next, ${ctx.link(normalize_root_1.normalizeRootObjToAst)} transforms this object to a normalized AST and ${ctx.link(decorate_1.decorateAst)} adds additional information to the AST (like roles, ids, depth, etc.).
|
|
312
340
|
While looking at the mermaid visualization of such an AST is nice and usually sufficient, looking at the objects themselves shows you the full range of information the AST provides (all encompassed within the ${ctx.link(model_1.RNode)} type).
|
|
313
341
|
|
|
314
|
-
Let's have a look at the normalized AST for the sample code \`${sampleCode}\` (please refer to the
|
|
342
|
+
Let's have a look at the normalized AST for the sample code \`${sampleCode}\` (please refer to the ${ctx.linkPage('wiki/Normalized AST', 'normalized AST')} wiki page for more information):
|
|
315
343
|
|
|
316
344
|
${(0, doc_structure_1.details)('Normalized AST for <code>x <- 1; print(x)</code>', (0, doc_code_1.codeBlock)('json', JSON.stringify((await (0, default_pipelines_1.createNormalizePipeline)(shell, { context: (0, flowr_analyzer_context_1.contextFromInput)(sampleCode) }).allRemainingSteps()).normalize.ast, json_1.jsonReplacer, 4)))}
|
|
317
345
|
|
|
318
346
|
This is… a lot! We get the type from the ${ctx.link('RType')} enum, the lexeme, location information, an id, the children of the node, and their parents.
|
|
319
|
-
While the
|
|
347
|
+
While the ${ctx.linkPage('wiki/Normalized AST', 'normalized AST')} wiki page provides you with information on how to interpret this data, we will focus on how we get it from the
|
|
320
348
|
table provided by the [parsing](#parsing) step.
|
|
321
349
|
|
|
322
350
|
There are two important functions: ${ctx.link(normalize_root_1.normalizeRootObjToAst)}, which operates on the parse-output already transformed into a tree-like structure,
|
|
@@ -342,11 +370,11 @@ ${(0, doc_structure_1.details)('Ast for <code>x <- 1; print(x)</code> after the
|
|
|
342
370
|
The decoration is comparatively trivial. We take the AST throw it into the ${ctx.link(decorate_1.decorateAst.name)} function (which again, handles each normalized node type) and
|
|
343
371
|
get:
|
|
344
372
|
|
|
345
|
-
1. The AST with ids, roles, and depth information (see the
|
|
373
|
+
1. The AST with ids, roles, and depth information (see the ${ctx.linkPage('wiki/Normalized AST', 'normalized AST')} wiki page for more information).
|
|
346
374
|
2. A mapping of ids to nodes in the form of a ${ctx.link('AstIdMap')} object. This allows us to quickly access nodes by their id.
|
|
347
375
|
|
|
348
376
|
The ids used for the AST generation are arbitrary (usually created by the ${ctx.link(decorate_1.deterministicCountingIdGenerator.name)}) function) but unique and intentionally
|
|
349
|
-
separated from the ids used by the R parser. For one, this detaches us from the
|
|
377
|
+
separated from the ids used by the R parser. For one, this detaches us from the ${ctx.linkPage('wiki/Engines', 'Engine')} used, and secondly, it allows for much easier
|
|
350
378
|
extension of the AST (e.g., when R files use [\`base::source\`](https://stat.ethz.ch/R-manual/R-devel/library/base/html/source.html) to include other R files).
|
|
351
379
|
All ids conform to the ${ctx.link('NodeId')} type.
|
|
352
380
|
|
|
@@ -364,7 +392,7 @@ Looking at the function showcases the general structure of a processor:
|
|
|
364
392
|
|
|
365
393
|
${ctx.hierarchy(process_uninteresting_leaf_1.processUninterestingLeaf, { maxDepth: 2, openTop: true })}
|
|
366
394
|
|
|
367
|
-
Every processor has the same shape. It takes the normalized node (see the
|
|
395
|
+
Every processor has the same shape. It takes the normalized node (see the ${ctx.linkPage('wiki/Normalized AST', 'normalized AST')} for more information),
|
|
368
396
|
and a ${ctx.link('DataflowProcessorInformation')} object which, as some kind of "backpack" carries global information
|
|
369
397
|
to every handler.
|
|
370
398
|
This information is to be used to create a ${ctx.link('DataflowInformation')}:
|
|
@@ -383,7 +411,7 @@ While all of them are essentially empty when processing an “uninteresting leaf
|
|
|
383
411
|
|
|
384
412
|
${ctx.hierarchy(process_value_1.processValue, { maxDepth: 2, openTop: true })}
|
|
385
413
|
|
|
386
|
-
Please note, that we add the
|
|
414
|
+
Please note, that we add the ${ctx.linkPage('wiki/Dataflow Graph', 'value vertex', 'value-vertex')} to the newly created dataflow graph,
|
|
387
415
|
which holds a reference to the constant. If you are confused with the use of the ${ctx.link('ParentInformation')} type,
|
|
388
416
|
this stems from the [AST decoration](#normalization) and signals that we have a decorated ${ctx.link(model_1.RNode)} (which may have additional information in \`OtherInfo\`).
|
|
389
417
|
|
|
@@ -394,7 +422,7 @@ We do this, because R does it the same way, and allows to even overwrite these o
|
|
|
394
422
|
By treating them like R, as function calls, we get support for these overwrites for free, courtesy of flowR's call resolution.
|
|
395
423
|
|
|
396
424
|
But where are all the interesting things handled then?
|
|
397
|
-
For that, we want to have a look at the built-in environment, which can be freely configured using flowR's
|
|
425
|
+
For that, we want to have a look at the built-in environment, which can be freely configured using flowR's ${ctx.linkPage('wiki/Interface', 'configuration system', 'configuring-flowr')}.
|
|
398
426
|
FlowR's heart and soul resides in the ${ctx.link('DefaultBuiltinConfig')} object, which is used to configure the built-in environment
|
|
399
427
|
by mapping function names to ${ctx.link('BuiltInProcessorMapper')} functions.
|
|
400
428
|
There you can find functions like ${ctx.link(built_in_access_1.processAccess)} which handles the (subset) access to a variable,
|
|
@@ -423,9 +451,9 @@ to produce a new dataflow information.
|
|
|
423
451
|
|
|
424
452
|
## Beyond the Dataflow Graph
|
|
425
453
|
|
|
426
|
-
Given the
|
|
427
|
-
You can issue
|
|
428
|
-
Of course, all of these endeavors work not just with the ${ctx.link(shell_1.RShell)} but also with the
|
|
454
|
+
Given the ${ctx.linkPage('wiki/Dataflow Graph', 'dataflow graph')}, you can do a lot more!
|
|
455
|
+
You can issue ${ctx.linkPage('wiki/Query API', 'queries')} to explore the graph, ${ctx.linkPage('wiki/Search API', 'search')} for specific elements, or, for example, request a [static backward slice](#static-backward-slicing).
|
|
456
|
+
Of course, all of these endeavors work not just with the ${ctx.link(shell_1.RShell)} but also with the ${ctx.linkPage('wiki/Engines', '`tree-sitter` engine')}.
|
|
429
457
|
|
|
430
458
|
### Static Backward Slicing
|
|
431
459
|
|
|
@@ -444,6 +472,66 @@ ${await (0, doc_repl_1.documentReplSession)(treeSitter, [{
|
|
|
444
472
|
description: 'Slice for the example file for the variable "prod" in line 12.'
|
|
445
473
|
}], { openOutput: true })}
|
|
446
474
|
|
|
475
|
+
## Gas (Resource Guard)
|
|
476
|
+
|
|
477
|
+
During a large analysis, flowR may run into memory or time pressure.
|
|
478
|
+
The _gas_ system provides per-feature resource guards that check the current heap usage and elapsed analysis time.
|
|
479
|
+
|
|
480
|
+
Any analysis site queries the level with ${ctx.linkM(flowr_analyzer_gas_context_1.FlowrAnalyzerGasContext, 'checkGas')}, where \`key\` is a feature name.
|
|
481
|
+
The call is a no-op when gas is disabled for that key and no gas plugins are registered.
|
|
482
|
+
Heap statistics come from the \`v8\` module (Node.js, Electron, VS Code) or Chromium's \`performance.memory\` in browsers. If neither is available, gas skips the memory check and only the elapsed-time thresholds apply. Programmatic configs can supply a custom source via the \`heapProvider\` of the ${ctx.link('FlowrGasConfig')} (\`config.gas.heapProvider\`), and gas plugins can override levels entirely.
|
|
483
|
+
|
|
484
|
+
| Level | Value | Description |
|
|
485
|
+
|:-------------------------|------:|:------------------------------------|
|
|
486
|
+
| \`GasLevel.Normal\` | 0 | ${ctx.doc('GasLevel::Normal')} |
|
|
487
|
+
| \`GasLevel.Problematic\` | 1 | ${ctx.doc('GasLevel::Problematic')} |
|
|
488
|
+
| \`GasLevel.Critical\` | 2 | ${ctx.doc('GasLevel::Critical')} |
|
|
489
|
+
|
|
490
|
+
### Enabling Gas for a Feature
|
|
491
|
+
|
|
492
|
+
Gas is **disabled by default** for every feature (see ${ctx.link('GasFeatureKey')} for all recognized keys).
|
|
493
|
+
Enable it by setting a positive factor in \`config.gas.features\`:
|
|
494
|
+
|
|
495
|
+
\`\`\`json
|
|
496
|
+
{
|
|
497
|
+
"gas": {
|
|
498
|
+
"thresholds": {
|
|
499
|
+
"memory": { "problematic": 0.7, "critical": 0.9 },
|
|
500
|
+
"timeMs": { "problematic": 100000, "critical": 120000 }
|
|
501
|
+
},
|
|
502
|
+
"features": {
|
|
503
|
+
"source": 1
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
\`\`\`
|
|
508
|
+
|
|
509
|
+
The factor scales both dimensions before comparing against the thresholds:
|
|
510
|
+
|
|
511
|
+
\`\`\`
|
|
512
|
+
scaled_ratio = (used_heap / heap_limit) * factor
|
|
513
|
+
scaled_elapsed = elapsed_ms * factor
|
|
514
|
+
\`\`\`
|
|
515
|
+
|
|
516
|
+
A factor of \`2\` makes the check twice as sensitive: it triggers \`Problematic\` when the heap
|
|
517
|
+
is at 35% (= 0.7 / 2) instead of 70%.
|
|
518
|
+
|
|
519
|
+
### Known Feature Keys
|
|
520
|
+
|
|
521
|
+
${ctx.doc('GasFeatureKey')}
|
|
522
|
+
|
|
523
|
+
| Key | Description |
|
|
524
|
+
|:----|:------------|
|
|
525
|
+
${Object.entries(gas_1.GasFeatureKey).map(([name, key]) => `| \`${key}\` | ${ctx.doc(`GasFeatureKey::${name}`)} |`).join('\n')}
|
|
526
|
+
|
|
527
|
+
You can search for \`ctx.gas.checkGas(\` in the source to locate every active check site.
|
|
528
|
+
|
|
529
|
+
### Gas Plugins
|
|
530
|
+
|
|
531
|
+
${ctx.doc(flowr_analyzer_gas_plugin_1.FlowrAnalyzerGasPlugin)}
|
|
532
|
+
|
|
533
|
+
${ctx.code(gasPluginExample, { dropLinesStart: 1, dropLinesEnd: 1, hideDefinedAt: true })}
|
|
534
|
+
|
|
447
535
|
## Helpful Things
|
|
448
536
|
|
|
449
537
|
### Getting flowR to Talk
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DocMakerArgs } from './wiki-mk/doc-maker';
|
|
2
|
+
import { DocMaker } from './wiki-mk/doc-maker';
|
|
3
|
+
export declare class WikiCreateLintingRules extends DocMaker<'wiki/Create Linting Rules.md'> {
|
|
4
|
+
constructor();
|
|
5
|
+
protected text({ ctx }: DocMakerArgs): string;
|
|
6
|
+
}
|