@eagleoutice/flowr 2.17.0 → 2.17.1

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.
Files changed (67) hide show
  1. package/README.md +8 -8
  2. package/config.d.ts +32 -0
  3. package/config.js +22 -2
  4. package/dataflow/environments/built-in-props.d.ts +16 -2
  5. package/dataflow/environments/built-in-props.js +23 -3
  6. package/dataflow/environments/built-in.js +13 -3
  7. package/dataflow/environments/default-builtin-config.d.ts +268 -7
  8. package/dataflow/environments/default-builtin-config.js +72 -13
  9. package/dataflow/environments/identifier.d.ts +7 -1
  10. package/dataflow/extractor.js +49 -14
  11. package/dataflow/fn/function-semantics.d.ts +1 -0
  12. package/linter/rules/network-functions.js +10 -2
  13. package/linter/rules/unused-import.js +11 -1
  14. package/package.json +1 -1
  15. package/project/cache/flowr-analyzer-cache.d.ts +4 -0
  16. package/project/cache/flowr-analyzer-cache.js +11 -0
  17. package/project/context/flowr-analyzer-dependencies-context.d.ts +3 -0
  18. package/project/context/flowr-analyzer-dependencies-context.js +6 -0
  19. package/project/context/flowr-file.d.ts +2 -2
  20. package/project/context/flowr-file.js +2 -2
  21. package/project/plugins/file-plugins/files/flowr-manifest-files.d.ts +39 -4
  22. package/project/plugins/file-plugins/files/flowr-manifest-files.js +134 -30
  23. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +1 -1
  24. package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.d.ts +7 -0
  25. package/project/plugins/file-plugins/flowr-analyzer-manifest-file-plugin.js +14 -1
  26. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.d.ts +1 -1
  27. package/project/plugins/file-plugins/flowr-analyzer-virtualenv-file-plugin.js +3 -3
  28. package/project/plugins/package-version-plugins/flowr-analyzer-meta-manifest-file-plugin.d.ts +18 -5
  29. package/project/plugins/package-version-plugins/flowr-analyzer-meta-manifest-file-plugin.js +43 -15
  30. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.d.ts +12 -0
  31. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-lockfile-plugin.js +31 -2
  32. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-on-demand-plugin.d.ts +58 -0
  33. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-on-demand-plugin.js +237 -0
  34. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.d.ts +8 -0
  35. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-plugin.js +8 -0
  36. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.d.ts +7 -0
  37. package/project/plugins/package-version-plugins/flowr-analyzer-package-versions-sigdb-plugin.js +24 -18
  38. package/project/plugins/plugin-registry.d.ts +5 -4
  39. package/project/plugins/plugin-registry.js +6 -0
  40. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +4 -4
  41. package/project/sigdb/decode.js +13 -3
  42. package/project/sigdb/memory-source.d.ts +6 -4
  43. package/project/sigdb/memory-source.js +6 -5
  44. package/project/sigdb/on-demand/fetch.d.ts +18 -0
  45. package/project/sigdb/on-demand/fetch.js +127 -0
  46. package/project/sigdb/on-demand/package-sources.d.ts +40 -0
  47. package/project/sigdb/on-demand/package-sources.js +263 -0
  48. package/project/sigdb/on-demand/recoverer.d.ts +40 -0
  49. package/project/sigdb/on-demand/recoverer.js +169 -0
  50. package/project/sigdb/on-demand/remote-sources.d.ts +72 -0
  51. package/project/sigdb/on-demand/remote-sources.js +132 -0
  52. package/project/sigdb/on-demand/tar.d.ts +19 -0
  53. package/project/sigdb/on-demand/tar.js +119 -0
  54. package/queries/catalog/dependencies-query/function-info/derived-functions.d.ts +5 -0
  55. package/queries/catalog/dependencies-query/function-info/derived-functions.js +17 -1
  56. package/queries/catalog/dependencies-query/function-info/read-functions.js +3 -1
  57. package/queries/catalog/dependencies-query/function-info/write-functions.js +11 -1
  58. package/r-bridge/data/data.d.ts +29 -0
  59. package/r-bridge/data/data.js +23 -0
  60. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.d.ts +4 -0
  61. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-executor.js +8 -0
  62. package/taint-analysis/predefined/secret-analysis.js +7 -2
  63. package/taint-analysis/taint-mapping.d.ts +5 -2
  64. package/taint-analysis/taint-mapping.js +17 -6
  65. package/util/flowr-version.d.ts +1 -1
  66. package/util/flowr-version.js +2 -2
  67. package/util/r-version.js +4 -2
@@ -120,7 +120,8 @@ exports.PlotFunctionPackages = {
120
120
  'stat_summary_2d', 'stat_summary_bin', 'stat_summary_hex', 'stat_unique', 'stat_ydensity', 'theme', 'theme_bw',
121
121
  'theme_classic', 'theme_dark', 'theme_get', 'theme_gray', 'theme_grey', 'theme_light', 'theme_linedraw',
122
122
  'theme_minimal', 'theme_replace', 'theme_sub_axis', 'theme_sub_axis_bottom', 'theme_sub_axis_left', 'theme_sub_axis_right', 'theme_sub_axis_top', 'theme_sub_axis_x', 'theme_sub_axis_y', 'theme_sub_legend', 'theme_sub_panel', 'theme_sub_plot', 'theme_sub_strip', 'theme_test', 'theme_update', 'theme_void', 'xlab', 'xlim', 'ylab', 'ylim'],
123
- ggpubr: ['gradient_color'],
123
+ ggpubr: ['ggballoonplot', 'ggbarplot', 'ggdensity', 'ggdonutchart', 'ggdotchart', 'ggdotplot', 'ggecdf', 'ggerrorplot', 'gghistogram',
124
+ 'ggline', 'ggmaplot', 'ggpaired', 'ggpie', 'ggqqplot', 'ggscatterhist', 'ggstripchart', 'ggviolin', 'gradient_color'],
124
125
  ggthemes: ['scale_color_calc', 'scale_color_canva', 'scale_color_colorblind', 'scale_color_continuous_tableau',
125
126
  'scale_color_economist', 'scale_color_excel', 'scale_color_excel_new', 'scale_color_few',
126
127
  'scale_color_fivethirtyeight', 'scale_color_gdocs', 'scale_color_gradient2_tableau',
@@ -141,6 +142,19 @@ exports.PlotFunctionPackages = {
141
142
  'theme_igray', 'theme_map', 'theme_pander', 'theme_par', 'theme_solarized', 'theme_solarized_2', 'theme_solid',
142
143
  'theme_stata', 'theme_tufte', 'theme_wsj'],
143
144
  HoRM: ['regressogram'],
145
+ ggmirt: ['conRelPlot', 'itemDist', 'itemInfoPlot', 'itemfitPlot', 'itempersonMap', 'personDist', 'personfitPlot',
146
+ 'scaleCharPlot', 'summaryPlot', 'testInfoCompare', 'testInfoPlot', 'tracePlot'],
147
+ GGally: ['ggbivariate', 'ggcoef', 'ggcoef_compare', 'ggcoef_model', 'ggcorr', 'ggduo', 'ggnet2', 'ggnostic', 'ggpairs',
148
+ 'ggparcoord', 'ggscatmat', 'ggsurv', 'ggtable', 'ggts'],
149
+ ggstatsplot: ['ggbarstats', 'ggbetweenstats', 'ggcoefstats', 'ggcorrmat', 'ggdotplotstats', 'gghistostats', 'ggpiestats',
150
+ 'ggscatterstats', 'ggwithinstats', 'grouped_ggbarstats', 'grouped_ggbetweenstats', 'grouped_ggcorrmat',
151
+ 'grouped_ggdotplotstats', 'grouped_gghistostats', 'grouped_ggpiestats', 'grouped_ggscatterstats', 'grouped_ggwithinstats'],
152
+ sjPlot: ['plot_frq', 'plot_grpfrq', 'plot_likert', 'plot_models', 'plot_residuals', 'plot_scatter', 'plot_stackfrq', 'plot_xtab'],
153
+ EnhancedVolcano: ['EnhancedVolcano'],
154
+ qgraph: ['centralityPlot', 'clusteringPlot', 'qgraph'],
155
+ semPlot: ['semPaths'],
156
+ psych: ['cor.plot', 'corPlot', 'error.bars', 'fa.diagram', 'pairs.panels', 'scatter.hist'],
157
+ mirt: ['itemplot'],
144
158
  gplots: ['bandplot', 'barplot2', 'boxplot2', 'bubbleplot', 'heatmap.2', 'lmplot2', 'overplot', 'plotCI',
145
159
  'plotmeans', 'residplot', 'sinkplot', 'textplot'],
146
160
  gridExtra: ['grid.arrange'],
@@ -191,6 +205,17 @@ exports.GgPlotCreate = [
191
205
  'ggplot', 'ggplotly', 'ggMarginal', 'ggcorrplot', 'ggseasonplot', 'ggdendrogram', 'qmap', 'qplot', 'quickplot', 'autoplot', 'grid.arrange',
192
206
  'fviz_pca_biplot', 'fviz_pca', 'fviz_pca_ind', 'fviz_pca_var', 'fviz_screeplot', 'fviz_mca_biplot', 'fviz_mca', 'fviz_mca_ind', 'fviz_mca_var', 'fviz_cluster', 'fviz_dend',
193
207
  'ggsurvplot',
208
+ /* ggmirt, plots of mirt models */
209
+ 'conRelPlot', 'itemDist', 'itemInfoPlot', 'itemfitPlot', 'itempersonMap', 'personDist', 'personfitPlot', 'scaleCharPlot', 'summaryPlot',
210
+ 'testInfoCompare', 'testInfoPlot', 'tracePlot',
211
+ 'ggbivariate', 'ggcoef', 'ggcoef_compare', 'ggcoef_model', 'ggcorr', 'ggduo', 'ggnet2', 'ggnostic', 'ggpairs', 'ggparcoord', 'ggscatmat', 'ggsurv', 'ggtable', 'ggts',
212
+ 'ggbarstats', 'ggbetweenstats', 'ggcoefstats', 'ggcorrmat', 'ggdotplotstats', 'gghistostats', 'ggpiestats', 'ggscatterstats', 'ggwithinstats',
213
+ 'grouped_ggbarstats', 'grouped_ggbetweenstats', 'grouped_ggcorrmat', 'grouped_ggdotplotstats', 'grouped_gghistostats', 'grouped_ggpiestats',
214
+ 'grouped_ggscatterstats', 'grouped_ggwithinstats',
215
+ 'ggbarplot', 'ggdensity', 'ggdotchart', 'ggdotplot', 'ggecdf', 'ggerrorplot', 'gghistogram', 'ggline', 'ggmaplot', 'ggpaired', 'ggpie',
216
+ 'ggdonutchart', 'ggqqplot', 'ggscatterhist', 'ggstripchart', 'ggviolin', 'ggballoonplot',
217
+ 'plot_frq', 'plot_grpfrq', 'plot_likert', 'plot_models', 'plot_residuals', 'plot_scatter', 'plot_stackfrq', 'plot_xtab',
218
+ 'EnhancedVolcano', 'centralityPlot', 'clusteringPlot'
194
219
  ];
195
220
  exports.TinyPlotCrate = [
196
221
  'tinyplot', 'plt'
@@ -202,11 +227,12 @@ exports.GraphicsPlotCreate = [
202
227
  'spineplot', 'regressogram', 'bootcurve', 'meanplot', 'vioplot', 'pairs', 'coplot', 'histogram', 'splom', 'leaflet', 'tm_shape', 'plot_ly', 'plotSimulatedResiduals', 'plotmeans',
203
228
  'overplot', 'residplot', 'heatmap.2', 'lmplot2', 'sinkplot', 'textplot', 'boxplot2',
204
229
  'ggarrange', 'ggboxplot', 'ggscatter', 'corrplot', 'plot_grid', 'wrap_plots', 'levelplot', 'image.plot', 'biplot', 'screeplot',
205
- 'interaction.plot', 'termplot', 'plot_model', 'emmip'
230
+ 'interaction.plot', 'termplot', 'plot_model', 'emmip',
231
+ 'qgraph', 'semPaths', 'pairs.panels', 'fa.diagram', 'corPlot', 'cor.plot', 'error.bars', 'scatter.hist', 'itemplot'
206
232
  ];
207
233
  exports.PlotCreate = exports.GraphicsPlotCreate.concat(exports.TinyPlotCrate, exports.GgPlotCreate);
208
234
  /** the creators above that, other than base graphics, return their plot visibly instead of drawing it at once */
209
- const VisiblePlotCreate = new Set(['xyplot', 'stripplot', 'bwplot', 'dotplot', 'histogram', 'splom', 'leaflet', 'plot_ly', 'tm_shape']);
235
+ const VisiblePlotCreate = new Set(['xyplot', 'stripplot', 'bwplot', 'dotplot', 'histogram', 'splom', 'leaflet', 'plot_ly', 'tm_shape', 'itemplot']);
210
236
  /** the plot creators that return the plot to draw when printed, where base graphics draw at once and return something else */
211
237
  exports.PlotObjectCreate = new Set([...exports.GgPlotCreate.filter(f => f !== 'grid.arrange'), 'last_plot', ...VisiblePlotCreate, 'pheatmap']);
212
238
  const GraphicDeviceOpen = [
@@ -281,6 +307,10 @@ const MagrittrPipePackages = ["magrittr" /* PkgName.Magrittr */, "dplyr" /* PkgN
281
307
  "tidyr" /* PkgName.TidyR */, "testthat" /* PkgName.Testthat */, "magick" /* PkgName.Magick */, "promises" /* PkgName.Promises */];
282
308
  /** The packages re-exporting rlang's tidy-evaluation helpers unchanged. */
283
309
  const TidyEvalPackages = ["rlang" /* PkgName.Rlang */, "dplyr" /* PkgName.Dplyr */, "ggplot2" /* PkgName.GgPlot2 */];
310
+ /** reads the files some arguments name and writes the ones its {@link ArgProp.Written} arguments name, like `file.copy` or `unzip` */
311
+ const CopiesFiles = [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads, built_in_props_1.SemanticCallTag.Writes];
312
+ /** reads what its URL (or remote object) arguments name from the network and writes the file its {@link ArgProp.Written} arguments name, like `download.file` */
313
+ const Downloads = [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads, built_in_props_1.SemanticCallTag.Writes];
284
314
  const SigAtomicBinOp = [['e1', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value | built_in_props_1.ArgProp.Atomic], ['e2', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value | built_in_props_1.ArgProp.Atomic]];
285
315
  const SigAtomicX = [['x', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value | built_in_props_1.ArgProp.Atomic]];
286
316
  const SigXY = [['x', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['y', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]];
@@ -922,27 +952,37 @@ exports.WrittenBuiltinDefinitions = [
922
952
  { type: 'function', names: [identifier_1.Identifier.from(['handle', "httr" /* PkgName.Httr */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Opens, built_in_props_1.SemanticCallTag.Network], sig: [['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
923
953
  { type: 'function', names: [identifier_1.Identifier.from(['oauth_endpoint', "httr" /* PkgName.Httr */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network], sig: [['request', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['authorize', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['access', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['base_url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
924
954
  { type: 'function', names: [identifier_1.Identifier.from(['curl', "curl" /* PkgName.Curl */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Opens, built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.Reads], sig: [['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['open', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Flag], ['handle', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Handle]] }, assumePrimitive: false },
925
- { type: 'function', names: identifier_1.Identifier.fromAll("curl" /* PkgName.Curl */, ['curl_fetch_memory', 'curl_fetch_disk', 'curl_fetch_stream', 'nslookup', 'curl_escape', 'has_internet']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.Reads], sig: [['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
926
- { type: 'function', names: [identifier_1.Identifier.from(['curl_download', "curl" /* PkgName.Curl */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: [['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['destfile', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['quiet', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Flag], ['mode', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['handle', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Handle]] }, assumePrimitive: false },
927
- { type: 'function', names: [identifier_1.Identifier.from(['multi_download', "curl" /* PkgName.Curl */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: [['urls', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['destfiles', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
955
+ { type: 'function', names: identifier_1.Identifier.fromAll("curl" /* PkgName.Curl */, ['curl_fetch_memory', 'curl_fetch_stream', 'nslookup', 'curl_escape', 'has_internet']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.Reads], sig: [['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
956
+ { type: 'function', names: [identifier_1.Identifier.from(['curl_fetch_disk', "curl" /* PkgName.Curl */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: Downloads, sig: [['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['path', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['handle', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Handle]] }, assumePrimitive: false },
957
+ { type: 'function', names: [identifier_1.Identifier.from(['curl_download', "curl" /* PkgName.Curl */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: Downloads, sig: [['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['destfile', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['quiet', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Flag], ['mode', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['handle', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Handle]] }, assumePrimitive: false },
958
+ { type: 'function', names: [identifier_1.Identifier.from(['multi_download', "curl" /* PkgName.Curl */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: Downloads, sig: [['urls', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['destfiles', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
928
959
  /* `curl_upload` sends a file somewhere, so the file it reads comes first and the address second */
929
960
  { type: 'function', names: [identifier_1.Identifier.from(['curl_upload', "curl" /* PkgName.Curl */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], sig: [['file', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['verbose', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Flag], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
930
961
  { type: 'function', names: [identifier_1.Identifier.from(['curl_echo', "curl" /* PkgName.Curl */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network], sig: [['handle', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Handle], ['port', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['progress', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Flag]] }, assumePrimitive: false },
931
962
  { type: 'function', names: [identifier_1.Identifier.from(['new_handle', "curl" /* PkgName.Curl */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Opens], sig: [['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
932
963
  { type: 'function', names: [identifier_1.Identifier.from(['getURL', "RCurl" /* PkgName.Rcurl */]), identifier_1.Identifier.from(['getForm', "rBDAT" /* PkgName.Rbdat */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.Reads], sig: [['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
933
964
  { type: 'function', names: identifier_1.Identifier.fromAll("xml2" /* PkgName.Xml2 */, ['read_html', 'read_xml']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], sig: [['x', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['encoding', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
934
- { type: 'function', names: identifier_1.Identifier.fromAll("xml2" /* PkgName.Xml2 */, ['download_html', 'download_xml']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: [['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['file', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
965
+ { type: 'function', names: identifier_1.Identifier.fromAll("xml2" /* PkgName.Xml2 */, ['download_html', 'download_xml']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: Downloads, sig: [['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['file', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
935
966
  { type: 'function', names: identifier_1.Identifier.fromAll("rvest" /* PkgName.Rvest */, ['html_nodes', 'html_text']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, sig: [['x', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
936
967
  { type: 'function', names: [identifier_1.Identifier.from(['read_html_live', "rvest" /* PkgName.Rvest */]), identifier_1.Identifier.from(['session', "rvest" /* PkgName.Rvest */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.Reads], sig: [['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
937
968
  { type: 'function', names: identifier_1.Identifier.fromAll("rvest" /* PkgName.Rvest */, ['session_jump_to', 'session_follow_link', 'session_submit', 'session_back', 'session_forward']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.Reads], sig: [['x', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Handle], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
938
969
  /* an `httr2` request is only a description until one of these performs it */
939
- { type: 'function', names: identifier_1.Identifier.fromAll("httr2" /* PkgName.Httr2 */, ['req_perform', 'req_perform_sequential', 'req_perform_parallel', 'req_perform_iterative', 'req_perform_stream', 'req_perform_connection', 'req_perform_promise']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.Reads], sig: [['req', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
970
+ { type: 'function', names: identifier_1.Identifier.fromAll("httr2" /* PkgName.Httr2 */, ['req_perform_sequential', 'req_perform_parallel', 'req_perform_iterative', 'req_perform_stream', 'req_perform_connection', 'req_perform_promise']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.Reads], sig: [['req', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
940
971
  { type: 'function', names: identifier_1.Identifier.fromAll("xfun" /* PkgName.Xfun */, ['url_filename', 'url_accessible', 'url_destination']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network], sig: [['x', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
941
972
  { type: 'function', names: identifier_1.Identifier.fromAll("googledrive" /* PkgName.GoogleDrive */, ['drive_get', 'shared_drive_get']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.Reads], sig: [['file', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
942
- { type: 'function', names: identifier_1.Identifier.fromAll("googledrive" /* PkgName.GoogleDrive */, ['drive_download', 'shared_drive_rm']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.Reads], sig: [['file', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
973
+ { type: 'function', names: identifier_1.Identifier.fromAll("googledrive" /* PkgName.GoogleDrive */, ['shared_drive_rm']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.Reads], sig: [['file', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
943
974
  { type: 'function', names: identifier_1.Identifier.fromAll("aws.s3" /* PkgName.AwsS3 */, ['s3read_using']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.Reads], sig: [['FUN', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Callee], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['object', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
944
975
  { type: 'function', names: identifier_1.Identifier.fromAll("aws.s3" /* PkgName.AwsS3 */, ['s3write_using']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.Reads], sig: [['FUN', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Callee], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['object', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
945
- { type: 'function', names: [identifier_1.Identifier.from(['gcs_get_object', "googleCloudStorageR" /* PkgName.GoogleCloudStorageR */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: [['object_name', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['saveToDisk', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
976
+ { type: 'function', names: [identifier_1.Identifier.from(['gcs_get_object', "googleCloudStorageR" /* PkgName.GoogleCloudStorageR */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: Downloads, sig: [['object_name', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['saveToDisk', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
977
+ { type: 'function', names: [identifier_1.Identifier.from(['drive_download', "googledrive" /* PkgName.GoogleDrive */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: Downloads, sig: [['file', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['path', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['type', built_in_props_1.ArgProp.Value], ['overwrite', built_in_props_1.ArgProp.Flag], ['verbose', built_in_props_1.ArgProp.Flag]] }, assumePrimitive: false },
978
+ { type: 'function', names: [identifier_1.Identifier.from(['req_perform', "httr2" /* PkgName.Httr2 */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: Downloads, sig: [['req', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['path', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['verbosity', built_in_props_1.ArgProp.Value], ['mock', built_in_props_1.ArgProp.Value], ['error_call', built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
979
+ { type: 'function', names: [identifier_1.Identifier.from(['download.packages', "utils" /* PkgName.Utils */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: [['pkgs', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['destdir', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
980
+ { type: 'function', names: [identifier_1.Identifier.from(['download_file', "xfun" /* PkgName.Xfun */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: Downloads, sig: [['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['output', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
981
+ { type: 'function', names: [identifier_1.Identifier.from(['download', "downloader" /* PkgName.Downloader */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: Downloads, sig: [['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['destfile', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written]] }, assumePrimitive: false },
982
+ { type: 'function', names: [identifier_1.Identifier.from(['pb_download', "piggyback" /* PkgName.Piggyback */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: Downloads, sig: [['file', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['dest', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['repo', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
983
+ { type: 'function', names: [identifier_1.Identifier.from(['osf_download', "osfr" /* PkgName.Osfr */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: Downloads, sig: [['x', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['path', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
984
+ { type: 'function', names: [identifier_1.Identifier.from(['save_object', "aws.s3" /* PkgName.AwsS3 */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: Downloads, sig: [['object', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['bucket', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['file', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
985
+ { type: 'function', names: [identifier_1.Identifier.from(['download_zenodo', "zen4R" /* PkgName.Zen4R */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: Downloads, sig: [['doi', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['path', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
946
986
  { type: 'function', names: [identifier_1.Identifier.from(['AnnotationHub', "AnnotationHub" /* PkgName.AnnotationHub */]), identifier_1.Identifier.from(['ExperimentHub', "ExperimentHub" /* PkgName.ExperimentHub */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.Reads], sig: [['hub', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
947
987
  { type: 'function', names: identifier_1.Identifier.fromAll("devtools" /* PkgName.Devtools */, ['source_url', 'source_gist']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, hasUnknownSideEffects: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.Reads], sig: [['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
948
988
  { type: 'function', names: [identifier_1.Identifier.from(['github_pull', "remotes" /* PkgName.Remotes */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { libFn: true, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.Reads], sig: [['pull', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
@@ -986,7 +1026,7 @@ exports.WrittenBuiltinDefinitions = [
986
1026
  { type: 'function', names: [identifier_1.Identifier.from(['write.table', "utils" /* PkgName.Utils */])], processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: [['x', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['file', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
987
1027
  { type: 'function', names: identifier_1.Identifier.fromAll("utils" /* PkgName.Utils */, ['write.csv', 'write.csv2']), processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: [['x', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['file', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
988
1028
  { type: 'function', names: identifier_1.Identifier.fromAll("utils" /* PkgName.Utils */, ['read.table', 'read.delim', 'read.csv2', 'read.delim2']), processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], sig: [['file', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
989
- { type: 'function', names: [identifier_1.Identifier.from(['download.file', "utils" /* PkgName.Utils */])], processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: [['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['destfile', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
1029
+ { type: 'function', names: [identifier_1.Identifier.from(['download.file', "utils" /* PkgName.Utils */])], processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Invisible, tags: Downloads, sig: [['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['destfile', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written]] }, assumePrimitive: false },
990
1030
  { type: 'function', names: [identifier_1.Identifier.from(['jitter', "base" /* PkgName.Base */])], processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { ambient: { type: "draw-rng" /* AmbientStateAccessType.DrawRng */ }, tags: [built_in_props_1.SemanticCallTag.Random], sig: [['x', built_in_props_1.ArgProp.NoDefault], ['factor', 0], ['amount', 0]] }, assumePrimitive: true },
991
1031
  { type: 'function', names: [...identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['sample', 'sample.int']), ...identifier_1.Identifier.fromAll("stats" /* PkgName.Stats */, ['runif', 'rnorm', 'rbinom', 'rpois', 'rexp', 'rgamma', 'rbeta', 'rcauchy', 'rchisq', 'rgeom', 'rhyper', 'rlnorm', 'rlogis', 'rmultinom', 'rnbinom', 'rsignrank', 'rt', 'rf', 'rweibull', 'rwilcox', 'arima.sim', 'simulate', 'kmeans'])], processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { ambient: { type: "draw-rng" /* AmbientStateAccessType.DrawRng */ }, tags: [built_in_props_1.SemanticCallTag.Random] }, assumePrimitive: false },
992
1032
  { type: 'function', names: [identifier_1.Identifier.from(['expression', "base" /* PkgName.Base */])], processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Lang, sig: [['...', 0]] }, assumePrimitive: true },
@@ -1340,7 +1380,26 @@ exports.WrittenBuiltinDefinitions = [
1340
1380
  },
1341
1381
  /* they create, move, or delete files */
1342
1382
  { type: 'function', names: [identifier_1.Identifier.from(['dir.create', "base" /* PkgName.Base */]), identifier_1.Identifier.from(['dir_create', "fs" /* PkgName.Fs */]), ...identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['Sys.chmod', 'unlink'])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { hasUnknownSideEffects: true, props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes] }, assumePrimitive: false },
1343
- { type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['file.remove', 'file.rename', 'file.copy', 'file.link', 'file.append', 'Sys.junction']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { hasUnknownSideEffects: true, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes] }, assumePrimitive: false },
1383
+ { type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['file.remove', 'Sys.junction']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { hasUnknownSideEffects: true, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes] }, assumePrimitive: false },
1384
+ /* they read the files of some arguments and write those of others ({@link ArgProp.Written}), an archive's contents land in a directory */
1385
+ { type: 'function', names: identifier_1.Identifier.fromAll("base" /* PkgName.Base */, ['file.copy', 'file.link', 'file.symlink']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { tags: CopiesFiles, sig: [['from', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['to', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['overwrite', built_in_props_1.ArgProp.Flag], ['recursive', built_in_props_1.ArgProp.Flag], ['copy.mode', built_in_props_1.ArgProp.Flag], ['copy.date', built_in_props_1.ArgProp.Flag]] }, assumePrimitive: false },
1386
+ /* a moved file is gone from where it was */
1387
+ { type: 'function', names: [identifier_1.Identifier.from(['file.rename', "base" /* PkgName.Base */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { hasUnknownSideEffects: true, tags: CopiesFiles, sig: [['from', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['to', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written]] }, assumePrimitive: false },
1388
+ { type: 'function', names: [identifier_1.Identifier.from(['file_move', "fs" /* PkgName.Fs */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { hasUnknownSideEffects: true, props: built_in_props_1.CallProp.Invisible, libFn: true, tags: CopiesFiles, sig: [['path', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['new_path', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written]] }, assumePrimitive: false },
1389
+ { type: 'function', names: [identifier_1.Identifier.from(['file.append', "base" /* PkgName.Base */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { tags: CopiesFiles, sig: [['file1', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['file2', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
1390
+ { type: 'function', names: identifier_1.Identifier.fromAll("fs" /* PkgName.Fs */, ['file_copy', 'dir_copy', 'link_create']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: CopiesFiles, sig: [['path', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['new_path', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['...', built_in_props_1.ArgProp.Flag]] }, assumePrimitive: false },
1391
+ /* only listing the contents (`list = TRUE`) shows the result */
1392
+ { type: 'function', names: [identifier_1.Identifier.from(['unzip', "utils" /* PkgName.Utils */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, tags: CopiesFiles, sig: [['zipfile', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['files', built_in_props_1.ArgProp.Value], ['list', built_in_props_1.ArgProp.Flag], ['overwrite', built_in_props_1.ArgProp.Flag], ['junkpaths', built_in_props_1.ArgProp.Flag], ['exdir', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['unzip', built_in_props_1.ArgProp.Value], ['setTimes', built_in_props_1.ArgProp.Flag]] }, assumePrimitive: false },
1393
+ { type: 'function', names: [identifier_1.Identifier.from(['untar', "utils" /* PkgName.Utils */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, tags: CopiesFiles, sig: [['tarfile', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['files', built_in_props_1.ArgProp.Value], ['list', built_in_props_1.ArgProp.Flag], ['exdir', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['compressed', built_in_props_1.ArgProp.Flag], ['extras', built_in_props_1.ArgProp.Value], ['verbose', built_in_props_1.ArgProp.Flag], ['restore_times', built_in_props_1.ArgProp.Flag], ['support_old_tars', built_in_props_1.ArgProp.Flag], ['tar', built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
1394
+ { type: 'function', names: [identifier_1.Identifier.from(['zip', "utils" /* PkgName.Utils */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, tags: CopiesFiles, sig: [['zipfile', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['files', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['flags', built_in_props_1.ArgProp.Flag], ['extras', built_in_props_1.ArgProp.Value], ['zip', built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
1395
+ { type: 'function', names: [identifier_1.Identifier.from(['tar', "utils" /* PkgName.Utils */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, tags: CopiesFiles, sig: [['tarfile', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['files', built_in_props_1.ArgProp.Resource], ['compression', built_in_props_1.ArgProp.Flag], ['compression_level', built_in_props_1.ArgProp.Value], ['tar', built_in_props_1.ArgProp.Value], ['extra_flags', built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
1396
+ { type: 'function', names: identifier_1.Identifier.fromAll("zip" /* PkgName.Zip */, ['zip', 'zipr', 'zip_append', 'zipr_append']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: CopiesFiles, sig: [['zipfile', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['files', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['recurse', built_in_props_1.ArgProp.Flag], ['compression_level', built_in_props_1.ArgProp.Value], ['include_directories', built_in_props_1.ArgProp.Flag], ['root', built_in_props_1.ArgProp.Value], ['mode', built_in_props_1.ArgProp.Flag], ['keys', built_in_props_1.ArgProp.Value], ['password', built_in_props_1.ArgProp.Value], ['encryption', built_in_props_1.ArgProp.Flag]] }, assumePrimitive: false },
1397
+ { type: 'function', names: [identifier_1.Identifier.from(['unzip', "zip" /* PkgName.Zip */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: CopiesFiles, sig: [['zipfile', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['files', built_in_props_1.ArgProp.Value], ['overwrite', built_in_props_1.ArgProp.Flag], ['junkpaths', built_in_props_1.ArgProp.Flag], ['exdir', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['encoding', built_in_props_1.ArgProp.Value], ['password', built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
1398
+ { type: 'function', names: [identifier_1.Identifier.from(['archive_extract', "archive" /* PkgName.Archive */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: CopiesFiles, sig: [['archive', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['dir', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['files', built_in_props_1.ArgProp.Value], ['options', built_in_props_1.ArgProp.Value], ['strip_components', built_in_props_1.ArgProp.Value], ['password', built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
1399
+ { type: 'function', names: [identifier_1.Identifier.from(['archive_write_files', "archive" /* PkgName.Archive */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: CopiesFiles, sig: [['archive', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['files', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['format', built_in_props_1.ArgProp.Flag], ['filter', built_in_props_1.ArgProp.Flag], ['options', built_in_props_1.ArgProp.Value], ['password', built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
1400
+ { type: 'function', names: [identifier_1.Identifier.from(['archive_write_dir', "archive" /* PkgName.Archive */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: CopiesFiles, sig: [['archive', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['dir', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['format', built_in_props_1.ArgProp.Flag], ['filter', built_in_props_1.ArgProp.Flag], ['options', built_in_props_1.ArgProp.Value], ['password', built_in_props_1.ArgProp.Value], ['...', built_in_props_1.ArgProp.Value], ['recursive', built_in_props_1.ArgProp.Flag], ['full.names', built_in_props_1.ArgProp.Flag]] }, assumePrimitive: false },
1401
+ /* `destname` defaults to the name with the extension added or dropped */
1402
+ { type: 'function', names: identifier_1.Identifier.fromAll("R.utils" /* PkgName.Rutils */, ['gzip', 'gunzip', 'bzip2', 'bunzip2', 'compressFile', 'decompressFile']), processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Invisible, libFn: true, tags: CopiesFiles, sig: [['filename', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['destname', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['...', built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
1344
1403
  /* `sink` diverts the output, `par`/`tpar` set (or query) the parameters of the current device */
1345
1404
  { type: 'function', names: [identifier_1.Identifier.from(['sink', "base" /* PkgName.Base */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { ambient: { type: "set-state" /* AmbientStateAccessType.SetState */, state: ambient_state_name_1.AmbientStateName.sink }, props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: [['file', built_in_props_1.ArgProp.Resource]] }, assumePrimitive: false },
1346
1405
  { type: 'function', names: [identifier_1.Identifier.from(['par', "graphics" /* PkgName.Graphics */]), identifier_1.Identifier.from(['tpar', "tinyplot" /* PkgName.TinyPlot */])], processor: built_in_proc_name_1.BuiltInProcName.Default, config: { props: built_in_props_1.CallProp.Configures | built_in_props_1.CallProp.Invisible, ambient: { type: "set-graphics" /* AmbientStateAccessType.SetGraphics */, queryOnUnnamedStrings: true, queryLinksTo: LinkToLastPlot, keys: { from: 'argument-names', ignore: ['no.readonly'] } }, tags: [built_in_props_1.SemanticCallTag.Graphics], sig: [['...', 0], ['no.readonly', 0]] }, assumePrimitive: false },
@@ -1525,7 +1584,7 @@ exports.WrittenBuiltinDefinitions = [
1525
1584
  { overrides: true, type: 'function', names: [identifier_1.Identifier.from(['readLines', "base" /* PkgName.Base */])], processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads], sig: [['con', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['n', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['ok', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Flag], ['warn', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Flag], ['encoding', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['skipNul', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Flag]] }, assumePrimitive: false },
1526
1585
  { overrides: true, type: 'function', names: [identifier_1.Identifier.from(['writeLines', "base" /* PkgName.Base */])], processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes, built_in_props_1.SemanticCallTag.Prints], sig: [['text', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['con', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['sep', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['useBytes', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Flag]] }, assumePrimitive: false },
1527
1586
  { overrides: true, type: 'function', names: [identifier_1.Identifier.from(['write.table', "utils" /* PkgName.Utils */])], processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: [['x', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['file', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['append', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Flag], ['quote', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Flag], ['sep', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
1528
- { overrides: true, type: 'function', names: [identifier_1.Identifier.from(['download.file', "utils" /* PkgName.Utils */])], processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Invisible, tags: [built_in_props_1.SemanticCallTag.Network, built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes], sig: [['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['destfile', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['method', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['quiet', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Flag], ['mode', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['cacheOK', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Flag], ['extra', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['headers', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
1587
+ { overrides: true, type: 'function', names: [identifier_1.Identifier.from(['download.file', "utils" /* PkgName.Utils */])], processor: built_in_proc_name_1.BuiltInProcName.DefaultReadAllArgs, config: { props: built_in_props_1.CallProp.Invisible, tags: Downloads, sig: [['url', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource], ['destfile', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Resource | built_in_props_1.ArgProp.Written], ['method', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['quiet', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Flag], ['mode', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['cacheOK', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Flag], ['extra', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['headers', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value], ['...', built_in_props_1.ArgProp.Forced | built_in_props_1.ArgProp.Value]] }, assumePrimitive: false },
1529
1588
  /* deprecated and defunct functions of base R */
1530
1589
  {
1531
1590
  type: 'function',
@@ -219,6 +219,7 @@ export declare const enum PkgName {
219
219
  Utils = "utils",
220
220
  AnnotationHub = "AnnotationHub",
221
221
  Ape = "ape",
222
+ Archive = "archive",
222
223
  Arrow = "arrow",
223
224
  AssertThat = "assertthat",
224
225
  Audio = "audio",
@@ -243,6 +244,7 @@ export declare const enum PkgName {
243
244
  DoMc = "doMC",
244
245
  DoParallel = "doParallel",
245
246
  DoSnow = "doSNOW",
247
+ Downloader = "downloader",
246
248
  Dplyr = "dplyr",
247
249
  EbImage = "EBImage",
248
250
  Emmeans = "emmeans",
@@ -298,8 +300,10 @@ export declare const enum PkgName {
298
300
  NorTest = "nortest",
299
301
  OpenImageR = "OpenImageR",
300
302
  OpenXlsx = "openxlsx",
303
+ Osfr = "osfr",
301
304
  Parallelly = "parallelly",
302
305
  Patchwork = "patchwork",
306
+ Piggyback = "piggyback",
303
307
  PkgLoad = "pkgload",
304
308
  Plyr = "plyr",
305
309
  Png = "png",
@@ -378,7 +382,9 @@ export declare const enum PkgName {
378
382
  XlConnect = "XLConnect",
379
383
  Xlsx = "xlsx",
380
384
  Xml2 = "xml2",
381
- Yaml = "yaml"
385
+ Yaml = "yaml",
386
+ Zen4R = "zen4R",
387
+ Zip = "zip"
382
388
  }
383
389
  /**
384
390
  * Each reference has exactly one reference type, stored as the respective number.
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.processors = void 0;
4
7
  exports.produceDataFlowGraph = produceDataFlowGraph;
8
+ const path_1 = __importDefault(require("path"));
5
9
  const applied_arguments_1 = require("./graph/applied-arguments");
6
10
  const function_semantics_1 = require("./fn/function-semantics");
7
11
  const processor_1 = require("./processor");
@@ -266,6 +270,30 @@ function readFramesThroughEnvironment(graph) {
266
270
  function argsWithProp(vertex, info, prop) {
267
271
  return info?.sig === undefined ? [] : match_args_1.MatchArgs.findWithProps(vertex.args, info.sig, prop);
268
272
  }
273
+ /** the path with `/` separators, without `./` steps or a trailing `/` */
274
+ function normalizedPath(p) {
275
+ return path_1.default.posix.normalize(p.replaceAll('\\', '/')).replace(/(?<=.)\/$/, '');
276
+ }
277
+ /**
278
+ * Whether the paths may name one file, as they do when one of them is a directory holding the other:
279
+ * `unzip(zipfile, exdir = "data")` and `file.copy(from, to = "out")` write into one, `list.files("data")` reads one. The working
280
+ * directory holds every relative path.
281
+ */
282
+ function sharesFile(a, b) {
283
+ const [x, y] = [normalizedPath(a), normalizedPath(b)];
284
+ return x === y || holds(x, y) || holds(y, x);
285
+ }
286
+ function holds(directory, file) {
287
+ return directory === '.' ? !path_1.default.posix.isAbsolute(file) && file !== '..' && !file.startsWith('../') : file.startsWith(directory.endsWith('/') ? directory : `${directory}/`);
288
+ }
289
+ /** whether the call tells the files it reads from the ones it writes, see {@link FnSig.resources} */
290
+ function splitsResources(info) {
291
+ return info?.sig !== undefined && built_in_props_1.FnSig.resources(info.sig, true) !== info.sig;
292
+ }
293
+ /** The {@link ArgProp.Resource} arguments naming what the call writes (`writes`) or reads, see {@link FnSig.resources}. */
294
+ function resourceArgs(vertex, info, writes) {
295
+ return info?.sig === undefined ? [] : match_args_1.MatchArgs.findWithProps(vertex.args, built_in_props_1.FnSig.resources(info.sig, writes), built_in_props_1.ArgProp.Resource);
296
+ }
269
297
  function definitionsReachedBy(node, graph) {
270
298
  return df_helper_1.Dataflow.reachable(graph, node, {
271
299
  follow: edge_1.EdgeType.Reads,
@@ -302,10 +330,16 @@ function linkResourceReadersToWriters(graph, environment, ctx) {
302
330
  if (!reads && !writes) {
303
331
  continue;
304
332
  }
305
- const resource = argsWithProp((0, applied_arguments_1.appliedArguments)(graph, vertex), info, built_in_props_1.ArgProp.Resource)[0];
333
+ const applied = (0, applied_arguments_1.appliedArguments)(graph, vertex);
334
+ /* a call stating both without saying which files it writes (`file(path, open)`) counts as a reader */
335
+ const read = reads ? resourceArgs(applied, info, false)[0] : undefined;
336
+ const written = writes && (!reads || splitsResources(info)) ? resourceArgs(applied, info, true)[0] : undefined;
306
337
  /* writing to the console names no file, and neither does a reader we cannot pin down */
307
- if (resource !== undefined) {
308
- (reads ? readers : writers).push({ id, resource });
338
+ if (read !== undefined) {
339
+ readers.push({ id, resource: read });
340
+ }
341
+ if (written !== undefined) {
342
+ writers.push({ id, resource: written });
309
343
  }
310
344
  }
311
345
  if (readers.length === 0 || writers.length === 0) {
@@ -321,7 +355,7 @@ function linkResourceReadersToWriters(graph, environment, ctx) {
321
355
  /* a path we cannot resolve may name the other one */
322
356
  const path = pathOf(a);
323
357
  const other = pathOf(b);
324
- return path === undefined || other === undefined || path === other;
358
+ return path === undefined || other === undefined || sharesFile(path, other);
325
359
  };
326
360
  /* each added edge clears the graph's cached call names, but none of these edges changes what a call targets */
327
361
  const prints = (0, defaultmap_1.memoize)((id) => function_semantics_1.FunctionSemantics.call.props.hasAll((0, query_fn_props_1.callFnProps)(id, { graph, environment }), [built_in_props_1.SemanticCallTag.Prints]));
@@ -343,13 +377,13 @@ function linkResourceReadersToWriters(graph, environment, ctx) {
343
377
  }
344
378
  }
345
379
  }
346
- /** The paths the {@link ArgProp.Resource} arguments of the file accessing call `id` name, `undefined` unless every one resolves to strings. */
347
- function pathsOf(id, graph, environment, ctx, callContext) {
380
+ /** The paths the file accessing call `id` writes (`writes`) or reads, `undefined` unless every one resolves to strings. */
381
+ function pathsOf(id, writes, graph, environment, ctx, callContext) {
348
382
  const vertex = graph.getVertex(id);
349
383
  if (!vertex_1.DfgVertex.isFunctionCall(vertex)) {
350
384
  return undefined;
351
385
  }
352
- const resources = argsWithProp((0, applied_arguments_1.appliedArguments)(graph, vertex), (0, query_fn_props_1.callFnProps)(id, { graph, environment }), built_in_props_1.ArgProp.Resource);
386
+ const resources = resourceArgs((0, applied_arguments_1.appliedArguments)(graph, vertex), (0, query_fn_props_1.callFnProps)(id, { graph, environment }), writes);
353
387
  const paths = new Set();
354
388
  for (const resource of resources) {
355
389
  const strings = node_value_1.NodeValue.stringsOf(r_argument_1.RArgument.valueOf(graph.idMap?.get(resource)) ?? resource, resolve_helper_1.Resolve.info(graph, ctx), { callContext });
@@ -407,20 +441,21 @@ function separateFileWritesPerCall(graph, environment, ctx) {
407
441
  }
408
442
  const fileAccess = (0, defaultmap_1.memoize)((id) => {
409
443
  const info = (0, query_fn_props_1.callFnProps)(id, { graph, environment });
410
- return function_semantics_1.FunctionSemantics.call.props.hasAll(info, [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes]) ? 'write'
411
- : function_semantics_1.FunctionSemantics.call.props.hasAll(info, [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads]) ? 'read' : undefined;
444
+ const writes = function_semantics_1.FunctionSemantics.call.props.hasAll(info, [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Writes]);
445
+ const reads = function_semantics_1.FunctionSemantics.call.props.hasAll(info, [built_in_props_1.SemanticCallTag.File, built_in_props_1.SemanticCallTag.Reads]) && (!writes || splitsResources(info));
446
+ return { reads, writes };
412
447
  });
413
- const readPaths = (0, defaultmap_1.memoize)((id) => fileAccess(id) === 'read' ? pathsOf(id, graph, environment, ctx) : undefined);
448
+ const readPaths = (0, defaultmap_1.memoize)((id) => fileAccess(id).reads ? pathsOf(id, false, graph, environment, ctx) : undefined);
414
449
  /* writing to the console (`cat(x)`) names no file, and has no call to tell apart */
415
450
  const namesFile = (id) => {
416
451
  const vertex = graph.getVertex(id);
417
- return argsWithProp((0, applied_arguments_1.appliedArguments)(graph, vertex), (0, query_fn_props_1.callFnProps)(id, { graph, environment }), built_in_props_1.ArgProp.Resource).length > 0;
452
+ return resourceArgs((0, applied_arguments_1.appliedArguments)(graph, vertex), (0, query_fn_props_1.callFnProps)(id, { graph, environment }), true).length > 0;
418
453
  };
419
454
  const writers = [...graph.verticesOfType(vertex_1.VertexType.FunctionCall)].map(([id]) => id)
420
- .filter(id => graph.edgesFrom(id).values().some(e => edge_1.DfEdge.includesType(e, edge_1.EdgeType.SideEffectOnCall)) && !graph.unknownSideEffects.has(id) && fileAccess(id) === 'write' && namesFile(id));
455
+ .filter(id => graph.edgesFrom(id).values().some(e => edge_1.DfEdge.includesType(e, edge_1.EdgeType.SideEffectOnCall)) && !graph.unknownSideEffects.has(id) && fileAccess(id).writes && namesFile(id));
421
456
  const separated = new Set();
422
457
  for (const writer of writers) {
423
- const levels = fileWriteLevels(writer, graph, idMap, callContext => pathsOf(writer, graph, environment, ctx, callContext));
458
+ const levels = fileWriteLevels(writer, graph, idMap, callContext => pathsOf(writer, true, graph, environment, ctx, callContext));
424
459
  if (levels !== undefined) {
425
460
  separated.add(writer);
426
461
  }
@@ -432,7 +467,7 @@ function separateFileWritesPerCall(graph, environment, ctx) {
432
467
  for (const { call, paths } of calls) {
433
468
  for (const reader of readers) {
434
469
  const read = readPaths(reader);
435
- if (read === undefined || paths === undefined || !read.isDisjointFrom(paths)) {
470
+ if (read === undefined || paths === undefined || read.values().some(r => paths.values().some(w => sharesFile(r, w)))) {
436
471
  graph.addEdge(reader, call, edge_1.EdgeType.Reads);
437
472
  }
438
473
  }
@@ -75,6 +75,7 @@ export declare const FunctionSemantics: {
75
75
  readonly forcing: (this: void, sig: FnSig | undefined, count: number) => readonly import("../../util/logic").Ternary[] | undefined;
76
76
  readonly every: FnSig;
77
77
  readonly only: (this: void, index: number, name: string) => FnSig;
78
+ readonly resources: (sig: FnSig, writes: boolean) => FnSig;
78
79
  };
79
80
  /** The same as {@link FunctionSemantics.call.props}, for one argument. */
80
81
  readonly argument: {
@@ -36,13 +36,19 @@ function addressParam(params) {
36
36
  */
37
37
  function networkFunctions(index) {
38
38
  const resources = new Map();
39
+ /* the calls with a destination they save to, like the `destfile` of a download, which is a path rather than an address */
40
+ const saving = new Set();
39
41
  for (const param of index.params(built_in_props_1.ArgProp.Resource)) {
42
+ const key = identifier_1.Identifier.toString(param.call);
40
43
  /* R opens a path it writes to as a local file (or a `|` pipe), never as a url, and a command is no address either */
41
44
  const tags = index.get(param.call)?.tags;
45
+ if ((param.props & built_in_props_1.ArgProp.Written) !== 0) {
46
+ saving.add(key);
47
+ continue;
48
+ }
42
49
  if ((tags?.includes(built_in_props_1.SemanticCallTag.Writes) && !tags.includes(built_in_props_1.SemanticCallTag.Reads)) || tags?.includes(built_in_props_1.SemanticCallTag.Process)) {
43
50
  continue;
44
51
  }
45
- const key = identifier_1.Identifier.toString(param.call);
46
52
  resources.set(key, [...resources.get(key) ?? [], param]);
47
53
  }
48
54
  const names = new Map(index.with(built_in_props_1.SemanticCallTag.Network).map(call => [identifier_1.Identifier.toString(call), call]));
@@ -55,10 +61,12 @@ function networkFunctions(index) {
55
61
  const params = resources.get(key);
56
62
  const address = params === undefined ? undefined : addressParam(params);
57
63
  const tags = index.get(name)?.tags;
64
+ /* a call touching files only to save what it fetched, like `req_perform(req, path)`, opens no local file in place of the network */
65
+ const mayOpenLocal = tags?.includes(built_in_props_1.SemanticCallTag.File) && !(saving.has(key) && address === undefined);
58
66
  return {
59
67
  name,
60
68
  ...(address === undefined ? {} : { info: { argIdx: address.index, argName: address.name, resolveValue: true } }),
61
- ...(tags?.includes(built_in_props_1.SemanticCallTag.Network) && !tags.includes(built_in_props_1.SemanticCallTag.File) ? {} : { onlyTriggerWithArgument: UrlPattern })
69
+ ...(tags?.includes(built_in_props_1.SemanticCallTag.Network) && !mayOpenLocal ? {} : { onlyTriggerWithArgument: UrlPattern })
62
70
  };
63
71
  });
64
72
  }
@@ -61,8 +61,18 @@ function unusedPackages(attachments, graph, src) {
61
61
  }
62
62
  }
63
63
  }
64
+ /* what each imported package exports, read once: asking which packages export a name searches the whole database */
65
+ const exportsOf = new Map();
66
+ const exports = (pkg) => {
67
+ let found = exportsOf.get(pkg);
68
+ if (found === undefined) {
69
+ found = new Set(src.lookup(pkg)?.exported);
70
+ exportsOf.set(pkg, found);
71
+ }
72
+ return found;
73
+ };
64
74
  for (const { name, callable, imports } of attachments) {
65
- const usesPackage = (call) => callable.has(call) || src.packagesExporting(call).some(p => imports.has(p));
75
+ const usesPackage = (call) => callable.has(call) || imports.values().some(p => exports(p).has(call));
66
76
  if (pending.has(name) && unbound.values().some(usesPackage)) {
67
77
  pending.delete(name);
68
78
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eagleoutice/flowr",
3
- "version": "2.17.0",
3
+ "version": "2.17.1",
4
4
  "description": "Static Dataflow Analyzer and Program Slicer for the R Programming Language",
5
5
  "engines": {
6
6
  "node": ">=22"
@@ -36,6 +36,10 @@ export declare class FlowrAnalyzerCache<Parser extends KnownParser> extends Flow
36
36
  reset(): void;
37
37
  private runTapeUntil;
38
38
  private stepTapeUntil;
39
+ /** the normalized AST the dependency plugins already {@link FlowrAnalyzerDependenciesContext#prepare|prepared} for */
40
+ private prepared;
41
+ /** once the AST is there and the dataflow is not, the dependency plugins may wait for what the dataflow asks of them */
42
+ private prepareDataflow;
39
43
  private storeIncrementalSnapshotIfAvailable;
40
44
  /**
41
45
  * Get the parse output for the request, parsing if necessary.
@@ -83,12 +83,23 @@ class FlowrAnalyzerCache extends flowr_cache_1.FlowrCache {
83
83
  async stepTapeUntil(until) {
84
84
  let g;
85
85
  while ((g = until()) === undefined && this.pipeline.hasNextStep()) {
86
+ await this.prepareDataflow();
86
87
  await this.pipeline.nextStep();
87
88
  }
88
89
  this.storeIncrementalSnapshotIfAvailable();
89
90
  (0, assert_1.guard)(g !== undefined, 'Could not reach the desired pipeline step, invalid cache state(?)');
90
91
  return g;
91
92
  }
93
+ /** the normalized AST the dependency plugins already {@link FlowrAnalyzerDependenciesContext#prepare|prepared} for */
94
+ prepared;
95
+ /** once the AST is there and the dataflow is not, the dependency plugins may wait for what the dataflow asks of them */
96
+ async prepareDataflow() {
97
+ const { normalize, dataflow } = this.get();
98
+ if (normalize !== undefined && dataflow === undefined && this.prepared !== normalize) {
99
+ this.prepared = normalize;
100
+ await this.args.context.deps.prepare(normalize);
101
+ }
102
+ }
92
103
  storeIncrementalSnapshotIfAvailable() {
93
104
  if (this.args.parser.name !== 'tree-sitter') {
94
105
  return;
@@ -1,3 +1,4 @@
1
+ import type { NormalizedAst } from '../../r-bridge/lang-4.x/ast/model/processing/decorate';
1
2
  import { AbstractFlowrAnalyzerContext } from './abstract-flowr-analyzer-context';
2
3
  import { FlowrAnalyzerPackageVersionsPlugin, type SigDbLoadedInfo } from '../plugins/package-version-plugins/flowr-analyzer-package-versions-plugin';
3
4
  import { Package } from '../plugins/package-version-plugins/package';
@@ -131,6 +132,8 @@ export declare class FlowrAnalyzerDependenciesContext extends AbstractFlowrAnaly
131
132
  baseRSourceFingerprint(): string;
132
133
  /** Mount an additional signature database/source by path (a plain `.sigs.ndjson`, a `.br`, or a manifest). */
133
134
  addDatabaseSource(source: string): Promise<void>;
135
+ /** Lets every version plugin wait for what the dataflow of `ast` will ask of it, see {@link FlowrAnalyzerPackageVersionsPlugin#prepare}. */
136
+ prepare(ast: NormalizedAst): Promise<void>;
134
137
  /** Eagerly mount every version plugin's signature database up front (see `solver.sigdb.eagerlyLoad`). */
135
138
  eagerlyLoadSignatureDatabases(): void;
136
139
  receive(event: InvalidationEvent): void;
@@ -104,6 +104,12 @@ class FlowrAnalyzerDependenciesContext extends abstract_flowr_analyzer_context_1
104
104
  await p.addDatabaseSource(source);
105
105
  }
106
106
  }
107
+ /** Lets every version plugin wait for what the dataflow of `ast` will ask of it, see {@link FlowrAnalyzerPackageVersionsPlugin#prepare}. */
108
+ async prepare(ast) {
109
+ await Promise.all(this.plugins.map(p => p.prepare(this.ctx, ast)));
110
+ /* a package a plugin could not name before may resolve now */
111
+ this.resolvedMisses.clear();
112
+ }
107
113
  /** Eagerly mount every version plugin's signature database up front (see `solver.sigdb.eagerlyLoad`). */
108
114
  eagerlyLoadSignatureDatabases() {
109
115
  for (const p of this.plugins) {
@@ -36,9 +36,9 @@ export declare enum FileRole {
36
36
  Documentation = "documentation",
37
37
  /** Signals separate license files, but please note, that DESCRIPTION files may contain license info too */
38
38
  License = "license",
39
- /** Files describing a project's virtual/pinned package environment, e.g., `renv.lock`, `rv.lock` or `uvr.lock`. */
39
+ /** Files describing a project's virtual/pinned package environment, e.g., `renv.lock`, `rv.lock`, `uvr.lock` or rig's `rproj.lock`. */
40
40
  VirtualEnv = "virtual-env",
41
- /** A project manifest that is no `DESCRIPTION`, e.g. the `rproject.toml` of an rv project or the `uvr.toml` of a uvr project. */
41
+ /** A project manifest that is no `DESCRIPTION`, e.g. the `rproject.toml` of an rv project, the `uvr.toml` of a uvr project or the `rproj.toml` of a rig project. */
42
42
  Manifest = "manifest",
43
43
  /**
44
44
  * R sources evaluated at startup, before any project code (`.Rprofile`, `Rprofile.site`).
@@ -36,9 +36,9 @@ var FileRole;
36
36
  FileRole["Documentation"] = "documentation";
37
37
  /** Signals separate license files, but please note, that DESCRIPTION files may contain license info too */
38
38
  FileRole["License"] = "license";
39
- /** Files describing a project's virtual/pinned package environment, e.g., `renv.lock`, `rv.lock` or `uvr.lock`. */
39
+ /** Files describing a project's virtual/pinned package environment, e.g., `renv.lock`, `rv.lock`, `uvr.lock` or rig's `rproj.lock`. */
40
40
  FileRole["VirtualEnv"] = "virtual-env";
41
- /** A project manifest that is no `DESCRIPTION`, e.g. the `rproject.toml` of an rv project or the `uvr.toml` of a uvr project. */
41
+ /** A project manifest that is no `DESCRIPTION`, e.g. the `rproject.toml` of an rv project, the `uvr.toml` of a uvr project or the `rproj.toml` of a rig project. */
42
42
  FileRole["Manifest"] = "manifest";
43
43
  /**
44
44
  * R sources evaluated at startup, before any project code (`.Rprofile`, `Rprofile.site`).