@eagleoutice/flowr 2.10.8 → 2.10.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/README.md +106 -36
  2. package/abstract-interpretation/absint-visitor.js +6 -3
  3. package/abstract-interpretation/domains/abstract-domain.d.ts +1 -1
  4. package/abstract-interpretation/domains/bounded-set-domain.d.ts +1 -1
  5. package/abstract-interpretation/domains/bounded-set-domain.js +1 -1
  6. package/abstract-interpretation/domains/interval-domain.d.ts +1 -1
  7. package/abstract-interpretation/domains/interval-domain.js +1 -1
  8. package/abstract-interpretation/domains/lattice.d.ts +1 -1
  9. package/abstract-interpretation/domains/partial-product-domain.d.ts +1 -1
  10. package/abstract-interpretation/domains/partial-product-domain.js +2 -2
  11. package/abstract-interpretation/domains/set-range-domain.d.ts +1 -1
  12. package/abstract-interpretation/domains/set-range-domain.js +1 -1
  13. package/abstract-interpretation/domains/set-upper-bound-domain.d.ts +1 -1
  14. package/abstract-interpretation/domains/set-upper-bound-domain.js +1 -1
  15. package/abstract-interpretation/domains/singleton-domain.d.ts +1 -1
  16. package/abstract-interpretation/domains/singleton-domain.js +1 -1
  17. package/abstract-interpretation/domains/state-abstract-domain.d.ts +1 -1
  18. package/abstract-interpretation/domains/state-abstract-domain.js +2 -2
  19. package/abstract-interpretation/unsupported-functions.d.ts +3 -2
  20. package/abstract-interpretation/unsupported-functions.js +38 -28
  21. package/cli/benchmark-app.js +2 -1
  22. package/cli/common/script.js +3 -2
  23. package/cli/flowr.js +47 -10
  24. package/cli/repl/commands/repl-cfg.js +9 -9
  25. package/cli/repl/commands/repl-commands.js +5 -0
  26. package/cli/repl/commands/repl-dataflow.js +31 -24
  27. package/cli/repl/commands/repl-main.d.ts +6 -0
  28. package/cli/repl/commands/repl-normalize.js +15 -12
  29. package/cli/repl/commands/repl-parse.js +1 -1
  30. package/cli/repl/commands/repl-query.js +4 -5
  31. package/cli/repl/commands/repl-quit.js +2 -1
  32. package/cli/repl/core.d.ts +11 -0
  33. package/cli/repl/core.js +101 -3
  34. package/cli/repl/execute.js +3 -2
  35. package/cli/repl/parser/slice-query-parser.d.ts +16 -0
  36. package/cli/repl/parser/slice-query-parser.js +52 -0
  37. package/cli/repl/server/connection.d.ts +1 -0
  38. package/cli/repl/server/connection.js +25 -0
  39. package/cli/repl/server/messages/message-analysis.d.ts +10 -0
  40. package/cli/repl/server/messages/message-analysis.js +6 -2
  41. package/cli/repl/server/messages/message-slice.d.ts +1 -1
  42. package/cli/script-core/statistics-core.js +2 -1
  43. package/cli/script-core/statistics-helper-core.js +2 -1
  44. package/cli/wiki.d.ts +2 -1
  45. package/cli/wiki.js +4 -1
  46. package/config.d.ts +9 -0
  47. package/config.js +23 -1
  48. package/control-flow/diff-cfg.d.ts +1 -1
  49. package/control-flow/diff-cfg.js +1 -1
  50. package/control-flow/extract-cfg.js +9 -3
  51. package/control-flow/semantic-cfg-guided-visitor.js +1 -0
  52. package/control-flow/simple-visitor.js +6 -5
  53. package/control-flow/useless-loop.js +2 -2
  54. package/core/print/dataflow-printer.d.ts +2 -2
  55. package/core/print/dataflow-printer.js +2 -2
  56. package/core/steps/all/static-slicing/00-slice.js +1 -1
  57. package/core/steps/pipeline/default-pipelines.d.ts +146 -146
  58. package/dataflow/environments/append.d.ts +2 -1
  59. package/dataflow/environments/append.js +2 -1
  60. package/dataflow/environments/built-in-proc-name.d.ts +2 -0
  61. package/dataflow/environments/built-in-proc-name.js +2 -0
  62. package/dataflow/environments/built-in.d.ts +2 -0
  63. package/dataflow/environments/built-in.js +2 -0
  64. package/dataflow/environments/default-builtin-config.d.ts +122 -66
  65. package/dataflow/environments/default-builtin-config.js +324 -145
  66. package/dataflow/environments/environment.d.ts +2 -1
  67. package/dataflow/environments/environment.js +13 -9
  68. package/dataflow/environments/identifier.d.ts +55 -2
  69. package/dataflow/environments/identifier.js +14 -2
  70. package/dataflow/environments/reference-to-maybe.d.ts +2 -0
  71. package/dataflow/environments/reference-to-maybe.js +56 -11
  72. package/dataflow/environments/resolve-by-name.js +13 -7
  73. package/dataflow/eval/values/general.js +4 -0
  74. package/dataflow/extractor.js +22 -3
  75. package/dataflow/graph/df-helper.d.ts +6 -0
  76. package/dataflow/graph/df-helper.js +33 -0
  77. package/dataflow/graph/graph.js +7 -3
  78. package/dataflow/info.d.ts +1 -1
  79. package/dataflow/info.js +3 -1
  80. package/dataflow/internal/linker.d.ts +5 -1
  81. package/dataflow/internal/linker.js +34 -9
  82. package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.js +3 -1
  83. package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +1 -1
  84. package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +53 -0
  85. package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.d.ts +13 -0
  86. package/dataflow/internal/process/functions/call/built-in/built-in-namespace-access.js +58 -0
  87. package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.js +1 -1
  88. package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +1 -1
  89. package/dataflow/internal/process/functions/call/built-in/built-in-rm.js +38 -14
  90. package/dataflow/internal/process/functions/call/built-in/built-in-source.js +19 -0
  91. package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.js +1 -1
  92. package/dataflow/internal/process/functions/call/known-call-handling.js +4 -3
  93. package/dataflow/internal/process/functions/call/named-call-handling.js +6 -0
  94. package/dataflow/origin/dfg-get-origin.d.ts +1 -1
  95. package/dataflow/origin/dfg-get-origin.js +1 -1
  96. package/dataflow/processor.d.ts +6 -0
  97. package/documentation/data/faq/faqs.d.ts +2 -1
  98. package/documentation/data/faq/faqs.js +75 -57
  99. package/documentation/data/server/doc-data-server-messages.d.ts +2 -1
  100. package/documentation/data/server/doc-data-server-messages.js +15 -7
  101. package/documentation/doc-readme.js +15 -15
  102. package/documentation/doc-util/doc-cfg.d.ts +3 -1
  103. package/documentation/doc-util/doc-cfg.js +3 -3
  104. package/documentation/doc-util/doc-dfg.d.ts +3 -1
  105. package/documentation/doc-util/doc-dfg.js +3 -3
  106. package/documentation/doc-util/doc-files.d.ts +3 -1
  107. package/documentation/doc-util/doc-files.js +9 -6
  108. package/documentation/doc-util/doc-normalized-ast.d.ts +3 -1
  109. package/documentation/doc-util/doc-normalized-ast.js +2 -2
  110. package/documentation/doc-util/doc-query.d.ts +2 -1
  111. package/documentation/doc-util/doc-query.js +2 -2
  112. package/documentation/doc-util/doc-repl.js +1 -0
  113. package/documentation/doc-util/doc-types.d.ts +6 -6
  114. package/documentation/doc-util/doc-types.js +11 -9
  115. package/documentation/issue-linting-rule.js +1 -2
  116. package/documentation/wiki-analyzer.js +9 -9
  117. package/documentation/wiki-cfg.js +40 -41
  118. package/documentation/wiki-core.js +119 -31
  119. package/documentation/wiki-create-linting-rules.d.ts +6 -0
  120. package/documentation/wiki-create-linting-rules.js +95 -0
  121. package/documentation/wiki-dataflow-graph.js +77 -76
  122. package/documentation/wiki-engine.js +1 -2
  123. package/documentation/wiki-faq.d.ts +2 -1
  124. package/documentation/wiki-faq.js +4 -4
  125. package/documentation/wiki-interface.js +19 -6
  126. package/documentation/wiki-linter.d.ts +1 -1
  127. package/documentation/wiki-linter.js +14 -6
  128. package/documentation/wiki-linting-and-testing.js +2 -2
  129. package/documentation/wiki-mk/doc-context.d.ts +3 -3
  130. package/documentation/wiki-mk/doc-maker.d.ts +2 -0
  131. package/documentation/wiki-mk/doc-maker.js +7 -1
  132. package/documentation/wiki-normalized-ast.js +5 -5
  133. package/documentation/wiki-onboarding.d.ts +2 -1
  134. package/documentation/wiki-onboarding.js +5 -5
  135. package/documentation/wiki-overview.js +3 -3
  136. package/documentation/wiki-query.js +85 -84
  137. package/documentation/wiki-search.js +4 -5
  138. package/documentation/wiki-setup.js +6 -7
  139. package/gas.d.ts +74 -0
  140. package/gas.js +18 -0
  141. package/linter/linter-executor.js +2 -8
  142. package/linter/linter-format.d.ts +4 -11
  143. package/linter/linter-rules.d.ts +88 -86
  144. package/linter/linter-rules.js +7 -1
  145. package/linter/rules/absolute-path.d.ts +2 -7
  146. package/linter/rules/absolute-path.js +6 -4
  147. package/linter/rules/dataframe-access-validation.d.ts +1 -6
  148. package/linter/rules/dataframe-access-validation.js +8 -6
  149. package/linter/rules/dead-code.d.ts +2 -11
  150. package/linter/rules/dead-code.js +16 -11
  151. package/linter/rules/deprecated-functions.d.ts +3 -3
  152. package/linter/rules/file-path-validity.d.ts +1 -6
  153. package/linter/rules/file-path-validity.js +5 -5
  154. package/linter/rules/function-finder-util.d.ts +7 -11
  155. package/linter/rules/function-finder-util.js +9 -6
  156. package/linter/rules/naming-convention.d.ts +2 -7
  157. package/linter/rules/naming-convention.js +3 -2
  158. package/linter/rules/network-functions.d.ts +2 -7
  159. package/linter/rules/network-functions.js +14 -12
  160. package/linter/rules/no-leaked-credentials.d.ts +36 -0
  161. package/linter/rules/no-leaked-credentials.js +75 -0
  162. package/linter/rules/problematic-inputs.d.ts +1 -8
  163. package/linter/rules/problematic-inputs.js +5 -4
  164. package/linter/rules/roxygen-arguments.d.ts +2 -7
  165. package/linter/rules/roxygen-arguments.js +13 -20
  166. package/linter/rules/seeded-randomness.d.ts +2 -7
  167. package/linter/rules/seeded-randomness.js +7 -4
  168. package/linter/rules/software-has-license.d.ts +31 -0
  169. package/linter/rules/software-has-license.js +46 -0
  170. package/linter/rules/software-has-tests.d.ts +38 -0
  171. package/linter/rules/software-has-tests.js +48 -0
  172. package/linter/rules/stop-with-call-arg.d.ts +2 -7
  173. package/linter/rules/stop-with-call-arg.js +3 -2
  174. package/linter/rules/unused-definition.d.ts +3 -8
  175. package/linter/rules/unused-definition.js +7 -5
  176. package/linter/rules/useless-loop.d.ts +2 -7
  177. package/linter/rules/useless-loop.js +5 -2
  178. package/package.json +3 -2
  179. package/project/context/flowr-analyzer-context.d.ts +13 -14
  180. package/project/context/flowr-analyzer-context.js +4 -0
  181. package/project/context/flowr-analyzer-files-context.d.ts +12 -0
  182. package/project/context/flowr-analyzer-files-context.js +12 -2
  183. package/project/context/flowr-analyzer-gas-context.d.ts +28 -0
  184. package/project/context/flowr-analyzer-gas-context.js +101 -0
  185. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +13 -7
  186. package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +56 -11
  187. package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.d.ts +1 -1
  188. package/project/plugins/file-plugins/notebooks/flowr-analyzer-qmd-file-plugin.js +2 -2
  189. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.d.ts +2 -1
  190. package/project/plugins/file-plugins/notebooks/flowr-analyzer-rmd-file-plugin.js +5 -5
  191. package/project/plugins/flowr-analyzer-plugin.d.ts +15 -8
  192. package/project/plugins/flowr-analyzer-plugin.js +14 -7
  193. package/project/plugins/gas-plugins/flowr-analyzer-gas-plugin.d.ts +19 -0
  194. package/project/plugins/gas-plugins/flowr-analyzer-gas-plugin.js +35 -0
  195. package/project/plugins/plugin-registry.d.ts +2 -1
  196. package/project/plugins/plugin-registry.js +3 -1
  197. package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.d.ts +22 -0
  198. package/project/plugins/project-discovery/flowr-analyzer-gitignore-project-discovery-plugin.js +47 -0
  199. package/project/plugins/project-discovery/flowr-analyzer-project-discovery-plugin.js +1 -1
  200. package/queries/catalog/call-context-query/call-context-query-executor.js +54 -8
  201. package/queries/catalog/call-context-query/call-context-query-format.d.ts +2 -2
  202. package/queries/catalog/dependencies-query/function-info/test-functions.d.ts +2 -0
  203. package/queries/catalog/dependencies-query/function-info/test-functions.js +18 -177
  204. package/queries/catalog/df-shape-query/df-shape-query-format.js +1 -1
  205. package/queries/catalog/dice-query/dice-query-executor.d.ts +8 -0
  206. package/queries/catalog/dice-query/dice-query-executor.js +52 -0
  207. package/queries/catalog/dice-query/dice-query-format.d.ts +53 -0
  208. package/queries/catalog/dice-query/dice-query-format.js +102 -0
  209. package/queries/catalog/happens-before-query/happens-before-query-executor.js +2 -2
  210. package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +2 -0
  211. package/queries/catalog/input-sources-query/input-sources-query-format.js +1 -0
  212. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -0
  213. package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.js +1 -0
  214. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -0
  215. package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.js +1 -0
  216. package/queries/catalog/linter-query/linter-query-executor.js +7 -0
  217. package/queries/catalog/location-map-query/location-map-query-format.d.ts +2 -0
  218. package/queries/catalog/location-map-query/location-map-query-format.js +1 -0
  219. package/queries/catalog/origin-query/origin-query-format.d.ts +2 -0
  220. package/queries/catalog/origin-query/origin-query-format.js +1 -0
  221. package/queries/catalog/provenance-query/provenance-query-format.d.ts +2 -0
  222. package/queries/catalog/provenance-query/provenance-query-format.js +1 -0
  223. package/queries/catalog/resolve-value-query/resolve-value-query-format.d.ts +2 -0
  224. package/queries/catalog/resolve-value-query/resolve-value-query-format.js +1 -0
  225. package/queries/catalog/static-slice-query/static-slice-query-executor.js +1 -1
  226. package/queries/catalog/static-slice-query/static-slice-query-format.d.ts +2 -0
  227. package/queries/catalog/static-slice-query/static-slice-query-format.js +1 -0
  228. package/queries/query.d.ts +18 -1
  229. package/queries/query.js +3 -1
  230. package/r-bridge/data/data.d.ts +5 -0
  231. package/r-bridge/data/data.js +6 -0
  232. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +0 -1
  233. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +10 -1
  234. package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-number.d.ts +1 -1
  235. package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-number.js +1 -1
  236. package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-string.d.ts +1 -1
  237. package/r-bridge/lang-4.x/ast/parser/main/internal/values/normalize-string.js +1 -1
  238. package/r-bridge/lang-4.x/tree-sitter/tree-sitter-normalize.js +63 -44
  239. package/r-bridge/parser.js +2 -9
  240. package/r-bridge/shell.d.ts +8 -1
  241. package/r-bridge/shell.js +26 -7
  242. package/search/flowr-search-builder.d.ts +2 -2
  243. package/search/flowr-search-builder.js +1 -1
  244. package/search/flowr-search-filters.d.ts +30 -9
  245. package/search/flowr-search-filters.js +26 -21
  246. package/search/search-executor/search-enrichers.d.ts +600 -0
  247. package/search/search-executor/search-enrichers.js +23 -2
  248. package/slicing/static/static-slicer.d.ts +39 -11
  249. package/slicing/static/static-slicer.js +44 -14
  250. package/util/collections/queue.d.ts +16 -0
  251. package/util/collections/queue.js +38 -0
  252. package/util/log.d.ts +1 -1
  253. package/util/log.js +1 -1
  254. package/util/mermaid/dfg.d.ts +2 -2
  255. package/util/mermaid/dfg.js +2 -2
  256. package/util/objects.d.ts +9 -0
  257. package/util/objects.js +57 -1
  258. package/util/proc.d.ts +6 -0
  259. package/util/proc.js +20 -0
  260. package/util/version.js +1 -1
@@ -8,6 +8,7 @@ import type { Query, QueryResult } from '../../queries/query';
8
8
  import { type CfgSimplificationPassName } from '../../control-flow/cfg-simplification';
9
9
  import type { AsyncOrSync } from 'ts-essentials';
10
10
  import type { ReadonlyFlowrAnalysisProvider } from '../../project/flowr-analyzer';
11
+ import type { KnownRoxygenTags, RoxygenTag } from '../../r-bridge/roxygen2/roxygen-ast';
11
12
  export interface EnrichmentData<ElementContent extends MergeableRecord, ElementArguments = undefined, SearchContent extends MergeableRecord = never, SearchArguments = ElementArguments> {
12
13
  /**
13
14
  * A function that is applied to each element of the search to enrich it with additional data.
@@ -31,6 +32,7 @@ export declare enum Enrichment {
31
32
  CallTargets = "call-targets",
32
33
  LastCall = "last-call",
33
34
  CfgInformation = "cfg-information",
35
+ Roxygen = "roxygen",
34
36
  QueryData = "query-data"
35
37
  }
36
38
  export interface CallTargetsContent extends MergeableRecord {
@@ -73,6 +75,14 @@ export interface CfgInformationArguments extends MergeableRecord {
73
75
  /** Whether to check nodes for reachability, and subsequently set {@link CfgInformationSearchContent.reachableNodes} and {@link CfgInformationElementContent.isReachable}. Defaults to `false`. */
74
76
  checkReachable?: boolean;
75
77
  }
78
+ export interface RoxygenElementContent extends MergeableRecord {
79
+ documentation: readonly RoxygenTag[];
80
+ tags: {
81
+ [T in KnownRoxygenTags]?: readonly (RoxygenTag & {
82
+ type: T;
83
+ })[];
84
+ };
85
+ }
76
86
  export interface QueryDataElementContent extends MergeableRecord {
77
87
  /** The name of the query that this element originated from. To get each query's data, see {@link QueryDataSearchContent}. */
78
88
  query: Query['type'];
@@ -104,6 +114,596 @@ export declare const Enrichments: {
104
114
  };
105
115
  enrichSearch: (_search: FlowrSearchElements<ParentInformation, FlowrSearchElement<ParentInformation>[]>, data: ReadonlyFlowrAnalysisProvider<import("../../r-bridge/parser").KnownParser>, args: CfgInformationArguments | undefined, prev: CfgInformationSearchContent | undefined) => Promise<CfgInformationSearchContent>;
106
116
  };
117
+ readonly roxygen: {
118
+ enrichElement: (e: FlowrSearchElement<ParentInformation>, _search: FlowrSearchElements<ParentInformation, FlowrSearchElement<ParentInformation>[]>, analyzer: ReadonlyFlowrAnalysisProvider<import("../../r-bridge/parser").KnownParser>, _args: undefined, prev: RoxygenElementContent | undefined) => Promise<{
119
+ [x: string]: unknown;
120
+ documentation: ({
121
+ value: string[];
122
+ type: KnownRoxygenTags.Aliases;
123
+ inherited?: boolean | undefined;
124
+ } | {
125
+ value: string;
126
+ type: KnownRoxygenTags.Backref;
127
+ inherited?: boolean | undefined;
128
+ } | {
129
+ value: string;
130
+ type: KnownRoxygenTags.Concept;
131
+ inherited?: boolean | undefined;
132
+ } | {
133
+ value: string;
134
+ type: KnownRoxygenTags.Family;
135
+ inherited?: boolean | undefined;
136
+ } | {
137
+ value: string[];
138
+ type: KnownRoxygenTags.Keywords;
139
+ inherited?: boolean | undefined;
140
+ } | {
141
+ value: string;
142
+ type: KnownRoxygenTags.References;
143
+ inherited?: boolean | undefined;
144
+ } | {
145
+ value: string[];
146
+ type: KnownRoxygenTags.SeeAlso;
147
+ inherited?: boolean | undefined;
148
+ } | {
149
+ value: string;
150
+ type: KnownRoxygenTags.EvalNamespace;
151
+ inherited?: boolean | undefined;
152
+ } | {
153
+ type: KnownRoxygenTags.Export;
154
+ inherited?: boolean | undefined;
155
+ } | {
156
+ value: string;
157
+ type: KnownRoxygenTags.ExportClass;
158
+ inherited?: boolean | undefined;
159
+ } | {
160
+ value: string;
161
+ type: KnownRoxygenTags.ExportMethod;
162
+ inherited?: boolean | undefined;
163
+ } | {
164
+ value: string;
165
+ type: KnownRoxygenTags.ExportPattern;
166
+ inherited?: boolean | undefined;
167
+ } | {
168
+ value: string;
169
+ type: KnownRoxygenTags.ExportS3Method;
170
+ inherited?: boolean | undefined;
171
+ } | {
172
+ value: string;
173
+ type: KnownRoxygenTags.Import;
174
+ inherited?: boolean | undefined;
175
+ } | {
176
+ value: {
177
+ package: string;
178
+ classes: string[];
179
+ };
180
+ type: KnownRoxygenTags.ImportClassesFrom;
181
+ inherited?: boolean | undefined;
182
+ } | {
183
+ value: {
184
+ package: string;
185
+ methods: string[];
186
+ };
187
+ type: KnownRoxygenTags.ImportMethodsFrom;
188
+ inherited?: boolean | undefined;
189
+ } | {
190
+ value: {
191
+ package: string;
192
+ symbols: string[];
193
+ };
194
+ type: KnownRoxygenTags.ImportFrom;
195
+ inherited?: boolean | undefined;
196
+ } | {
197
+ value: string;
198
+ type: KnownRoxygenTags.RawNamespace;
199
+ inherited?: boolean | undefined;
200
+ } | {
201
+ value: string;
202
+ type: KnownRoxygenTags.UseDynLib;
203
+ inherited?: boolean | undefined;
204
+ } | {
205
+ type: KnownRoxygenTags.Md;
206
+ inherited?: boolean | undefined;
207
+ } | {
208
+ type: KnownRoxygenTags.NoMd;
209
+ inherited?: boolean | undefined;
210
+ } | {
211
+ value: {
212
+ title: string;
213
+ content: string;
214
+ };
215
+ type: KnownRoxygenTags.Section;
216
+ inherited?: boolean | undefined;
217
+ } | {
218
+ value: {
219
+ name: string;
220
+ description: string;
221
+ };
222
+ type: KnownRoxygenTags.Field;
223
+ inherited?: boolean | undefined;
224
+ } | {
225
+ value: string;
226
+ type: KnownRoxygenTags.Format;
227
+ inherited?: boolean | undefined;
228
+ } | {
229
+ value: {
230
+ generic: string;
231
+ class: string;
232
+ };
233
+ type: KnownRoxygenTags.Method;
234
+ inherited?: boolean | undefined;
235
+ } | {
236
+ value: {
237
+ name: string;
238
+ description: string;
239
+ };
240
+ type: KnownRoxygenTags.Slot;
241
+ inherited?: boolean | undefined;
242
+ } | {
243
+ value: string;
244
+ type: KnownRoxygenTags.Source;
245
+ inherited?: boolean | undefined;
246
+ } | {
247
+ value: string;
248
+ type: KnownRoxygenTags.Description;
249
+ inherited?: boolean | undefined;
250
+ } | {
251
+ value: string;
252
+ type: KnownRoxygenTags.Details;
253
+ inherited?: boolean | undefined;
254
+ } | {
255
+ value: string;
256
+ type: KnownRoxygenTags.Example;
257
+ inherited?: boolean | undefined;
258
+ } | {
259
+ value: string;
260
+ type: KnownRoxygenTags.Examples;
261
+ inherited?: boolean | undefined;
262
+ } | {
263
+ value: {
264
+ condition: string;
265
+ content: string;
266
+ };
267
+ type: KnownRoxygenTags.ExamplesIf;
268
+ inherited?: boolean | undefined;
269
+ } | {
270
+ type: KnownRoxygenTags.NoRd;
271
+ inherited?: boolean | undefined;
272
+ } | {
273
+ value: {
274
+ name: string;
275
+ description: string;
276
+ };
277
+ type: KnownRoxygenTags.Param;
278
+ inherited?: boolean | undefined;
279
+ } | {
280
+ value: string;
281
+ type: KnownRoxygenTags.RawRd;
282
+ inherited?: boolean | undefined;
283
+ } | {
284
+ value: string;
285
+ type: KnownRoxygenTags.Return | KnownRoxygenTags.Returns;
286
+ inherited?: boolean | undefined;
287
+ } | {
288
+ value: string;
289
+ type: KnownRoxygenTags.Title;
290
+ inherited?: boolean | undefined;
291
+ } | {
292
+ value: string;
293
+ type: KnownRoxygenTags.Usage;
294
+ inherited?: boolean | undefined;
295
+ } | {
296
+ value: {
297
+ dest: string;
298
+ description: string;
299
+ };
300
+ type: KnownRoxygenTags.DescribeIn;
301
+ inherited?: boolean | undefined;
302
+ } | {
303
+ value: string;
304
+ type: KnownRoxygenTags.Eval;
305
+ inherited?: boolean | undefined;
306
+ } | {
307
+ value: string;
308
+ type: KnownRoxygenTags.EvalRd;
309
+ inherited?: boolean | undefined;
310
+ } | {
311
+ value: string;
312
+ type: KnownRoxygenTags.IncludeRmd;
313
+ inherited?: boolean | undefined;
314
+ } | {
315
+ value: {
316
+ source: string;
317
+ components: string[];
318
+ };
319
+ type: KnownRoxygenTags.Inherit;
320
+ inherited?: boolean | undefined;
321
+ } | {
322
+ value: {
323
+ source: string;
324
+ args: string[];
325
+ };
326
+ type: KnownRoxygenTags.InheritDotParams;
327
+ inherited?: boolean | undefined;
328
+ } | {
329
+ value: string;
330
+ type: KnownRoxygenTags.InheritParams;
331
+ inherited?: boolean | undefined;
332
+ } | {
333
+ value: {
334
+ source: string;
335
+ section: string;
336
+ };
337
+ type: KnownRoxygenTags.InheritSection;
338
+ inherited?: boolean | undefined;
339
+ } | {
340
+ value: number | undefined;
341
+ type: KnownRoxygenTags.Order;
342
+ inherited?: boolean | undefined;
343
+ } | {
344
+ value: string;
345
+ type: KnownRoxygenTags.RdName;
346
+ inherited?: boolean | undefined;
347
+ } | {
348
+ value: string;
349
+ type: KnownRoxygenTags.Template;
350
+ inherited?: boolean | undefined;
351
+ } | {
352
+ value: {
353
+ name: string;
354
+ value: string;
355
+ };
356
+ type: KnownRoxygenTags.TemplateVar;
357
+ inherited?: boolean | undefined;
358
+ } | {
359
+ value: string;
360
+ type: KnownRoxygenTags.Author;
361
+ inherited?: boolean | undefined;
362
+ } | {
363
+ value: {
364
+ tag: string;
365
+ content: string;
366
+ };
367
+ type: KnownRoxygenTags.Unknown;
368
+ inherited?: boolean | undefined;
369
+ } | {
370
+ value: string;
371
+ type: KnownRoxygenTags.DocType;
372
+ inherited?: boolean | undefined;
373
+ } | {
374
+ value: string;
375
+ type: KnownRoxygenTags.Name;
376
+ inherited?: boolean | undefined;
377
+ } | {
378
+ value: string;
379
+ type: KnownRoxygenTags.Text;
380
+ inherited?: boolean | undefined;
381
+ })[];
382
+ tags: {
383
+ aliases?: {
384
+ value: string[];
385
+ type: KnownRoxygenTags.Aliases;
386
+ inherited?: boolean | undefined;
387
+ }[] | undefined;
388
+ backref?: {
389
+ value: string;
390
+ type: KnownRoxygenTags.Backref;
391
+ inherited?: boolean | undefined;
392
+ }[] | undefined;
393
+ concept?: {
394
+ value: string;
395
+ type: KnownRoxygenTags.Concept;
396
+ inherited?: boolean | undefined;
397
+ }[] | undefined;
398
+ family?: {
399
+ value: string;
400
+ type: KnownRoxygenTags.Family;
401
+ inherited?: boolean | undefined;
402
+ }[] | undefined;
403
+ keywords?: {
404
+ value: string[];
405
+ type: KnownRoxygenTags.Keywords;
406
+ inherited?: boolean | undefined;
407
+ }[] | undefined;
408
+ references?: {
409
+ value: string;
410
+ type: KnownRoxygenTags.References;
411
+ inherited?: boolean | undefined;
412
+ }[] | undefined;
413
+ seealso?: {
414
+ value: string[];
415
+ type: KnownRoxygenTags.SeeAlso;
416
+ inherited?: boolean | undefined;
417
+ }[] | undefined;
418
+ evalNamespace?: {
419
+ value: string;
420
+ type: KnownRoxygenTags.EvalNamespace;
421
+ inherited?: boolean | undefined;
422
+ }[] | undefined;
423
+ export?: {
424
+ type: KnownRoxygenTags.Export;
425
+ inherited?: boolean | undefined;
426
+ }[] | undefined;
427
+ exportClass?: {
428
+ value: string;
429
+ type: KnownRoxygenTags.ExportClass;
430
+ inherited?: boolean | undefined;
431
+ }[] | undefined;
432
+ exportMethod?: {
433
+ value: string;
434
+ type: KnownRoxygenTags.ExportMethod;
435
+ inherited?: boolean | undefined;
436
+ }[] | undefined;
437
+ exportPattern?: {
438
+ value: string;
439
+ type: KnownRoxygenTags.ExportPattern;
440
+ inherited?: boolean | undefined;
441
+ }[] | undefined;
442
+ exportS3Method?: {
443
+ value: string;
444
+ type: KnownRoxygenTags.ExportS3Method;
445
+ inherited?: boolean | undefined;
446
+ }[] | undefined;
447
+ import?: {
448
+ value: string;
449
+ type: KnownRoxygenTags.Import;
450
+ inherited?: boolean | undefined;
451
+ }[] | undefined;
452
+ importClassesFrom?: {
453
+ value: {
454
+ package: string;
455
+ classes: string[];
456
+ };
457
+ type: KnownRoxygenTags.ImportClassesFrom;
458
+ inherited?: boolean | undefined;
459
+ }[] | undefined;
460
+ importMethodsFrom?: {
461
+ value: {
462
+ package: string;
463
+ methods: string[];
464
+ };
465
+ type: KnownRoxygenTags.ImportMethodsFrom;
466
+ inherited?: boolean | undefined;
467
+ }[] | undefined;
468
+ importFrom?: {
469
+ value: {
470
+ package: string;
471
+ symbols: string[];
472
+ };
473
+ type: KnownRoxygenTags.ImportFrom;
474
+ inherited?: boolean | undefined;
475
+ }[] | undefined;
476
+ rawNamespace?: {
477
+ value: string;
478
+ type: KnownRoxygenTags.RawNamespace;
479
+ inherited?: boolean | undefined;
480
+ }[] | undefined;
481
+ useDynLib?: {
482
+ value: string;
483
+ type: KnownRoxygenTags.UseDynLib;
484
+ inherited?: boolean | undefined;
485
+ }[] | undefined;
486
+ md?: {
487
+ type: KnownRoxygenTags.Md;
488
+ inherited?: boolean | undefined;
489
+ }[] | undefined;
490
+ noMd?: {
491
+ type: KnownRoxygenTags.NoMd;
492
+ inherited?: boolean | undefined;
493
+ }[] | undefined;
494
+ section?: {
495
+ value: {
496
+ title: string;
497
+ content: string;
498
+ };
499
+ type: KnownRoxygenTags.Section;
500
+ inherited?: boolean | undefined;
501
+ }[] | undefined;
502
+ field?: {
503
+ value: {
504
+ name: string;
505
+ description: string;
506
+ };
507
+ type: KnownRoxygenTags.Field;
508
+ inherited?: boolean | undefined;
509
+ }[] | undefined;
510
+ format?: {
511
+ value: string;
512
+ type: KnownRoxygenTags.Format;
513
+ inherited?: boolean | undefined;
514
+ }[] | undefined;
515
+ method?: {
516
+ value: {
517
+ generic: string;
518
+ class: string;
519
+ };
520
+ type: KnownRoxygenTags.Method;
521
+ inherited?: boolean | undefined;
522
+ }[] | undefined;
523
+ slot?: {
524
+ value: {
525
+ name: string;
526
+ description: string;
527
+ };
528
+ type: KnownRoxygenTags.Slot;
529
+ inherited?: boolean | undefined;
530
+ }[] | undefined;
531
+ source?: {
532
+ value: string;
533
+ type: KnownRoxygenTags.Source;
534
+ inherited?: boolean | undefined;
535
+ }[] | undefined;
536
+ description?: {
537
+ value: string;
538
+ type: KnownRoxygenTags.Description;
539
+ inherited?: boolean | undefined;
540
+ }[] | undefined;
541
+ details?: {
542
+ value: string;
543
+ type: KnownRoxygenTags.Details;
544
+ inherited?: boolean | undefined;
545
+ }[] | undefined;
546
+ example?: {
547
+ value: string;
548
+ type: KnownRoxygenTags.Example;
549
+ inherited?: boolean | undefined;
550
+ }[] | undefined;
551
+ examples?: {
552
+ value: string;
553
+ type: KnownRoxygenTags.Examples;
554
+ inherited?: boolean | undefined;
555
+ }[] | undefined;
556
+ examplesIf?: {
557
+ value: {
558
+ condition: string;
559
+ content: string;
560
+ };
561
+ type: KnownRoxygenTags.ExamplesIf;
562
+ inherited?: boolean | undefined;
563
+ }[] | undefined;
564
+ noRd?: {
565
+ type: KnownRoxygenTags.NoRd;
566
+ inherited?: boolean | undefined;
567
+ }[] | undefined;
568
+ param?: {
569
+ value: {
570
+ name: string;
571
+ description: string;
572
+ };
573
+ type: KnownRoxygenTags.Param;
574
+ inherited?: boolean | undefined;
575
+ }[] | undefined;
576
+ rawRd?: {
577
+ value: string;
578
+ type: KnownRoxygenTags.RawRd;
579
+ inherited?: boolean | undefined;
580
+ }[] | undefined;
581
+ return?: {
582
+ value: string;
583
+ type: KnownRoxygenTags.Return;
584
+ inherited?: boolean | undefined;
585
+ }[] | undefined;
586
+ returns?: {
587
+ value: string;
588
+ type: KnownRoxygenTags.Returns;
589
+ inherited?: boolean | undefined;
590
+ }[] | undefined;
591
+ title?: {
592
+ value: string;
593
+ type: KnownRoxygenTags.Title;
594
+ inherited?: boolean | undefined;
595
+ }[] | undefined;
596
+ usage?: {
597
+ value: string;
598
+ type: KnownRoxygenTags.Usage;
599
+ inherited?: boolean | undefined;
600
+ }[] | undefined;
601
+ describeIn?: {
602
+ value: {
603
+ dest: string;
604
+ description: string;
605
+ };
606
+ type: KnownRoxygenTags.DescribeIn;
607
+ inherited?: boolean | undefined;
608
+ }[] | undefined;
609
+ eval?: {
610
+ value: string;
611
+ type: KnownRoxygenTags.Eval;
612
+ inherited?: boolean | undefined;
613
+ }[] | undefined;
614
+ evalRd?: {
615
+ value: string;
616
+ type: KnownRoxygenTags.EvalRd;
617
+ inherited?: boolean | undefined;
618
+ }[] | undefined;
619
+ includeRmd?: {
620
+ value: string;
621
+ type: KnownRoxygenTags.IncludeRmd;
622
+ inherited?: boolean | undefined;
623
+ }[] | undefined;
624
+ inherit?: {
625
+ value: {
626
+ source: string;
627
+ components: string[];
628
+ };
629
+ type: KnownRoxygenTags.Inherit;
630
+ inherited?: boolean | undefined;
631
+ }[] | undefined;
632
+ inheritDotParams?: {
633
+ value: {
634
+ source: string;
635
+ args: string[];
636
+ };
637
+ type: KnownRoxygenTags.InheritDotParams;
638
+ inherited?: boolean | undefined;
639
+ }[] | undefined;
640
+ inheritParams?: {
641
+ value: string;
642
+ type: KnownRoxygenTags.InheritParams;
643
+ inherited?: boolean | undefined;
644
+ }[] | undefined;
645
+ inheritSection?: {
646
+ value: {
647
+ source: string;
648
+ section: string;
649
+ };
650
+ type: KnownRoxygenTags.InheritSection;
651
+ inherited?: boolean | undefined;
652
+ }[] | undefined;
653
+ order?: {
654
+ value: number | undefined;
655
+ type: KnownRoxygenTags.Order;
656
+ inherited?: boolean | undefined;
657
+ }[] | undefined;
658
+ rdname?: {
659
+ value: string;
660
+ type: KnownRoxygenTags.RdName;
661
+ inherited?: boolean | undefined;
662
+ }[] | undefined;
663
+ template?: {
664
+ value: string;
665
+ type: KnownRoxygenTags.Template;
666
+ inherited?: boolean | undefined;
667
+ }[] | undefined;
668
+ templateVar?: {
669
+ value: {
670
+ name: string;
671
+ value: string;
672
+ };
673
+ type: KnownRoxygenTags.TemplateVar;
674
+ inherited?: boolean | undefined;
675
+ }[] | undefined;
676
+ text?: {
677
+ value: string;
678
+ type: KnownRoxygenTags.Text;
679
+ inherited?: boolean | undefined;
680
+ }[] | undefined;
681
+ name?: {
682
+ value: string;
683
+ type: KnownRoxygenTags.Name;
684
+ inherited?: boolean | undefined;
685
+ }[] | undefined;
686
+ docType?: {
687
+ value: string;
688
+ type: KnownRoxygenTags.DocType;
689
+ inherited?: boolean | undefined;
690
+ }[] | undefined;
691
+ author?: {
692
+ value: string;
693
+ type: KnownRoxygenTags.Author;
694
+ inherited?: boolean | undefined;
695
+ }[] | undefined;
696
+ unknown?: {
697
+ value: {
698
+ tag: string;
699
+ content: string;
700
+ };
701
+ type: KnownRoxygenTags.Unknown;
702
+ inherited?: boolean | undefined;
703
+ }[] | undefined;
704
+ };
705
+ }>;
706
+ };
107
707
  readonly "query-data": {
108
708
  enrichElement: (_e: FlowrSearchElement<ParentInformation>, _search: FlowrSearchElements<ParentInformation, FlowrSearchElement<ParentInformation>[]>, _data: ReadonlyFlowrAnalysisProvider<import("../../r-bridge/parser").KnownParser>, args: QueryDataElementContent | undefined, prev: QueryDataElementContent | undefined) => QueryDataElementContent;
109
709
  enrichSearch: (_search: FlowrSearchElements<ParentInformation, FlowrSearchElement<ParentInformation>[]>, _data: ReadonlyFlowrAnalysisProvider<import("../../r-bridge/parser").KnownParser>, args: QueryDataSearchContent | undefined, prev: QueryDataSearchContent | undefined) => Required<QueryDataSearchContent>;
@@ -13,6 +13,7 @@ const cfg_kind_1 = require("../../project/cfg-kind");
13
13
  const identify_link_to_last_call_relation_1 = require("../../queries/catalog/call-context-query/identify-link-to-last-call-relation");
14
14
  const identifier_1 = require("../../dataflow/environments/identifier");
15
15
  const df_helper_1 = require("../../dataflow/graph/df-helper");
16
+ const documentation_provider_1 = require("../../r-bridge/roxygen2/documentation-provider");
16
17
  /**
17
18
  * An enumeration that stores the names of the available enrichments that can be applied to a set of search elements.
18
19
  * See {@link FlowrSearchBuilder.with} for more information on how to apply enrichments.
@@ -22,6 +23,7 @@ var Enrichment;
22
23
  Enrichment["CallTargets"] = "call-targets";
23
24
  Enrichment["LastCall"] = "last-call";
24
25
  Enrichment["CfgInformation"] = "cfg-information";
26
+ Enrichment["Roxygen"] = "roxygen";
25
27
  Enrichment["QueryData"] = "query-data";
26
28
  })(Enrichment || (exports.Enrichment = Enrichment = {}));
27
29
  /**
@@ -112,8 +114,8 @@ exports.Enrichments = {
112
114
  simplificationPasses: cfg_simplification_1.DefaultCfgSimplificationOrder,
113
115
  ...args
114
116
  };
115
- // short-circuit if we already have a cfg stored
116
- if (!args.forceRefresh && prev?.simpleCfg) {
117
+ // short-circuit if we already have a cfg stored (and the reachability info if requested)
118
+ if (!args.forceRefresh && prev?.cfg && (!args.checkReachable || prev.reachableNodes)) {
117
119
  return prev;
118
120
  }
119
121
  const content = {
@@ -126,6 +128,25 @@ exports.Enrichments = {
126
128
  return content;
127
129
  }
128
130
  },
131
+ [Enrichment.Roxygen]: {
132
+ enrichElement: async (e, _search, analyzer, _args, prev) => {
133
+ const content = (prev ?? {
134
+ documentation: [],
135
+ tags: {}
136
+ });
137
+ const normalize = await analyzer.normalize();
138
+ const roxygen = (0, documentation_provider_1.getDocumentationOf)(e.node.info.id, normalize.idMap);
139
+ if (roxygen !== undefined) {
140
+ const comments = (Array.isArray(roxygen) ? roxygen : [roxygen]);
141
+ content.documentation.push(...comments);
142
+ for (const comment of comments) {
143
+ content.tags[comment.type] ??= [];
144
+ content.tags[comment.type].push(comment);
145
+ }
146
+ }
147
+ return content;
148
+ }
149
+ },
129
150
  [Enrichment.QueryData]: {
130
151
  // the query data enrichment is just a "pass-through" that passes the query data to the underlying search
131
152
  enrichElement: (_e, _search, _data, args, prev) => (args ?? prev),