@eagleoutice/flowr 2.13.3 → 2.13.5
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 +32 -32
- package/abstract-interpretation/absint-visitor.js +2 -2
- package/abstract-interpretation/data-frame/mappers/arguments.js +2 -2
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +1 -1
- package/abstract-interpretation/unsupported-functions.js +1 -1
- package/cli/repl/core.js +10 -2
- package/config.d.ts +4 -1
- package/config.js +10 -1
- package/control-flow/cfg-dead-code.js +91 -15
- package/control-flow/extract-cfg.js +93 -8
- package/control-flow/semantic-cfg-guided-visitor.js +2 -0
- package/dataflow/environments/built-in-config.d.ts +6 -3
- package/dataflow/environments/built-in-eval-name.d.ts +20 -0
- package/dataflow/environments/built-in-eval-name.js +25 -0
- package/dataflow/environments/built-in-proc-name.d.ts +4 -0
- package/dataflow/environments/built-in-proc-name.js +4 -0
- package/dataflow/environments/built-in-props.d.ts +175 -0
- package/dataflow/environments/built-in-props.js +207 -0
- package/dataflow/environments/built-in.d.ts +28 -20
- package/dataflow/environments/built-in.js +39 -8
- package/dataflow/environments/default-builtin-config.d.ts +1094 -86
- package/dataflow/environments/default-builtin-config.js +496 -212
- package/dataflow/environments/identifier.d.ts +25 -1
- package/dataflow/environments/identifier.js +24 -2
- package/dataflow/environments/query-fn-props.d.ts +102 -0
- package/dataflow/environments/query-fn-props.js +188 -0
- package/dataflow/eval/resolve/alias-tracking.d.ts +2 -0
- package/dataflow/eval/resolve/alias-tracking.js +12 -2
- package/dataflow/eval/resolve/match-arguments.d.ts +15 -0
- package/dataflow/eval/resolve/match-arguments.js +77 -0
- package/dataflow/eval/resolve/resolve-numbers.d.ts +202 -0
- package/dataflow/eval/resolve/resolve-numbers.js +163 -0
- package/dataflow/eval/resolve/resolve-operators.d.ts +60 -0
- package/dataflow/eval/resolve/resolve-operators.js +115 -0
- package/dataflow/eval/resolve/resolve-strings.d.ts +98 -0
- package/dataflow/eval/resolve/resolve-strings.js +116 -0
- package/dataflow/eval/resolve/resolve.d.ts +5 -23
- package/dataflow/eval/resolve/resolve.js +56 -87
- package/dataflow/fn/higher-order-function.js +3 -3
- package/dataflow/fn/recursive-function.js +1 -1
- package/dataflow/graph/df-helper.js +1 -1
- package/dataflow/graph/vertex.d.ts +32 -25
- package/dataflow/graph/vertex.js +40 -36
- package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +1 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-access.js +7 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +14 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +28 -29
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +41 -48
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.d.ts +14 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-class-generator.js +45 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +7 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +30 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +62 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +63 -16
- package/dataflow/internal/process/functions/call/built-in/built-in-get.js +29 -9
- package/dataflow/internal/process/functions/call/built-in/built-in-list.d.ts +5 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-list.js +35 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-new-env.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +2 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.js +46 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-stack-env.js +3 -1
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +2 -1
- package/dataflow/internal/process/functions/call/known-call-handling.js +2 -1
- package/dataflow/internal/process/functions/call/unnamed-call-handling.js +24 -0
- package/dataflow/internal/process/functions/process-parameter.js +2 -1
- package/documentation/data/faq/faqs.js +11 -0
- package/documentation/doc-util/doc-types.js +1 -1
- package/documentation/wiki-analyzer.js +75 -0
- package/documentation/wiki-core.js +65 -16
- package/documentation/wiki-interface.js +3 -0
- package/linter/linter-rules.d.ts +10 -11
- package/linter/rules/absolute-path.js +1 -1
- package/linter/rules/deprecated-functions.js +5 -3
- package/linter/rules/function-finder-util.d.ts +2 -2
- package/linter/rules/function-finder-util.js +11 -4
- package/linter/rules/network-functions.d.ts +25 -5
- package/linter/rules/network-functions.js +51 -11
- package/linter/rules/no-leaked-credentials.js +1 -1
- package/linter/rules/problematic-inputs.d.ts +1 -1
- package/linter/rules/problematic-inputs.js +7 -1
- package/linter/rules/seeded-randomness.d.ts +5 -8
- package/linter/rules/seeded-randomness.js +17 -9
- package/linter/rules/undefined-symbol.js +1 -1
- package/linter/rules/unused-definition.js +15 -10
- package/linter/rules/useless-loop.js +1 -1
- package/package.json +3 -2
- package/project/cache/flowr-analyzer-cache.d.ts +4 -3
- package/project/cache/flowr-analyzer-cache.js +32 -13
- package/project/cache/flowr-cache.d.ts +39 -12
- package/project/cache/flowr-cache.js +5 -3
- package/project/context/flowr-analyzer-context.d.ts +8 -1
- package/project/context/flowr-analyzer-context.js +11 -1
- package/project/context/flowr-analyzer-dependencies-context.d.ts +4 -2
- package/project/context/flowr-analyzer-dependencies-context.js +15 -1
- package/project/context/flowr-analyzer-files-context.d.ts +8 -4
- package/project/context/flowr-analyzer-files-context.js +20 -1
- package/project/context/flowr-analyzer-incremental-analysis-context.d.ts +33 -0
- package/project/context/flowr-analyzer-incremental-analysis-context.js +63 -0
- package/project/context/flowr-analyzer-meta-context.d.ts +3 -1
- package/project/context/flowr-analyzer-meta-context.js +14 -0
- package/project/context/flowr-file.d.ts +25 -3
- package/project/context/flowr-file.js +24 -2
- package/project/dependency-version-space.d.ts +37 -0
- package/project/dependency-version-space.js +118 -26
- package/project/flowr-analyzer.d.ts +6 -0
- package/project/flowr-analyzer.js +6 -2
- package/project/incremental/incremental-parse/edit-computation.d.ts +7 -0
- package/project/incremental/incremental-parse/edit-computation.js +61 -0
- package/project/incremental/incremental-parse/incremental-parse.d.ts +12 -0
- package/project/incremental/incremental-parse/incremental-parse.js +37 -0
- package/project/plugins/file-plugins/files/flowr-jupyter-file.d.ts +1 -1
- package/project/plugins/file-plugins/files/flowr-manifest-files.d.ts +57 -0
- package/project/plugins/file-plugins/files/flowr-manifest-files.js +121 -0
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +2 -2
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +2 -2
- package/project/plugins/file-plugins/files/flowr-sweave-file.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.d.ts +33 -0
- package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.js +53 -0
- package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +1 -1
- package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +3 -3
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-manifest-file-plugin.d.ts +27 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-manifest-file-plugin.js +47 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.d.ts +7 -0
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +31 -3
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +10 -4
- package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +17 -4
- package/project/plugins/plugin-registry.d.ts +4 -4
- package/project/plugins/plugin-registry.js +7 -4
- package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +4 -4
- package/project/sigdb/reader.d.ts +7 -0
- package/project/sigdb/reader.js +12 -0
- package/queries/catalog/call-context-query/identify-link-to-last-call-relation.js +1 -1
- package/queries/catalog/call-context-query/identify-link-to-nested-call-relation.js +1 -1
- package/queries/catalog/dependencies-query/function-info/derived-functions.d.ts +10 -0
- package/queries/catalog/dependencies-query/function-info/derived-functions.js +41 -0
- package/queries/catalog/dependencies-query/function-info/read-functions.js +14 -13
- package/queries/catalog/dependencies-query/function-info/write-functions.js +28 -36
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-executor.js +33 -3
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.d.ts +31 -0
- package/queries/catalog/guess-dep-versions-query/guess-dep-versions-query-format.js +9 -2
- package/queries/catalog/input-sources-query/input-source-functions.d.ts +9 -10
- package/queries/catalog/input-sources-query/input-source-functions.js +23 -394
- package/queries/catalog/input-sources-query/input-sources-query-executor.js +11 -6
- package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +7 -0
- package/queries/catalog/input-sources-query/input-sources-query-format.js +28 -10
- package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +14 -1
- package/queries/catalog/input-sources-query/simple-input-classifier.js +24 -0
- package/queries/catalog/signature-query/signature-query-executor.d.ts +2 -1
- package/queries/catalog/signature-query/signature-query-executor.js +79 -3
- package/queries/catalog/signature-query/signature-query-format.d.ts +27 -0
- package/queries/catalog/signature-query/signature-query-render.js +21 -3
- package/r-bridge/data/data.d.ts +2 -2
- package/r-bridge/data/data.js +2 -2
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +6 -2
- package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +21 -2
- package/r-bridge/parser.d.ts +11 -1
- package/r-bridge/parser.js +7 -4
- package/r-bridge/shell-executor.d.ts +1 -0
- package/r-bridge/shell-executor.js +1 -0
- package/r-bridge/shell.d.ts +1 -0
- package/r-bridge/shell.js +1 -0
- package/reconstruct/inline/source-inline-map.js +1 -1
- package/search/flowr-search-filters.d.ts +1 -6
- package/search/flowr-search-filters.js +1 -8
- package/search/search-executor/search-enrichers.d.ts +2 -0
- package/search/search-executor/search-enrichers.js +29 -12
- package/util/mermaid/dfg.js +1 -1
- package/util/version.js +1 -1
- package/project/plugins/file-plugins/files/flowr-rproject-file.d.ts +0 -31
- package/project/plugins/file-plugins/files/flowr-rproject-file.js +0 -66
- package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.d.ts +0 -22
- package/project/plugins/file-plugins/flowr-analyzer-rproject-file-plugin.js +0 -36
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.d.ts +0 -13
- package/project/plugins/package-version-plugins/flowr-analyzer-meta-rproject-file-plugin.js +0 -32
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.LinkedInputEntryPoints = exports.LinkedInputObjects = void 0;
|
|
4
|
+
exports.narrowingFunctions = narrowingFunctions;
|
|
4
5
|
const identifier_1 = require("../../../dataflow/environments/identifier");
|
|
5
6
|
const simple_input_classifier_1 = require("./simple-input-classifier");
|
|
7
|
+
const built_in_props_1 = require("../../../dataflow/environments/built-in-props");
|
|
8
|
+
const query_fn_props_1 = require("../../../dataflow/environments/query-fn-props");
|
|
6
9
|
/** shiny's ui-side control widgets, all taking the id of the `input` entry they feed as their first argument */
|
|
7
10
|
const ShinyInputWidgets = {
|
|
8
11
|
argName: 'inputId',
|
|
9
12
|
argIdx: 0,
|
|
10
|
-
calls: [
|
|
13
|
+
calls: identifier_1.Identifier.fromAll("shiny" /* PkgName.Shiny */, [
|
|
11
14
|
'actionButton', 'actionLink', 'checkboxInput', 'checkboxGroupInput', 'dateInput', 'dateRangeInput',
|
|
12
15
|
'fileInput', 'numericInput', 'passwordInput', 'radioButtons', 'selectInput', 'selectizeInput',
|
|
13
16
|
'sliderInput', 'submitButton', 'textAreaInput', 'textInput', 'varSelectInput', 'varSelectizeInput'
|
|
14
|
-
]
|
|
17
|
+
])
|
|
15
18
|
};
|
|
16
19
|
/**
|
|
17
20
|
* Objects that a framework binds for its users, without a definition visible in the code.
|
|
@@ -25,6 +28,19 @@ exports.LinkedInputObjects = [
|
|
|
25
28
|
/* of the session only what the browser sends is user input, `userData` and `token` are the app's own */
|
|
26
29
|
{ name: 'session', type: simple_input_classifier_1.InputType.User, withParams: ['input', 'output'], requires: 'shiny', fields: ['clientData', 'request'] }
|
|
27
30
|
];
|
|
31
|
+
/**
|
|
32
|
+
* The functions whose result is bounded no matter what flows in, read back from the {@link CallProp.Narrows}
|
|
33
|
+
* built-ins: with an {@link ArgProp.Bounds} parameter the result is one of that argument's values (`match.arg`
|
|
34
|
+
* and its `choices`), without one it is a count, an index, or a logical of the call's own making. Label a
|
|
35
|
+
* built-in `Narrows` (in the {@link DefaultBuiltinConfig} or your own definitions) and it shows up here.
|
|
36
|
+
*/
|
|
37
|
+
function narrowingFunctions(index = query_fn_props_1.BuiltInIndex.default()) {
|
|
38
|
+
const bounds = new Map(index.params(built_in_props_1.ArgProp.Bounds).map(p => [identifier_1.Identifier.getName(p.call), p]));
|
|
39
|
+
return index.with(built_in_props_1.CallProp.Narrows).map(call => {
|
|
40
|
+
const bound = bounds.get(identifier_1.Identifier.getName(call));
|
|
41
|
+
return bound === undefined ? { call } : { call, argName: bound.name, argIdx: bound.index };
|
|
42
|
+
});
|
|
43
|
+
}
|
|
28
44
|
/** shiny binds `input`, `output`, and `session` positionally, so their names are up to whoever writes the server */
|
|
29
45
|
const ShinyServerParams = ['input', undefined, 'session'];
|
|
30
46
|
/**
|
|
@@ -32,396 +48,9 @@ const ShinyServerParams = ['input', undefined, 'session'];
|
|
|
32
48
|
* @see {@link LinkedInputEntryPoint}
|
|
33
49
|
*/
|
|
34
50
|
exports.LinkedInputEntryPoints = [
|
|
35
|
-
{ call: identifier_1.Identifier.
|
|
36
|
-
{ call: identifier_1.Identifier.
|
|
37
|
-
{ call: identifier_1.Identifier.
|
|
38
|
-
{ call: identifier_1.Identifier.
|
|
39
|
-
];
|
|
40
|
-
exports.PureFunctions = [
|
|
41
|
-
/* operators - syntax elements, impossible to call with :: in practice */
|
|
42
|
-
'+', '-', '*', '/', '^', '%%', '%/%',
|
|
43
|
-
'&', '|', '!', '&&', '||',
|
|
44
|
-
'<', '>', '<=', '>=', '==', '!=', ':',
|
|
45
|
-
'<-', '->', '=', '<<-', '->>',
|
|
46
|
-
'[', '[[', '$',
|
|
47
|
-
'length<-', 'dim<-', 'names<-', 'colnames<-', 'rownames<-',
|
|
48
|
-
/* base - string */
|
|
49
|
-
identifier_1.Identifier.make('paste', 'base'),
|
|
50
|
-
identifier_1.Identifier.make('paste0', 'base'),
|
|
51
|
-
identifier_1.Identifier.make('substr', 'base'),
|
|
52
|
-
identifier_1.Identifier.make('substring', 'base'),
|
|
53
|
-
identifier_1.Identifier.make('strsplit', 'base'),
|
|
54
|
-
identifier_1.Identifier.make('startsWith', 'base'),
|
|
55
|
-
identifier_1.Identifier.make('endsWith', 'base'),
|
|
56
|
-
identifier_1.Identifier.make('strrep', 'base'),
|
|
57
|
-
identifier_1.Identifier.make('chartr', 'base'),
|
|
58
|
-
identifier_1.Identifier.make('strtoi', 'base'),
|
|
59
|
-
identifier_1.Identifier.make('tolower', 'base'),
|
|
60
|
-
identifier_1.Identifier.make('toupper', 'base'),
|
|
61
|
-
identifier_1.Identifier.make('nchar', 'base'),
|
|
62
|
-
identifier_1.Identifier.make('trimws', 'base'),
|
|
63
|
-
identifier_1.Identifier.make('grep', 'base'),
|
|
64
|
-
identifier_1.Identifier.make('grepl', 'base'),
|
|
65
|
-
identifier_1.Identifier.make('sub', 'base'),
|
|
66
|
-
identifier_1.Identifier.make('gsub', 'base'),
|
|
67
|
-
identifier_1.Identifier.make('regexpr', 'base'),
|
|
68
|
-
identifier_1.Identifier.make('gregexpr', 'base'),
|
|
69
|
-
identifier_1.Identifier.make('regexec', 'base'),
|
|
70
|
-
identifier_1.Identifier.make('regmatches', 'base'),
|
|
71
|
-
identifier_1.Identifier.make('format', 'base'),
|
|
72
|
-
identifier_1.Identifier.make('sprintf', 'base'),
|
|
73
|
-
identifier_1.Identifier.make('formatC', 'base'),
|
|
74
|
-
/* base - math */
|
|
75
|
-
identifier_1.Identifier.make('abs', 'base'),
|
|
76
|
-
identifier_1.Identifier.make('sign', 'base'),
|
|
77
|
-
identifier_1.Identifier.make('sqrt', 'base'),
|
|
78
|
-
identifier_1.Identifier.make('exp', 'base'),
|
|
79
|
-
identifier_1.Identifier.make('log', 'base'),
|
|
80
|
-
identifier_1.Identifier.make('log10', 'base'),
|
|
81
|
-
identifier_1.Identifier.make('log2', 'base'),
|
|
82
|
-
identifier_1.Identifier.make('sin', 'base'),
|
|
83
|
-
identifier_1.Identifier.make('cos', 'base'),
|
|
84
|
-
identifier_1.Identifier.make('tan', 'base'),
|
|
85
|
-
identifier_1.Identifier.make('atan2', 'base'),
|
|
86
|
-
identifier_1.Identifier.make('asin', 'base'),
|
|
87
|
-
identifier_1.Identifier.make('acos', 'base'),
|
|
88
|
-
identifier_1.Identifier.make('atan', 'base'),
|
|
89
|
-
identifier_1.Identifier.make('sinh', 'base'),
|
|
90
|
-
identifier_1.Identifier.make('cosh', 'base'),
|
|
91
|
-
identifier_1.Identifier.make('tanh', 'base'),
|
|
92
|
-
identifier_1.Identifier.make('asinh', 'base'),
|
|
93
|
-
identifier_1.Identifier.make('acosh', 'base'),
|
|
94
|
-
identifier_1.Identifier.make('atanh', 'base'),
|
|
95
|
-
identifier_1.Identifier.make('round', 'base'),
|
|
96
|
-
identifier_1.Identifier.make('floor', 'base'),
|
|
97
|
-
identifier_1.Identifier.make('ceiling', 'base'),
|
|
98
|
-
identifier_1.Identifier.make('trunc', 'base'),
|
|
99
|
-
identifier_1.Identifier.make('signif', 'base'),
|
|
100
|
-
identifier_1.Identifier.make('Re', 'base'),
|
|
101
|
-
identifier_1.Identifier.make('Im', 'base'),
|
|
102
|
-
identifier_1.Identifier.make('Mod', 'base'),
|
|
103
|
-
identifier_1.Identifier.make('Arg', 'base'),
|
|
104
|
-
identifier_1.Identifier.make('Conj', 'base'),
|
|
105
|
-
identifier_1.Identifier.make('bitwNot', 'base'),
|
|
106
|
-
identifier_1.Identifier.make('bitwAnd', 'base'),
|
|
107
|
-
identifier_1.Identifier.make('bitwOr', 'base'),
|
|
108
|
-
identifier_1.Identifier.make('bitwXor', 'base'),
|
|
109
|
-
identifier_1.Identifier.make('bitwShiftL', 'base'),
|
|
110
|
-
identifier_1.Identifier.make('bitwShiftR', 'base'),
|
|
111
|
-
identifier_1.Identifier.make('xor', 'base'),
|
|
112
|
-
/* base - summary / sequence */
|
|
113
|
-
identifier_1.Identifier.make('min', 'base'),
|
|
114
|
-
identifier_1.Identifier.make('max', 'base'),
|
|
115
|
-
identifier_1.Identifier.make('range', 'base'),
|
|
116
|
-
identifier_1.Identifier.make('sum', 'base'),
|
|
117
|
-
identifier_1.Identifier.make('prod', 'base'),
|
|
118
|
-
identifier_1.Identifier.make('mean', 'base'),
|
|
119
|
-
identifier_1.Identifier.make('cumsum', 'base'),
|
|
120
|
-
identifier_1.Identifier.make('cumprod', 'base'),
|
|
121
|
-
identifier_1.Identifier.make('cummax', 'base'),
|
|
122
|
-
identifier_1.Identifier.make('cummin', 'base'),
|
|
123
|
-
identifier_1.Identifier.make('diff', 'base'),
|
|
124
|
-
identifier_1.Identifier.make('pmin', 'base'),
|
|
125
|
-
identifier_1.Identifier.make('pmax', 'base'),
|
|
126
|
-
identifier_1.Identifier.make('which', 'base'),
|
|
127
|
-
identifier_1.Identifier.make('which.min', 'base'),
|
|
128
|
-
identifier_1.Identifier.make('which.max', 'base'),
|
|
129
|
-
identifier_1.Identifier.make('match', 'base'),
|
|
130
|
-
identifier_1.Identifier.make('order', 'base'),
|
|
131
|
-
identifier_1.Identifier.make('sort', 'base'),
|
|
132
|
-
identifier_1.Identifier.make('unique', 'base'),
|
|
133
|
-
identifier_1.Identifier.make('duplicated', 'base'),
|
|
134
|
-
identifier_1.Identifier.make('seq', 'base'),
|
|
135
|
-
identifier_1.Identifier.make('rep', 'base'),
|
|
136
|
-
identifier_1.Identifier.make('seq_len', 'base'),
|
|
137
|
-
identifier_1.Identifier.make('seq_along', 'base'),
|
|
138
|
-
identifier_1.Identifier.make('rep.int', 'base'),
|
|
139
|
-
/* base - data structures */
|
|
140
|
-
identifier_1.Identifier.make('c', 'base'),
|
|
141
|
-
identifier_1.Identifier.make('list', 'base'),
|
|
142
|
-
identifier_1.Identifier.make('data.frame', 'base'),
|
|
143
|
-
identifier_1.Identifier.make('matrix', 'base'),
|
|
144
|
-
identifier_1.Identifier.make('array', 'base'),
|
|
145
|
-
identifier_1.Identifier.make('rbind', 'base'),
|
|
146
|
-
identifier_1.Identifier.make('cbind', 'base'),
|
|
147
|
-
identifier_1.Identifier.make('t', 'base'),
|
|
148
|
-
identifier_1.Identifier.make('crossprod', 'base'),
|
|
149
|
-
identifier_1.Identifier.make('tcrossprod', 'base'),
|
|
150
|
-
identifier_1.Identifier.make('append', 'base'),
|
|
151
|
-
identifier_1.Identifier.make('rev', 'base'),
|
|
152
|
-
identifier_1.Identifier.make('setdiff', 'base'),
|
|
153
|
-
identifier_1.Identifier.make('union', 'base'),
|
|
154
|
-
identifier_1.Identifier.make('intersect', 'base'),
|
|
155
|
-
identifier_1.Identifier.make('table', 'base'),
|
|
156
|
-
identifier_1.Identifier.make('prop.table', 'base'),
|
|
157
|
-
identifier_1.Identifier.make('rownames', 'base'),
|
|
158
|
-
identifier_1.Identifier.make('colnames', 'base'),
|
|
159
|
-
identifier_1.Identifier.make('length', 'base'),
|
|
160
|
-
identifier_1.Identifier.make('dim', 'base'),
|
|
161
|
-
identifier_1.Identifier.make('nrow', 'base'),
|
|
162
|
-
identifier_1.Identifier.make('ncol', 'base'),
|
|
163
|
-
identifier_1.Identifier.make('colSums', 'base'),
|
|
164
|
-
identifier_1.Identifier.make('rowSums', 'base'),
|
|
165
|
-
identifier_1.Identifier.make('colMeans', 'base'),
|
|
166
|
-
identifier_1.Identifier.make('rowMeans', 'base'),
|
|
167
|
-
/* base - linear algebra */
|
|
168
|
-
identifier_1.Identifier.make('solve', 'base'),
|
|
169
|
-
identifier_1.Identifier.make('det', 'base'),
|
|
170
|
-
identifier_1.Identifier.make('eigen', 'base'),
|
|
171
|
-
/* base - control flow / functional */
|
|
172
|
-
identifier_1.Identifier.make('ifelse', 'base'),
|
|
173
|
-
identifier_1.Identifier.make('switch', 'base'),
|
|
174
|
-
identifier_1.Identifier.make('do.call', 'base'),
|
|
175
|
-
identifier_1.Identifier.make('Reduce', 'base'),
|
|
176
|
-
identifier_1.Identifier.make('Filter', 'base'),
|
|
177
|
-
identifier_1.Identifier.make('Map', 'base'),
|
|
178
|
-
identifier_1.Identifier.make('Find', 'base'),
|
|
179
|
-
identifier_1.Identifier.make('Position', 'base'),
|
|
180
|
-
identifier_1.Identifier.make('Negate', 'base'),
|
|
181
|
-
identifier_1.Identifier.make('apply', 'base'),
|
|
182
|
-
identifier_1.Identifier.make('lapply', 'base'),
|
|
183
|
-
identifier_1.Identifier.make('sapply', 'base'),
|
|
184
|
-
identifier_1.Identifier.make('vapply', 'base'),
|
|
185
|
-
identifier_1.Identifier.make('tapply', 'base'),
|
|
186
|
-
identifier_1.Identifier.make('mapply', 'base'),
|
|
187
|
-
identifier_1.Identifier.make('rapply', 'base'),
|
|
188
|
-
/* base - type coercion & construction */
|
|
189
|
-
identifier_1.Identifier.make('factor', 'base'),
|
|
190
|
-
identifier_1.Identifier.make('as.factor', 'base'),
|
|
191
|
-
identifier_1.Identifier.make('as.character', 'base'),
|
|
192
|
-
identifier_1.Identifier.make('as.numeric', 'base'),
|
|
193
|
-
identifier_1.Identifier.make('as.logical', 'base'),
|
|
194
|
-
identifier_1.Identifier.make('as.raw', 'base'),
|
|
195
|
-
identifier_1.Identifier.make('as.list', 'base'),
|
|
196
|
-
identifier_1.Identifier.make('as.data.frame', 'base'),
|
|
197
|
-
identifier_1.Identifier.make('as.matrix', 'base'),
|
|
198
|
-
identifier_1.Identifier.make('as.array', 'base'),
|
|
199
|
-
identifier_1.Identifier.make('as.integer', 'base'),
|
|
200
|
-
identifier_1.Identifier.make('as.double', 'base'),
|
|
201
|
-
identifier_1.Identifier.make('as.complex', 'base'),
|
|
202
|
-
identifier_1.Identifier.make('numeric', 'base'),
|
|
203
|
-
identifier_1.Identifier.make('character', 'base'),
|
|
204
|
-
identifier_1.Identifier.make('logical', 'base'),
|
|
205
|
-
identifier_1.Identifier.make('integer', 'base'),
|
|
206
|
-
identifier_1.Identifier.make('double', 'base'),
|
|
207
|
-
identifier_1.Identifier.make('raw', 'base'),
|
|
208
|
-
identifier_1.Identifier.make('complex', 'base'),
|
|
209
|
-
/* base - type predicates */
|
|
210
|
-
identifier_1.Identifier.make('is.na', 'base'),
|
|
211
|
-
identifier_1.Identifier.make('is.null', 'base'),
|
|
212
|
-
identifier_1.Identifier.make('is.numeric', 'base'),
|
|
213
|
-
identifier_1.Identifier.make('is.character', 'base'),
|
|
214
|
-
identifier_1.Identifier.make('is.finite', 'base'),
|
|
215
|
-
identifier_1.Identifier.make('is.infinite', 'base'),
|
|
216
|
-
identifier_1.Identifier.make('is.nan', 'base'),
|
|
217
|
-
identifier_1.Identifier.make('is.factor', 'base'),
|
|
218
|
-
identifier_1.Identifier.make('is.logical', 'base'),
|
|
219
|
-
identifier_1.Identifier.make('is.vector', 'base'),
|
|
220
|
-
identifier_1.Identifier.make('is.matrix', 'base'),
|
|
221
|
-
identifier_1.Identifier.make('is.data.frame', 'base'),
|
|
222
|
-
/* base - environment / identity / flow */
|
|
223
|
-
identifier_1.Identifier.make('assign', 'base'),
|
|
224
|
-
identifier_1.Identifier.make('get', 'base'),
|
|
225
|
-
identifier_1.Identifier.make('identity', 'base'),
|
|
226
|
-
identifier_1.Identifier.make('invisible', 'base'),
|
|
227
|
-
identifier_1.Identifier.make('return', 'base'),
|
|
228
|
-
identifier_1.Identifier.make('force', 'base'),
|
|
229
|
-
identifier_1.Identifier.make('missing', 'base'),
|
|
230
|
-
identifier_1.Identifier.make('match.arg', 'base'),
|
|
231
|
-
identifier_1.Identifier.make('print', 'base'),
|
|
232
|
-
identifier_1.Identifier.make('cat', 'base'),
|
|
233
|
-
identifier_1.Identifier.make('message', 'base'),
|
|
234
|
-
identifier_1.Identifier.make('warning', 'base'),
|
|
235
|
-
identifier_1.Identifier.make('stop', 'base'),
|
|
236
|
-
identifier_1.Identifier.make('parse', 'base'),
|
|
237
|
-
identifier_1.Identifier.make('list.files', 'base'),
|
|
238
|
-
/* utils */
|
|
239
|
-
identifier_1.Identifier.make('head', 'utils'),
|
|
240
|
-
identifier_1.Identifier.make('tail', 'utils'),
|
|
241
|
-
/* stats - deterministic given their inputs */
|
|
242
|
-
identifier_1.Identifier.make('var', 'stats'),
|
|
243
|
-
identifier_1.Identifier.make('sd', 'stats'),
|
|
244
|
-
identifier_1.Identifier.make('median', 'stats'),
|
|
245
|
-
identifier_1.Identifier.make('quantile', 'stats'),
|
|
246
|
-
identifier_1.Identifier.make('cor', 'stats'),
|
|
247
|
-
identifier_1.Identifier.make('cov', 'stats'),
|
|
248
|
-
identifier_1.Identifier.make('na.omit', 'stats'),
|
|
249
|
-
identifier_1.Identifier.make('xtabs', 'stats'),
|
|
250
|
-
/* shiny - wrappers that hand their expression on; the reactives among them do so through a call (`r()`).
|
|
251
|
-
`observe`/`observeEvent`/`render*` are left out on purpose: they return an observer or render handle,
|
|
252
|
-
not the value of their expression. */
|
|
253
|
-
identifier_1.Identifier.make('reactive', 'shiny'),
|
|
254
|
-
identifier_1.Identifier.make('eventReactive', 'shiny'),
|
|
255
|
-
identifier_1.Identifier.make('bindEvent', 'shiny'),
|
|
256
|
-
identifier_1.Identifier.make('bindCache', 'shiny'),
|
|
257
|
-
identifier_1.Identifier.make('isolate', 'shiny'),
|
|
258
|
-
identifier_1.Identifier.make('req', 'shiny'),
|
|
259
|
-
identifier_1.Identifier.make('debounce', 'shiny'),
|
|
260
|
-
identifier_1.Identifier.make('throttle', 'shiny'),
|
|
261
|
-
identifier_1.Identifier.make('reactiveVal', 'shiny'),
|
|
262
|
-
identifier_1.Identifier.make('reactiveValues', 'shiny'),
|
|
263
|
-
identifier_1.Identifier.make('reactiveValuesToList', 'shiny'),
|
|
264
|
-
identifier_1.Identifier.make('freezeReactiveVal', 'shiny'),
|
|
265
|
-
/* cohortBuilder - assembling a cohort keeps the data of its source */
|
|
266
|
-
identifier_1.Identifier.make('cohort', 'cohortBuilder'),
|
|
267
|
-
identifier_1.Identifier.make('set_source', 'cohortBuilder'),
|
|
268
|
-
identifier_1.Identifier.make('add_source', 'cohortBuilder'),
|
|
269
|
-
identifier_1.Identifier.make('update_source', 'cohortBuilder'),
|
|
270
|
-
identifier_1.Identifier.make('add_filter', 'cohortBuilder'),
|
|
271
|
-
identifier_1.Identifier.make('update_filter', 'cohortBuilder'),
|
|
272
|
-
identifier_1.Identifier.make('rm_filter', 'cohortBuilder'),
|
|
273
|
-
identifier_1.Identifier.make('bind_key', 'cohortBuilder'),
|
|
274
|
-
identifier_1.Identifier.make('bind_keys', 'cohortBuilder'),
|
|
275
|
-
identifier_1.Identifier.make('as.tblist', 'cohortBuilder'),
|
|
276
|
-
identifier_1.Identifier.make('tblist', 'cohortBuilder'),
|
|
277
|
-
/* generic names, only matched bare while cohortBuilder is attached */
|
|
278
|
-
identifier_1.Identifier.make('filter', 'cohortBuilder'),
|
|
279
|
-
identifier_1.Identifier.make('step', 'cohortBuilder'),
|
|
280
|
-
identifier_1.Identifier.make('add_step', 'cohortBuilder'),
|
|
281
|
-
identifier_1.Identifier.make('rm_step', 'cohortBuilder'),
|
|
282
|
-
identifier_1.Identifier.make('run', 'cohortBuilder'),
|
|
283
|
-
identifier_1.Identifier.make('restore', 'cohortBuilder'),
|
|
284
|
-
];
|
|
285
|
-
exports.SystemFunctions = [
|
|
286
|
-
/* base */
|
|
287
|
-
identifier_1.Identifier.make('system', 'base'),
|
|
288
|
-
identifier_1.Identifier.make('system2', 'base'),
|
|
289
|
-
identifier_1.Identifier.make('pipe', 'base'),
|
|
290
|
-
identifier_1.Identifier.make('shell', 'base'),
|
|
291
|
-
identifier_1.Identifier.make('shell.exec', 'base'),
|
|
292
|
-
/* shinyjs - executes arbitrary JavaScript in the Shiny browser session */
|
|
293
|
-
identifier_1.Identifier.make('runjs', 'shinyjs'),
|
|
294
|
-
];
|
|
295
|
-
exports.FfiFunctions = [
|
|
296
|
-
/* base */
|
|
297
|
-
identifier_1.Identifier.make('.C', 'base'),
|
|
298
|
-
identifier_1.Identifier.make('.Call', 'base'),
|
|
299
|
-
identifier_1.Identifier.make('.Fortran', 'base'),
|
|
300
|
-
identifier_1.Identifier.make('.External', 'base'),
|
|
301
|
-
identifier_1.Identifier.make('dyn.load', 'base'),
|
|
302
|
-
identifier_1.Identifier.make('getNativeSymbolInfo', 'base'),
|
|
303
|
-
/* Rcpp */
|
|
304
|
-
identifier_1.Identifier.make('sourceCpp', 'Rcpp'),
|
|
305
|
-
];
|
|
306
|
-
exports.LangFunctions = [
|
|
307
|
-
/* base - quoting / AST construction */
|
|
308
|
-
identifier_1.Identifier.make('substitute', 'base'),
|
|
309
|
-
identifier_1.Identifier.make('quote', 'base'),
|
|
310
|
-
identifier_1.Identifier.make('enquote', 'base'),
|
|
311
|
-
identifier_1.Identifier.make('bquote', 'base'),
|
|
312
|
-
identifier_1.Identifier.make('call', 'base'),
|
|
313
|
-
identifier_1.Identifier.make('as.call', 'base'),
|
|
314
|
-
identifier_1.Identifier.make('expression', 'base'),
|
|
315
|
-
identifier_1.Identifier.make('as.expression', 'base'),
|
|
316
|
-
// 'str2lang', 'str2expression' - excluded: evaluated as strings, not AST
|
|
317
|
-
identifier_1.Identifier.make('as.name', 'base'),
|
|
318
|
-
identifier_1.Identifier.make('as.symbol', 'base'),
|
|
319
|
-
identifier_1.Identifier.make('alist', 'base'),
|
|
320
|
-
identifier_1.Identifier.make('as.language', 'base'),
|
|
321
|
-
identifier_1.Identifier.make('evalq', 'base'),
|
|
322
|
-
/* base - call / function introspection */
|
|
323
|
-
identifier_1.Identifier.make('match.call', 'base'),
|
|
324
|
-
identifier_1.Identifier.make('sys.call', 'base'),
|
|
325
|
-
identifier_1.Identifier.make('sys.function', 'base'),
|
|
326
|
-
identifier_1.Identifier.make('body', 'base'),
|
|
327
|
-
identifier_1.Identifier.make('formals', 'base'),
|
|
328
|
-
identifier_1.Identifier.make('args', 'base'),
|
|
329
|
-
identifier_1.Identifier.make('deparse', 'base'),
|
|
330
|
-
identifier_1.Identifier.make('deparse1', 'base'),
|
|
331
|
-
/* rlang - tidy evaluation */
|
|
332
|
-
identifier_1.Identifier.make('expr', 'rlang'),
|
|
333
|
-
identifier_1.Identifier.make('exprs', 'rlang'),
|
|
334
|
-
identifier_1.Identifier.make('enexpr', 'rlang'),
|
|
335
|
-
identifier_1.Identifier.make('enexprs', 'rlang'),
|
|
336
|
-
identifier_1.Identifier.make('inject', 'rlang'),
|
|
337
|
-
identifier_1.Identifier.make('quo', 'rlang'),
|
|
338
|
-
identifier_1.Identifier.make('quos', 'rlang'),
|
|
339
|
-
identifier_1.Identifier.make('enquo', 'rlang'),
|
|
340
|
-
identifier_1.Identifier.make('enquos', 'rlang'),
|
|
341
|
-
identifier_1.Identifier.make('enquo0', 'rlang'),
|
|
342
|
-
identifier_1.Identifier.make('enquos0', 'rlang'),
|
|
343
|
-
identifier_1.Identifier.make('sym', 'rlang'),
|
|
344
|
-
identifier_1.Identifier.make('syms', 'rlang'),
|
|
345
|
-
identifier_1.Identifier.make('ensym', 'rlang'),
|
|
346
|
-
identifier_1.Identifier.make('ensyms', 'rlang'),
|
|
347
|
-
identifier_1.Identifier.make('new_formula', 'rlang'),
|
|
348
|
-
identifier_1.Identifier.make('f_rhs', 'rlang'),
|
|
349
|
-
identifier_1.Identifier.make('f_lhs', 'rlang'),
|
|
350
|
-
identifier_1.Identifier.make('fn_body', 'rlang'),
|
|
351
|
-
identifier_1.Identifier.make('fn_fmls', 'rlang'),
|
|
352
|
-
identifier_1.Identifier.make('fn_fmls_names', 'rlang'),
|
|
353
|
-
];
|
|
354
|
-
exports.OptionsFunctions = [
|
|
355
|
-
/* base */
|
|
356
|
-
identifier_1.Identifier.make('options', 'base'),
|
|
357
|
-
identifier_1.Identifier.make('getOption', 'base'),
|
|
358
|
-
identifier_1.Identifier.make('Sys.getenv', 'base'),
|
|
359
|
-
identifier_1.Identifier.make('Sys.info', 'base'),
|
|
360
|
-
identifier_1.Identifier.make('Sys.getpid', 'base'),
|
|
361
|
-
identifier_1.Identifier.make('getwd', 'base'),
|
|
362
|
-
identifier_1.Identifier.make('getRversion', 'base'),
|
|
363
|
-
identifier_1.Identifier.make('R.Version', 'base'),
|
|
364
|
-
];
|
|
365
|
-
exports.UserFunctions = [
|
|
366
|
-
/* base */
|
|
367
|
-
identifier_1.Identifier.make('readline', 'base'),
|
|
368
|
-
identifier_1.Identifier.make('scan', 'base'),
|
|
369
|
-
identifier_1.Identifier.make('file.choose', 'base'),
|
|
370
|
-
/* utils */
|
|
371
|
-
identifier_1.Identifier.make('askYesNo', 'utils'),
|
|
372
|
-
identifier_1.Identifier.make('choose.files', 'utils'),
|
|
373
|
-
identifier_1.Identifier.make('choose.dir', 'utils'),
|
|
374
|
-
identifier_1.Identifier.make('menu', 'utils'),
|
|
375
|
-
identifier_1.Identifier.make('select.list', 'utils'),
|
|
376
|
-
identifier_1.Identifier.make('winDialogString', 'utils'),
|
|
377
|
-
identifier_1.Identifier.make('winDialog', 'utils'),
|
|
378
|
-
/* rstudioapi */
|
|
379
|
-
identifier_1.Identifier.make('showPrompt', 'rstudioapi'),
|
|
380
|
-
identifier_1.Identifier.make('askForPassword', 'rstudioapi'),
|
|
381
|
-
identifier_1.Identifier.make('selectDirectory', 'rstudioapi'),
|
|
382
|
-
identifier_1.Identifier.make('selectFile', 'rstudioapi'),
|
|
383
|
-
identifier_1.Identifier.make('showQuestion', 'rstudioapi'),
|
|
384
|
-
/* svDialogs */
|
|
385
|
-
identifier_1.Identifier.make('dlgInput', 'svDialogs'),
|
|
386
|
-
identifier_1.Identifier.make('dlgOpen', 'svDialogs'),
|
|
387
|
-
identifier_1.Identifier.make('dlgList', 'svDialogs'),
|
|
388
|
-
identifier_1.Identifier.make('dlgSave', 'svDialogs'),
|
|
389
|
-
identifier_1.Identifier.make('dlgDir', 'svDialogs'),
|
|
390
|
-
/* tcltk */
|
|
391
|
-
identifier_1.Identifier.make('tk_choose.files', 'tcltk'),
|
|
392
|
-
identifier_1.Identifier.make('tk_choose.dir', 'tcltk'),
|
|
393
|
-
/* shiny - everything the browser sends along with a request */
|
|
394
|
-
identifier_1.Identifier.make('parseQueryString', 'shiny'),
|
|
395
|
-
identifier_1.Identifier.make('getQueryString', 'shiny'),
|
|
396
|
-
identifier_1.Identifier.make('getUrlHash', 'shiny'),
|
|
397
|
-
identifier_1.Identifier.make('restoreInput', 'shiny'),
|
|
398
|
-
/* shinyFiles - paths the user picks in the browser */
|
|
399
|
-
identifier_1.Identifier.make('parseFilePaths', 'shinyFiles'),
|
|
400
|
-
identifier_1.Identifier.make('parseDirPath', 'shinyFiles'),
|
|
401
|
-
identifier_1.Identifier.make('parseSavePath', 'shinyFiles'),
|
|
402
|
-
identifier_1.Identifier.make('shinyFileChoose', 'shinyFiles'),
|
|
403
|
-
identifier_1.Identifier.make('shinyDirChoose', 'shinyFiles'),
|
|
404
|
-
identifier_1.Identifier.make('shinyFileSave', 'shinyFiles'),
|
|
405
|
-
/* cohortBuilder - the data that comes out of a cohort depends on the filters the user set */
|
|
406
|
-
identifier_1.Identifier.make('get_data', 'cohortBuilder'),
|
|
407
|
-
identifier_1.Identifier.make('sum_up', 'cohortBuilder'),
|
|
408
|
-
identifier_1.Identifier.make('attrition', 'cohortBuilder'),
|
|
409
|
-
identifier_1.Identifier.make('get_state', 'cohortBuilder'),
|
|
410
|
-
identifier_1.Identifier.make('code', 'cohortBuilder'),
|
|
411
|
-
identifier_1.Identifier.make('stat', 'cohortBuilder'),
|
|
412
|
-
/* shinyCohortBuilder - the gui that lets the user set those filters */
|
|
413
|
-
identifier_1.Identifier.make('cb_server', 'shinyCohortBuilder'),
|
|
414
|
-
identifier_1.Identifier.make('cb_ui', 'shinyCohortBuilder'),
|
|
415
|
-
identifier_1.Identifier.make('cb_chat_server', 'shinyCohortBuilder'),
|
|
416
|
-
identifier_1.Identifier.make('cb_chat_ui', 'shinyCohortBuilder'),
|
|
417
|
-
identifier_1.Identifier.make('gui', 'shinyCohortBuilder'),
|
|
418
|
-
identifier_1.Identifier.make('demo_app', 'shinyCohortBuilder'),
|
|
419
|
-
];
|
|
420
|
-
/** R functions that produce temporary file/directory paths (sub-type of {@link InputType.File}). */
|
|
421
|
-
exports.TempFileFunctions = [
|
|
422
|
-
identifier_1.Identifier.make('tempfile', 'base'), identifier_1.Identifier.make('tempdir', 'base'),
|
|
423
|
-
identifier_1.Identifier.make('file_temp', 'fs'), identifier_1.Identifier.make('dir_temp', 'fs'),
|
|
424
|
-
identifier_1.Identifier.make('local_tempfile', 'withr'), identifier_1.Identifier.make('with_tempfile', 'withr'),
|
|
425
|
-
identifier_1.Identifier.make('local_tempdir', 'withr'), identifier_1.Identifier.make('with_tempdir', 'withr'),
|
|
51
|
+
{ call: identifier_1.Identifier.from(['shinyApp', "shiny" /* PkgName.Shiny */]), argName: 'server', argIdx: 1, params: ShinyServerParams },
|
|
52
|
+
{ call: identifier_1.Identifier.from(['shinyServer', "shiny" /* PkgName.Shiny */]), argName: 'func', argIdx: 0, params: ShinyServerParams },
|
|
53
|
+
{ call: identifier_1.Identifier.from(['moduleServer', "shiny" /* PkgName.Shiny */]), argName: 'module', argIdx: 1, params: ShinyServerParams },
|
|
54
|
+
{ call: identifier_1.Identifier.from(['callModule', "shiny" /* PkgName.Shiny */]), argName: 'module', argIdx: 0, params: ShinyServerParams }
|
|
426
55
|
];
|
|
427
56
|
//# sourceMappingURL=input-source-functions.js.map
|
|
@@ -69,16 +69,21 @@ function addAll(base, extra) {
|
|
|
69
69
|
}
|
|
70
70
|
return result;
|
|
71
71
|
}
|
|
72
|
+
/** Config fields that hold structured values (not function searches) and are carried over verbatim. */
|
|
73
|
+
const StructuredConfigKeys = ['linkedObjects', 'linkedEntryPoints', 'narrowing'];
|
|
74
|
+
function isStructuredConfigKey(key) {
|
|
75
|
+
return StructuredConfigKeys.includes(key);
|
|
76
|
+
}
|
|
72
77
|
async function resolveSearches(analyzer, config) {
|
|
78
|
+
/* structured (non-search) fields are carried over as-is; everything else is a resolvable function search */
|
|
73
79
|
const result = {};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
result.linkedEntryPoints = config.linkedEntryPoints;
|
|
80
|
+
for (const key of StructuredConfigKeys) {
|
|
81
|
+
if (config[key] !== undefined) {
|
|
82
|
+
result[key] = config[key];
|
|
83
|
+
}
|
|
79
84
|
}
|
|
80
85
|
for (const [key, value] of record_1.Record.entries(config)) {
|
|
81
|
-
if (key
|
|
86
|
+
if (isStructuredConfigKey(key)) {
|
|
82
87
|
continue;
|
|
83
88
|
}
|
|
84
89
|
else if (value === undefined || Array.isArray(value)) {
|
|
@@ -24,6 +24,13 @@ export interface InputSourcesQuery extends BaseQueryFormat {
|
|
|
24
24
|
readonly criterion: SlicingCriterion | readonly SlicingCriterion[];
|
|
25
25
|
readonly config?: InputSourcesQueryConfig;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* Which functions belong to which input type is stated with the functions themselves, in the
|
|
29
|
+
* {@link DefaultBuiltinConfig|built-in configuration}: a function that states its props and carries none of the
|
|
30
|
+
* {@link InputProps} derives its result from its arguments, the others bring in data of their own, and a
|
|
31
|
+
* {@link CallProp.Narrows} one bounds its result no matter what flows in.
|
|
32
|
+
* Add a function there (or override its props with your own built-in definitions) and it shows up here.
|
|
33
|
+
*/
|
|
27
34
|
export declare const DefaultInputClassifierConfig: InputClassifierConfig;
|
|
28
35
|
export interface InputSourcesQueryResult extends BaseQueryResult {
|
|
29
36
|
/** For each query key, a list of classified input sources (each with id and all traces) */
|
|
@@ -16,19 +16,37 @@ const linter_format_1 = require("../../../linter/linter-format");
|
|
|
16
16
|
const record_1 = require("../../../util/record");
|
|
17
17
|
const read_functions_1 = require("../dependencies-query/function-info/read-functions");
|
|
18
18
|
const input_source_functions_1 = require("./input-source-functions");
|
|
19
|
+
const built_in_props_1 = require("../../../dataflow/environments/built-in-props");
|
|
20
|
+
const query_fn_props_1 = require("../../../dataflow/environments/query-fn-props");
|
|
21
|
+
const builtIns = query_fn_props_1.BuiltInIndex.default();
|
|
22
|
+
/**
|
|
23
|
+
* Which functions belong to which input type is stated with the functions themselves, in the
|
|
24
|
+
* {@link DefaultBuiltinConfig|built-in configuration}: a function that states its props and carries none of the
|
|
25
|
+
* {@link InputProps} derives its result from its arguments, the others bring in data of their own, and a
|
|
26
|
+
* {@link CallProp.Narrows} one bounds its result no matter what flows in.
|
|
27
|
+
* Add a function there (or override its props with your own built-in definitions) and it shows up here.
|
|
28
|
+
*/
|
|
19
29
|
exports.DefaultInputClassifierConfig = {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
30
|
+
/*
|
|
31
|
+
* every {@link CallProp.Pure} built-in is in here (a test checks it), but the label alone is too narrow:
|
|
32
|
+
* what matters for provenance is that the call invents no data of its own, not that it has no effect at
|
|
33
|
+
* all. `x <- z <- 'x'` has to stay constant across the assignments, and `print(x)` hands `x` back, yet
|
|
34
|
+
* neither is `Pure` (they rebind a name, they write to the console). So the set is every built-in that
|
|
35
|
+
* states its props and claims none of the {@link InputProps}.
|
|
36
|
+
*/
|
|
37
|
+
[simple_input_classifier_1.InputTraceType.Pure]: builtIns.without(built_in_props_1.InputProps),
|
|
38
|
+
[simple_input_classifier_1.InputType.File]: [...read_functions_1.ReadFunctions.map(readFunction => readFunction.name), ...builtIns.withAll(built_in_props_1.FileInputProps)],
|
|
39
|
+
[simple_input_classifier_1.InputType.TempFile]: builtIns.with(built_in_props_1.CallProp.TempFile),
|
|
23
40
|
[simple_input_classifier_1.InputType.Network]: flowr_search_builder_1.Q.fromQuery({ type: 'linter', rules: ['network-functions'] }, linter_format_1.LintingResultCertainty.Certain),
|
|
24
41
|
[simple_input_classifier_1.InputType.Random]: flowr_search_builder_1.Q.fromQuery({ type: 'linter', rules: ['seeded-randomness'] }),
|
|
25
|
-
[simple_input_classifier_1.InputType.System]:
|
|
26
|
-
[simple_input_classifier_1.InputType.Ffi]:
|
|
27
|
-
[simple_input_classifier_1.InputType.Lang]:
|
|
28
|
-
[simple_input_classifier_1.InputType.Options]:
|
|
29
|
-
[simple_input_classifier_1.InputType.User]:
|
|
42
|
+
[simple_input_classifier_1.InputType.System]: builtIns.with(built_in_props_1.CallProp.Process),
|
|
43
|
+
[simple_input_classifier_1.InputType.Ffi]: builtIns.with(built_in_props_1.CallProp.Ffi),
|
|
44
|
+
[simple_input_classifier_1.InputType.Lang]: builtIns.with(built_in_props_1.CallProp.Lang),
|
|
45
|
+
[simple_input_classifier_1.InputType.Options]: builtIns.with(built_in_props_1.CallProp.Ambient),
|
|
46
|
+
[simple_input_classifier_1.InputType.User]: builtIns.with(built_in_props_1.CallProp.User),
|
|
30
47
|
linkedObjects: input_source_functions_1.LinkedInputObjects,
|
|
31
|
-
linkedEntryPoints: input_source_functions_1.LinkedInputEntryPoints
|
|
48
|
+
linkedEntryPoints: input_source_functions_1.LinkedInputEntryPoints,
|
|
49
|
+
narrowing: (0, input_source_functions_1.narrowingFunctions)(builtIns)
|
|
32
50
|
};
|
|
33
51
|
function inputSourcesQueryLineParser(output, line, _config) {
|
|
34
52
|
const criterion = (0, slice_query_parser_1.sliceCriteriaParser)(line[0]);
|
|
@@ -73,7 +91,7 @@ exports.InputSourcesDefinition = {
|
|
|
73
91
|
config: joi_1.default.object({
|
|
74
92
|
[simple_input_classifier_1.InputTraceType.Pure]: joi_1.default.array().items(joi_1.default.string()).optional().description('Deterministic/pure functions: functions that preserve constantness of their inputs (e.g., arithmetic, parse).'),
|
|
75
93
|
[simple_input_classifier_1.InputType.File]: joi_1.default.array().items(joi_1.default.string()).optional().description('Functions that read from the filesystem and produce data (e.g., read.csv, readRDS).'),
|
|
76
|
-
[simple_input_classifier_1.InputType.TempFile]: joi_1.default.array().items(joi_1.default.string()).optional().description('Functions that produce temporary file
|
|
94
|
+
[simple_input_classifier_1.InputType.TempFile]: joi_1.default.array().items(joi_1.default.string()).optional().description('Functions that produce a temporary file path, which on its own touches no file system (e.g., tempfile, tempdir).'),
|
|
77
95
|
[simple_input_classifier_1.InputType.Network]: joi_1.default.array().items(joi_1.default.string()).optional().description('Functions that fetch data from the network (e.g., download.file, url connections).'),
|
|
78
96
|
[simple_input_classifier_1.InputType.Random]: joi_1.default.array().items(joi_1.default.string()).optional().description('Functions that produce randomness (e.g., runif, rnorm).'),
|
|
79
97
|
[simple_input_classifier_1.InputType.System]: joi_1.default.array().items(joi_1.default.string()).optional().description('Functions that execute system commands (e.g., system, system2, shell, pipe).'),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { NodeId } from '../../../r-bridge/lang-4.x/ast/model/processing/node-id';
|
|
2
2
|
import { InputTraceType, InputType } from './input-types';
|
|
3
3
|
export { InputTraceType, InputType } from './input-types';
|
|
4
4
|
import type { DataflowGraph } from '../../../dataflow/graph/graph';
|
|
@@ -50,6 +50,14 @@ export interface LinkedInputEntryPoint {
|
|
|
50
50
|
/** which {@link LinkedInputObject} the framework binds to each parameter, by position; `undefined` leaves one alone */
|
|
51
51
|
readonly params: readonly (string | undefined)[];
|
|
52
52
|
}
|
|
53
|
+
/** A function whose result is bounded by one argument (e.g. `match.arg` by its `choices`), classified by that argument alone. */
|
|
54
|
+
export interface NarrowingFunction {
|
|
55
|
+
readonly call: Identifier;
|
|
56
|
+
/** the name of the bounding argument; omit (with `argIdx`) for a result that is always a bounded, content-independent value */
|
|
57
|
+
readonly argName?: string;
|
|
58
|
+
/** the index of the bounding argument; omit (with `argName`) for an always-`DerivedConstant` result */
|
|
59
|
+
readonly argIdx?: number;
|
|
60
|
+
}
|
|
53
61
|
/**
|
|
54
62
|
* Scalar R constant values representable in TypeScript.
|
|
55
63
|
* `null` corresponds to R's `NULL`.
|
|
@@ -103,6 +111,11 @@ export interface InputClassifierConfig<Functions extends InputClassifierFunction
|
|
|
103
111
|
* @see {@link LinkedInputEntryPoint}
|
|
104
112
|
*/
|
|
105
113
|
linkedEntryPoints?: readonly LinkedInputEntryPoint[];
|
|
114
|
+
/**
|
|
115
|
+
* Functions whose result is bounded by one of their arguments (classified by that argument alone).
|
|
116
|
+
* @see {@link NarrowingFunction}
|
|
117
|
+
*/
|
|
118
|
+
narrowing?: readonly NarrowingFunction[];
|
|
106
119
|
}
|
|
107
120
|
/**
|
|
108
121
|
* Takes the given id which is expected to either be:
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.InputType = exports.InputTraceType = void 0;
|
|
4
4
|
exports.classifyInput = classifyInput;
|
|
5
|
+
const node_id_1 = require("../../../r-bridge/lang-4.x/ast/model/processing/node-id");
|
|
5
6
|
const input_types_1 = require("./input-types");
|
|
6
7
|
var input_types_2 = require("./input-types");
|
|
7
8
|
Object.defineProperty(exports, "InputTraceType", { enumerable: true, get: function () { return input_types_2.InputTraceType; } });
|
|
@@ -373,6 +374,29 @@ class InputClassifier {
|
|
|
373
374
|
}
|
|
374
375
|
}
|
|
375
376
|
}
|
|
377
|
+
else if (call.origin.includes(built_in_proc_name_1.BuiltInProcName.Get) && !(this.fullDfg ?? this.dfg).unknownSideEffects.has(node_id_1.NodeId.normalize(call.id))) {
|
|
378
|
+
// a statically resolved `get("x")` yields the value of the retrieved variable, read via its first argument
|
|
379
|
+
const ref = graph_1.FunctionArgument.getReference(call.args[0]);
|
|
380
|
+
const vtx = ref === undefined ? undefined : this.dfg.getVertex(ref);
|
|
381
|
+
if (vtx) {
|
|
382
|
+
return this.classifyCdsAndReturn(call, { ...this.classifyEntry(vtx), id: call.id });
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
// a narrowing function returns a bounded value: either one of a specific argument's values (e.g. `match.arg`
|
|
386
|
+
// -> its `choices`), or - with no bounding argument - a content-independent value like a count/index/logical
|
|
387
|
+
for (const narrow of this.config.narrowing ?? []) {
|
|
388
|
+
if (!this.matches(call, [narrow.call])) {
|
|
389
|
+
continue;
|
|
390
|
+
}
|
|
391
|
+
if (narrow.argIdx === undefined) {
|
|
392
|
+
return this.classifyCdsAndReturn(call, (0, objects_1.compactRecord)({ id: call.id, types: [input_types_1.InputType.DerivedConstant], trace: input_types_1.InputTraceType.Pure }));
|
|
393
|
+
}
|
|
394
|
+
const ref = this.argumentReference(call, narrow.argIdx, narrow.argName ?? '');
|
|
395
|
+
const vtx = ref === undefined ? undefined : this.dfg.getVertex(ref);
|
|
396
|
+
if (vtx) {
|
|
397
|
+
return this.classifyCdsAndReturn(call, { ...this.classifyEntry(vtx), id: call.id });
|
|
398
|
+
}
|
|
399
|
+
}
|
|
376
400
|
if (!this.matches(call, this.config.pure)) {
|
|
377
401
|
const types = [];
|
|
378
402
|
for (const type of record_1.Record.values(input_types_1.InputType)) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BasicQueryData } from '../../base-query-format';
|
|
2
2
|
import type { SignatureQuery, SignatureQueryResult, SignaturePackageView, SignatureFunctionView } from './signature-query-format';
|
|
3
3
|
import { type PackageSignatureSource } from '../../../project/sigdb/reader';
|
|
4
|
+
import type { REnvironmentInformation } from '../../../dataflow/environments/environment';
|
|
4
5
|
import type { CommandCompletions } from '../../../cli/repl/core';
|
|
5
6
|
/** the CRAN package landing page (only meaningful for CRAN packages, not base R) */
|
|
6
7
|
export declare function cranPageUrl(pkg: string): string;
|
|
@@ -23,7 +24,7 @@ export declare function rdrrDocUrl(pkg: string, fn: string, opts: {
|
|
|
23
24
|
* read-only CRAN GitHub mirror. `version` defaults to the source's latest; `undefined` when the source does
|
|
24
25
|
* not carry that function.
|
|
25
26
|
*/
|
|
26
|
-
export declare function signatureFunctionInfo(src: PackageSignatureSource, pkg: string, fnName: string, version?: string): SignatureFunctionView | undefined;
|
|
27
|
+
export declare function signatureFunctionInfo(src: PackageSignatureSource, pkg: string, fnName: string, version?: string, env?: REnvironmentInformation): SignatureFunctionView | undefined;
|
|
27
28
|
/** the full view of a package: version, kind, export breakdown, dependencies, and every function's view */
|
|
28
29
|
export declare function signaturePackageInfo(src: PackageSignatureSource, pkg: string, resolved?: string): SignaturePackageView | undefined;
|
|
29
30
|
/**
|