@eagleoutice/flowr 1.3.14 → 1.4.2

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 (309) hide show
  1. package/README.md +3 -3
  2. package/abstract-interpretation/domain.d.ts +27 -0
  3. package/abstract-interpretation/domain.js +146 -0
  4. package/abstract-interpretation/handler/binop/binop.d.ts +16 -0
  5. package/abstract-interpretation/handler/binop/binop.js +40 -0
  6. package/abstract-interpretation/handler/binop/operators.d.ts +2 -0
  7. package/abstract-interpretation/handler/binop/operators.js +42 -0
  8. package/abstract-interpretation/handler/handler.d.ts +6 -0
  9. package/abstract-interpretation/handler/handler.js +3 -0
  10. package/abstract-interpretation/processor.d.ts +10 -0
  11. package/abstract-interpretation/processor.js +84 -0
  12. package/benchmark/slicer.d.ts +6 -8
  13. package/benchmark/slicer.js +5 -15
  14. package/benchmark/stats/print.d.ts +1 -1
  15. package/benchmark/stats/print.js +0 -2
  16. package/benchmark/stats/stats.d.ts +3 -4
  17. package/benchmark/stats/stats.js +1 -1
  18. package/cli/benchmark-app.d.ts +1 -0
  19. package/cli/benchmark-app.js +21 -6
  20. package/cli/benchmark-helper-app.d.ts +2 -0
  21. package/cli/benchmark-helper-app.js +15 -6
  22. package/cli/common/features.d.ts +1 -1
  23. package/cli/common/options.d.ts +1 -1
  24. package/cli/common/options.js +4 -1
  25. package/cli/common/script.d.ts +1 -1
  26. package/cli/common/scripts-info.d.ts +3 -2
  27. package/cli/common/scripts-info.js +15 -1
  28. package/cli/export-quads-app.js +1 -5
  29. package/cli/repl/commands/cfg.d.ts +1 -1
  30. package/cli/repl/commands/cfg.js +3 -3
  31. package/cli/repl/commands/commands.d.ts +4 -2
  32. package/cli/repl/commands/commands.js +67 -28
  33. package/cli/repl/commands/dataflow.d.ts +1 -1
  34. package/cli/repl/commands/dataflow.js +2 -2
  35. package/cli/repl/commands/execute.d.ts +2 -2
  36. package/cli/repl/commands/main.d.ts +2 -2
  37. package/cli/repl/commands/normalize.d.ts +1 -1
  38. package/cli/repl/commands/normalize.js +2 -2
  39. package/cli/repl/commands/parse.d.ts +1 -1
  40. package/cli/repl/commands/parse.js +12 -12
  41. package/cli/repl/commands/quit.d.ts +1 -1
  42. package/cli/repl/commands/quit.js +4 -1
  43. package/cli/repl/commands/version.d.ts +1 -1
  44. package/cli/repl/core.d.ts +5 -3
  45. package/cli/repl/core.js +63 -7
  46. package/cli/repl/execute.d.ts +1 -1
  47. package/cli/repl/execute.js +3 -3
  48. package/cli/repl/server/connection.d.ts +2 -2
  49. package/cli/repl/server/connection.js +4 -8
  50. package/cli/repl/server/messages/analysis.d.ts +3 -3
  51. package/cli/repl/server/messages/analysis.js +12 -32
  52. package/cli/repl/server/messages/error.d.ts +1 -1
  53. package/cli/repl/server/messages/hello.d.ts +2 -2
  54. package/cli/repl/server/messages/messages.d.ts +5 -5
  55. package/cli/repl/server/messages/repl.d.ts +1 -1
  56. package/cli/repl/server/messages/slice.d.ts +3 -3
  57. package/cli/repl/server/net.d.ts +16 -0
  58. package/cli/repl/server/net.js +42 -3
  59. package/cli/repl/server/send.d.ts +2 -2
  60. package/cli/repl/server/server.d.ts +2 -2
  61. package/cli/repl/server/validate.d.ts +3 -3
  62. package/cli/statistics-helper-app.js +2 -3
  63. package/cli/summarizer-app.js +1 -2
  64. package/config.d.ts +16 -0
  65. package/config.js +75 -0
  66. package/core/input.d.ts +5 -5
  67. package/core/output.d.ts +1 -1
  68. package/core/print/dataflow-printer.d.ts +3 -3
  69. package/core/print/normalize-printer.d.ts +2 -2
  70. package/core/print/parse-printer.d.ts +2 -3
  71. package/core/print/parse-printer.js +6 -4
  72. package/core/print/print.d.ts +1 -1
  73. package/core/print/slice-diff-ansi.d.ts +1 -1
  74. package/core/slicer.d.ts +5 -4
  75. package/core/slicer.js +2 -2
  76. package/core/steps.d.ts +10 -9
  77. package/core/steps.js +5 -4
  78. package/dataflow/environments/append.d.ts +1 -1
  79. package/dataflow/environments/environment.d.ts +4 -4
  80. package/dataflow/environments/environment.js +8 -0
  81. package/dataflow/environments/overwrite.d.ts +1 -1
  82. package/dataflow/environments/register.d.ts +2 -2
  83. package/dataflow/environments/register.js +1 -0
  84. package/dataflow/environments/resolve-by-name.d.ts +2 -2
  85. package/dataflow/environments/scoping.d.ts +1 -1
  86. package/dataflow/extractor.d.ts +5 -5
  87. package/dataflow/extractor.js +10 -2
  88. package/dataflow/graph/diff.d.ts +3 -3
  89. package/dataflow/graph/graph.d.ts +8 -7
  90. package/dataflow/graph/quads.d.ts +2 -2
  91. package/dataflow/graph/vertex.d.ts +5 -5
  92. package/dataflow/internal/info.d.ts +2 -2
  93. package/dataflow/internal/linker.d.ts +3 -3
  94. package/dataflow/internal/process/access.d.ts +3 -3
  95. package/dataflow/internal/process/expression-list.d.ts +3 -3
  96. package/dataflow/internal/process/expression-list.js +0 -4
  97. package/dataflow/internal/process/functions/argument.d.ts +4 -4
  98. package/dataflow/internal/process/functions/exit-points.d.ts +1 -1
  99. package/dataflow/internal/process/functions/function-call.d.ts +3 -3
  100. package/dataflow/internal/process/functions/function-call.js +7 -1
  101. package/dataflow/internal/process/functions/function-definition.d.ts +3 -3
  102. package/dataflow/internal/process/functions/parameter.d.ts +3 -3
  103. package/dataflow/internal/process/functions/source.d.ts +8 -0
  104. package/dataflow/internal/process/functions/source.js +81 -0
  105. package/dataflow/internal/process/if-then-else.d.ts +3 -3
  106. package/dataflow/internal/process/loops/for-loop.d.ts +3 -3
  107. package/dataflow/internal/process/loops/repeat-loop.d.ts +3 -3
  108. package/dataflow/internal/process/loops/while-loop.d.ts +3 -3
  109. package/dataflow/internal/process/operators/assignment.d.ts +3 -3
  110. package/dataflow/internal/process/operators/non-assignment-binary-op.d.ts +3 -3
  111. package/dataflow/internal/process/operators/pipe.d.ts +3 -3
  112. package/dataflow/internal/process/operators/unary-op.d.ts +3 -3
  113. package/dataflow/internal/process/symbol.d.ts +3 -3
  114. package/dataflow/internal/process/uninteresting-leaf.d.ts +2 -2
  115. package/dataflow/processor.d.ts +12 -3
  116. package/flowr.d.ts +5 -2
  117. package/flowr.js +19 -12
  118. package/package.json +50 -18
  119. package/r-bridge/lang-4.x/ast/index.d.ts +1 -0
  120. package/r-bridge/lang-4.x/ast/index.js +3 -0
  121. package/r-bridge/lang-4.x/ast/model/collect.d.ts +2 -2
  122. package/r-bridge/lang-4.x/ast/model/model.d.ts +6 -6
  123. package/r-bridge/lang-4.x/ast/model/nodes/info/index.d.ts +2 -2
  124. package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.d.ts +3 -3
  125. package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +3 -3
  126. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +3 -3
  127. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +3 -3
  128. package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +2 -2
  129. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +2 -2
  130. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +2 -2
  131. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +4 -4
  132. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +4 -4
  133. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +4 -4
  134. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +3 -3
  135. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +2 -2
  136. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +2 -2
  137. package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +2 -2
  138. package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +3 -3
  139. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +3 -3
  140. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +2 -2
  141. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +3 -3
  142. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +3 -3
  143. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +2 -2
  144. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +3 -3
  145. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +3 -3
  146. package/r-bridge/lang-4.x/ast/model/operators.d.ts +1 -1
  147. package/r-bridge/lang-4.x/ast/model/processing/decorate.d.ts +4 -2
  148. package/r-bridge/lang-4.x/ast/model/processing/decorate.js +6 -1
  149. package/r-bridge/lang-4.x/ast/model/processing/fold.d.ts +3 -3
  150. package/r-bridge/lang-4.x/ast/model/processing/role.d.ts +1 -1
  151. package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.d.ts +3 -3
  152. package/r-bridge/lang-4.x/ast/model/processing/visitor.d.ts +1 -1
  153. package/r-bridge/lang-4.x/ast/parser/json/format.d.ts +14 -0
  154. package/r-bridge/lang-4.x/ast/parser/json/format.js +26 -0
  155. package/r-bridge/lang-4.x/ast/parser/json/parser.d.ts +7 -0
  156. package/r-bridge/lang-4.x/ast/parser/json/parser.js +57 -0
  157. package/r-bridge/lang-4.x/ast/parser/xml/data.d.ts +4 -7
  158. package/r-bridge/lang-4.x/ast/parser/xml/hooks.d.ts +5 -5
  159. package/r-bridge/lang-4.x/ast/parser/xml/index.d.ts +0 -2
  160. package/r-bridge/lang-4.x/ast/parser/xml/index.js +0 -2
  161. package/r-bridge/lang-4.x/ast/parser/xml/input-format.d.ts +6 -2
  162. package/r-bridge/lang-4.x/ast/parser/xml/input-format.js +7 -10
  163. package/r-bridge/lang-4.x/ast/parser/xml/internal/access.d.ts +3 -3
  164. package/r-bridge/lang-4.x/ast/parser/xml/internal/access.js +2 -2
  165. package/r-bridge/lang-4.x/ast/parser/xml/internal/control/if-then-else.d.ts +3 -3
  166. package/r-bridge/lang-4.x/ast/parser/xml/internal/control/if-then-else.js +1 -1
  167. package/r-bridge/lang-4.x/ast/parser/xml/internal/control/if-then.d.ts +3 -3
  168. package/r-bridge/lang-4.x/ast/parser/xml/internal/control/if-then.js +2 -2
  169. package/r-bridge/lang-4.x/ast/parser/xml/internal/expression/expression.d.ts +3 -3
  170. package/r-bridge/lang-4.x/ast/parser/xml/internal/expression/expression.js +4 -4
  171. package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/argument.d.ts +3 -3
  172. package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/argument.js +2 -2
  173. package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/call.d.ts +3 -3
  174. package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/call.js +4 -4
  175. package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/definition.d.ts +3 -3
  176. package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/definition.js +2 -2
  177. package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/parameter.d.ts +3 -3
  178. package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/parameter.js +2 -2
  179. package/r-bridge/lang-4.x/ast/parser/xml/internal/index.d.ts +0 -1
  180. package/r-bridge/lang-4.x/ast/parser/xml/internal/index.js +0 -1
  181. package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/break.d.ts +3 -3
  182. package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/break.js +2 -2
  183. package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/for.d.ts +3 -3
  184. package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/for.js +3 -6
  185. package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/next.d.ts +3 -3
  186. package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/next.js +2 -2
  187. package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/repeat.d.ts +3 -3
  188. package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/repeat.js +2 -2
  189. package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/while.d.ts +3 -3
  190. package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/while.js +2 -2
  191. package/r-bridge/lang-4.x/ast/parser/xml/internal/meta.d.ts +9 -14
  192. package/r-bridge/lang-4.x/ast/parser/xml/internal/meta.js +15 -23
  193. package/r-bridge/lang-4.x/ast/parser/xml/internal/operators/binary.d.ts +3 -3
  194. package/r-bridge/lang-4.x/ast/parser/xml/internal/operators/binary.js +6 -6
  195. package/r-bridge/lang-4.x/ast/parser/xml/internal/operators/special.d.ts +1 -1
  196. package/r-bridge/lang-4.x/ast/parser/xml/internal/operators/unary.d.ts +3 -3
  197. package/r-bridge/lang-4.x/ast/parser/xml/internal/operators/unary.js +3 -3
  198. package/r-bridge/lang-4.x/ast/parser/xml/internal/other/comment.d.ts +3 -3
  199. package/r-bridge/lang-4.x/ast/parser/xml/internal/other/comment.js +2 -2
  200. package/r-bridge/lang-4.x/ast/parser/xml/internal/other/line-directive.d.ts +3 -3
  201. package/r-bridge/lang-4.x/ast/parser/xml/internal/other/line-directive.js +2 -2
  202. package/r-bridge/lang-4.x/ast/parser/xml/internal/structure/elements.d.ts +4 -4
  203. package/r-bridge/lang-4.x/ast/parser/xml/internal/structure/elements.js +3 -3
  204. package/r-bridge/lang-4.x/ast/parser/xml/internal/structure/root.d.ts +3 -3
  205. package/r-bridge/lang-4.x/ast/parser/xml/internal/structure/root.js +3 -4
  206. package/r-bridge/lang-4.x/ast/parser/xml/internal/structure/single-element.d.ts +4 -4
  207. package/r-bridge/lang-4.x/ast/parser/xml/internal/structure/single-element.js +2 -2
  208. package/r-bridge/lang-4.x/ast/parser/xml/internal/values/number.d.ts +4 -4
  209. package/r-bridge/lang-4.x/ast/parser/xml/internal/values/number.js +2 -2
  210. package/r-bridge/lang-4.x/ast/parser/xml/internal/values/string.d.ts +3 -3
  211. package/r-bridge/lang-4.x/ast/parser/xml/internal/values/string.js +2 -2
  212. package/r-bridge/lang-4.x/ast/parser/xml/internal/values/symbol.d.ts +3 -3
  213. package/r-bridge/lang-4.x/ast/parser/xml/internal/values/symbol.js +4 -4
  214. package/r-bridge/lang-4.x/values.d.ts +0 -1
  215. package/r-bridge/lang-4.x/values.js +14 -6
  216. package/r-bridge/retriever.d.ts +26 -22
  217. package/r-bridge/retriever.js +73 -23
  218. package/r-bridge/shell-executor.d.ts +11 -0
  219. package/r-bridge/shell-executor.js +50 -0
  220. package/r-bridge/shell.d.ts +12 -31
  221. package/r-bridge/shell.js +36 -94
  222. package/reconstruct/reconstruct.d.ts +1 -1
  223. package/slicing/criterion/collect-all.d.ts +3 -3
  224. package/slicing/criterion/filters/all-variables.d.ts +1 -1
  225. package/slicing/criterion/parse.d.ts +1 -1
  226. package/slicing/static/static-slicer.d.ts +3 -3
  227. package/statistics/features/common-syntax-probability.d.ts +3 -2
  228. package/statistics/features/common-syntax-probability.js +0 -3
  229. package/statistics/features/feature.d.ts +6 -6
  230. package/statistics/features/post-processing.d.ts +2 -2
  231. package/statistics/features/supported/assignments/assignments.d.ts +2 -2
  232. package/statistics/features/supported/assignments/post-process.d.ts +2 -2
  233. package/statistics/features/supported/assignments/post-process.js +6 -6
  234. package/statistics/features/supported/comments/comments.d.ts +2 -2
  235. package/statistics/features/supported/comments/post-process.d.ts +2 -2
  236. package/statistics/features/supported/comments/post-process.js +2 -2
  237. package/statistics/features/supported/control-flow/control-flow.d.ts +2 -2
  238. package/statistics/features/supported/control-flow/post-process.d.ts +2 -2
  239. package/statistics/features/supported/data-access/data-access.d.ts +3 -3
  240. package/statistics/features/supported/data-access/post-process.d.ts +2 -2
  241. package/statistics/features/supported/data-access/post-process.js +4 -4
  242. package/statistics/features/supported/defined-functions/defined-functions.d.ts +4 -4
  243. package/statistics/features/supported/defined-functions/post-process.d.ts +2 -2
  244. package/statistics/features/supported/defined-functions/post-process.js +4 -4
  245. package/statistics/features/supported/expression-list/expression-list.d.ts +2 -2
  246. package/statistics/features/supported/expression-list/post-process.d.ts +2 -2
  247. package/statistics/features/supported/expression-list/post-process.js +3 -3
  248. package/statistics/features/supported/loops/loops.d.ts +2 -2
  249. package/statistics/features/supported/loops/post-process.d.ts +2 -2
  250. package/statistics/features/supported/loops/post-process.js +3 -3
  251. package/statistics/features/supported/used-functions/post-process.d.ts +2 -2
  252. package/statistics/features/supported/used-functions/post-process.js +5 -5
  253. package/statistics/features/supported/used-functions/used-functions.d.ts +3 -3
  254. package/statistics/features/supported/used-packages/post-process.d.ts +2 -2
  255. package/statistics/features/supported/used-packages/post-process.js +5 -5
  256. package/statistics/features/supported/used-packages/used-packages.d.ts +2 -2
  257. package/statistics/features/supported/values/post-process.d.ts +2 -2
  258. package/statistics/features/supported/values/post-process.js +3 -3
  259. package/statistics/features/supported/values/values.d.ts +2 -2
  260. package/statistics/features/supported/variables/post-process.d.ts +3 -3
  261. package/statistics/features/supported/variables/post-process.js +3 -3
  262. package/statistics/features/supported/variables/variables.d.ts +2 -2
  263. package/statistics/meta-statistics.d.ts +1 -1
  264. package/statistics/output/ansi.js +1 -1
  265. package/statistics/output/print-stats.d.ts +2 -2
  266. package/statistics/output/statistics-file.d.ts +1 -1
  267. package/statistics/statistics.d.ts +4 -4
  268. package/statistics/statistics.js +7 -8
  269. package/util/args.d.ts +8 -4
  270. package/util/args.js +11 -4
  271. package/util/{cfg.d.ts → cfg/cfg.d.ts} +18 -6
  272. package/util/{cfg.js → cfg/cfg.js} +42 -37
  273. package/util/cfg/visitor.d.ts +14 -0
  274. package/util/cfg/visitor.js +64 -0
  275. package/util/diff.d.ts +1 -1
  276. package/util/files.d.ts +7 -1
  277. package/util/files.js +11 -1
  278. package/util/log.js +3 -0
  279. package/util/mermaid/ast.d.ts +1 -1
  280. package/util/mermaid/cfg.d.ts +2 -2
  281. package/util/mermaid/dfg.d.ts +3 -3
  282. package/util/objects.d.ts +1 -1
  283. package/util/quads.d.ts +2 -2
  284. package/util/summarizer/benchmark/data.d.ts +1 -1
  285. package/util/summarizer/benchmark/first-phase/input.d.ts +2 -1
  286. package/util/summarizer/benchmark/first-phase/input.js +20 -4
  287. package/util/summarizer/benchmark/first-phase/process.d.ts +4 -3
  288. package/util/summarizer/benchmark/first-phase/process.js +14 -5
  289. package/util/summarizer/benchmark/second-phase/graph.d.ts +1 -1
  290. package/util/summarizer/benchmark/second-phase/graph.js +1 -1
  291. package/util/summarizer/benchmark/second-phase/process.d.ts +3 -1
  292. package/util/summarizer/benchmark/second-phase/process.js +48 -11
  293. package/util/summarizer/benchmark/summarizer.d.ts +3 -6
  294. package/util/summarizer/benchmark/summarizer.js +16 -11
  295. package/util/summarizer/statistics/first-phase/process.js +8 -8
  296. package/util/summarizer/statistics/post-process/clusterer.d.ts +2 -2
  297. package/util/summarizer/statistics/post-process/file-based-count.d.ts +1 -1
  298. package/util/summarizer/statistics/post-process/histogram.d.ts +2 -2
  299. package/util/summarizer/statistics/post-process/post-process-output.d.ts +2 -2
  300. package/util/summarizer/statistics/post-process/post-process-output.js +4 -5
  301. package/util/summarizer/statistics/second-phase/process.d.ts +2 -2
  302. package/util/summarizer/statistics/summarizer.d.ts +3 -2
  303. package/util/summarizer/summarizer.d.ts +1 -1
  304. package/r-bridge/lang-4.x/ast/parser/xml/config.d.ts +0 -25
  305. package/r-bridge/lang-4.x/ast/parser/xml/config.js +0 -16
  306. package/r-bridge/lang-4.x/ast/parser/xml/internal/xml-to-json.d.ts +0 -9
  307. package/r-bridge/lang-4.x/ast/parser/xml/internal/xml-to-json.js +0 -51
  308. package/r-bridge/lang-4.x/ast/parser/xml/parser.d.ts +0 -17
  309. package/r-bridge/lang-4.x/ast/parser/xml/parser.js +0 -30
@@ -1,4 +1,4 @@
1
- import { DataflowInformation } from '../../info';
2
- import { DataflowProcessorInformation } from '../../../processor';
3
- import { ParentInformation, RBinaryOp } from '../../../../r-bridge';
1
+ import type { DataflowInformation } from '../../info';
2
+ import type { DataflowProcessorInformation } from '../../../processor';
3
+ import type { ParentInformation, RBinaryOp } from '../../../../r-bridge';
4
4
  export declare function processNonAssignmentBinaryOp<OtherInfo>(op: RBinaryOp<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
@@ -1,4 +1,4 @@
1
- import { DataflowInformation } from '../../info';
2
- import { DataflowProcessorInformation } from '../../../processor';
3
- import { ParentInformation, RPipe } from '../../../../r-bridge';
1
+ import type { DataflowInformation } from '../../info';
2
+ import type { DataflowProcessorInformation } from '../../../processor';
3
+ import type { ParentInformation, RPipe } from '../../../../r-bridge';
4
4
  export declare function processPipeOperation<OtherInfo>(op: RPipe<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
@@ -1,4 +1,4 @@
1
- import { DataflowInformation } from '../../info';
2
- import { DataflowProcessorInformation } from '../../../processor';
3
- import { ParentInformation, RUnaryOp } from '../../../../r-bridge';
1
+ import type { DataflowInformation } from '../../info';
2
+ import type { DataflowProcessorInformation } from '../../../processor';
3
+ import type { ParentInformation, RUnaryOp } from '../../../../r-bridge';
4
4
  export declare function processUnaryOp<OtherInfo>(op: RUnaryOp<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo & ParentInformation>): DataflowInformation;
@@ -1,4 +1,4 @@
1
- import { ParentInformation, RSymbol } from '../../../r-bridge';
2
- import { DataflowInformation } from '../info';
3
- import { DataflowProcessorInformation } from '../../processor';
1
+ import type { ParentInformation, RSymbol } from '../../../r-bridge';
2
+ import type { DataflowInformation } from '../info';
3
+ import type { DataflowProcessorInformation } from '../../processor';
4
4
  export declare function processSymbol<OtherInfo>(symbol: RSymbol<OtherInfo & ParentInformation>, data: DataflowProcessorInformation<OtherInfo>): DataflowInformation;
@@ -1,3 +1,3 @@
1
- import { DataflowInformation } from '../info';
2
- import { DataflowProcessorInformation } from '../../processor';
1
+ import type { DataflowInformation } from '../info';
2
+ import type { DataflowProcessorInformation } from '../../processor';
3
3
  export declare function processUninterestingLeaf<OtherInfo>(_leaf: unknown, info: DataflowProcessorInformation<OtherInfo>): DataflowInformation;
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Based on a two-way fold, this processor will automatically supply scope information
3
3
  */
4
- import { NormalizedAst, ParentInformation, RNode, RNodeWithParent } from '../r-bridge';
5
- import { DataflowInformation } from './internal/info';
6
- import { DataflowScopeName, REnvironmentInformation } from './environments';
4
+ import type { NormalizedAst, ParentInformation, RNode, RNodeWithParent, RParseRequest } from '../r-bridge';
5
+ import type { DataflowInformation } from './internal/info';
6
+ import type { DataflowScopeName, REnvironmentInformation } from './environments';
7
7
  export interface DataflowProcessorInformation<OtherInfo> {
8
8
  /**
9
9
  * Initial and frozen ast-information
@@ -22,6 +22,15 @@ export interface DataflowProcessorInformation<OtherInfo> {
22
22
  * Other processors to be called by the given functions
23
23
  */
24
24
  readonly processors: DataflowProcessors<OtherInfo>;
25
+ /**
26
+ * The {@link RParseRequest} that is currently being parsed
27
+ */
28
+ readonly currentRequest: RParseRequest;
29
+ /**
30
+ * The chain of {@link RParseRequest} fingerprints ({@link requestFingerprint}) that lead to the {@link currentRequest}.
31
+ * The most recent (last) entry is expected to always be the {@link currentRequest}.
32
+ */
33
+ readonly referenceChain: string[];
25
34
  }
26
35
  export type DataflowProcessor<OtherInfo, NodeType extends RNodeWithParent<OtherInfo>> = (node: NodeType, data: DataflowProcessorInformation<OtherInfo>) => DataflowInformation;
27
36
  type NodeWithKey<OtherInfo, Node extends RNode<OtherInfo & ParentInformation>, TypeKey> = Node['type'] extends TypeKey ? Node : never;
package/flowr.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import commandLineUsage, { OptionDefinition } from 'command-line-usage';
1
+ import type { OptionDefinition } from 'command-line-usage';
2
2
  export declare const toolName = "flowr";
3
3
  export declare const optionDefinitions: OptionDefinition[];
4
4
  export interface FlowrCliOptions {
@@ -6,10 +6,13 @@ export interface FlowrCliOptions {
6
6
  version: boolean;
7
7
  help: boolean;
8
8
  server: boolean;
9
+ ws: boolean;
9
10
  port: number;
10
11
  'no-ansi': boolean;
11
12
  execute: string | undefined;
12
13
  script: string | undefined;
14
+ 'config-file': string;
15
+ 'r-path': string | undefined;
13
16
  }
14
17
  export declare const optionHelp: ({
15
18
  header: string;
@@ -21,6 +24,6 @@ export declare const optionHelp: ({
21
24
  optionList?: undefined;
22
25
  } | {
23
26
  header: string;
24
- optionList: commandLineUsage.OptionDefinition[];
27
+ optionList: OptionDefinition[];
25
28
  content?: undefined;
26
29
  })[];
package/flowr.js CHANGED
@@ -22,6 +22,8 @@ const package_json_1 = require("../package.json");
22
22
  const version_1 = require("./cli/repl/commands/version");
23
23
  const server_1 = require("./cli/repl/server/server");
24
24
  const commands_1 = require("./cli/repl/commands");
25
+ const net_1 = require("./cli/repl/server/net");
26
+ const config_1 = require("./config");
25
27
  const scriptsText = Array.from(Object.entries(common_1.scripts).filter(([, { type }]) => type === 'master script'), ([k,]) => k).join(', ');
26
28
  exports.toolName = 'flowr';
27
29
  exports.optionDefinitions = [
@@ -29,10 +31,13 @@ exports.optionDefinitions = [
29
31
  { name: 'help', alias: 'h', type: Boolean, description: 'Print this usage guide (or the guide of the corresponding script)' },
30
32
  { name: 'version', alias: 'V', type: Boolean, description: 'Provide information about the version of flowR as well as its underlying R system and exit.' },
31
33
  { name: 'server', type: Boolean, description: 'Do not drop into a repl, but instead start a server on the given port (default: 1042) and listen for messages.' },
34
+ { name: 'ws', type: Boolean, description: 'If the server flag is set, use websocket for messaging' },
32
35
  { name: 'port', type: Number, description: 'The port to listen on, if --server is given.', defaultValue: 1042, typeLabel: '{underline port}' },
33
36
  { name: 'execute', alias: 'e', type: String, description: 'Execute the given command and exit. Use a semicolon ";" to separate multiple commands.', typeLabel: '{underline command}', multiple: false },
34
37
  { name: 'no-ansi', type: Boolean, description: 'Disable ansi-escape-sequences in the output. Useful, if you want to redirect the output to a file.' },
35
38
  { name: 'script', alias: 's', type: String, description: `The sub-script to run (${scriptsText})`, multiple: false, defaultOption: true, typeLabel: '{underline files}', defaultValue: undefined },
39
+ { name: 'config-file', type: String, description: 'The name of the configuration file to use', multiple: false },
40
+ { name: 'r-path', type: String, description: 'The path to the R executable to use. Defaults to your PATH.', multiple: false }
36
41
  ];
37
42
  exports.optionHelp = [
38
43
  {
@@ -61,19 +66,21 @@ if (options['no-ansi']) {
61
66
  log_1.log.info('disabling ansi colors');
62
67
  (0, statistics_1.setFormatter)(statistics_1.voidFormatter);
63
68
  }
64
- async function retrieveShell() {
69
+ (0, config_1.setConfigFile)(undefined, options['config-file'] ?? config_1.defaultConfigFile, true);
70
+ function retrieveShell() {
65
71
  // we keep an active shell session to allow other parse investigations :)
66
- const shell = new r_bridge_1.RShell({
72
+ let opts = {
67
73
  revive: 'always',
68
74
  onRevive: (code, signal) => {
69
75
  const signalText = signal == null ? '' : ` and signal ${signal}`;
70
76
  console.log(statistics_1.formatter.format(`R process exited with code ${code}${signalText}. Restarting...`, { color: 5 /* Colors.Magenta */, effect: statistics_1.ColorEffect.Foreground }));
71
77
  console.log((0, statistics_1.italic)(`If you want to exit, press either Ctrl+C twice, or enter ${(0, statistics_1.bold)(':quit')}`));
72
- },
73
- });
74
- shell.tryToInjectHomeLibPath();
75
- await shell.ensurePackageInstalled('xmlparsedata', true);
76
- return shell;
78
+ }
79
+ };
80
+ if (options['r-path']) {
81
+ opts = { ...opts, pathToRExecutable: options['r-path'] };
82
+ }
83
+ return new r_bridge_1.RShell(opts);
77
84
  }
78
85
  async function mainRepl() {
79
86
  if (options.script) {
@@ -93,7 +100,7 @@ async function mainRepl() {
93
100
  await (0, version_1.printVersionInformation)(commands_1.standardReplOutput);
94
101
  process.exit(0);
95
102
  }
96
- const shell = await retrieveShell();
103
+ const shell = retrieveShell();
97
104
  const end = () => {
98
105
  if (options.execute === undefined) {
99
106
  console.log(`\n${(0, statistics_1.italic)('Exiting...')}`);
@@ -112,8 +119,8 @@ async function mainRepl() {
112
119
  }
113
120
  process.exit(0);
114
121
  }
115
- async function mainServer() {
116
- const shell = await retrieveShell();
122
+ async function mainServer(backend = new net_1.NetServer()) {
123
+ const shell = retrieveShell();
117
124
  const end = () => {
118
125
  if (options.execute === undefined) {
119
126
  console.log(`\n${(0, statistics_1.italic)('Exiting...')}`);
@@ -124,10 +131,10 @@ async function mainServer() {
124
131
  // hook some handlers
125
132
  process.on('SIGINT', end);
126
133
  process.on('SIGTERM', end);
127
- await new server_1.FlowRServer(shell).start(options.port);
134
+ await new server_1.FlowRServer(shell, backend).start(options.port);
128
135
  }
129
136
  if (options.server) {
130
- void mainServer();
137
+ void mainServer(options.ws ? new net_1.WebSocketServerWrapper() : new net_1.NetServer());
131
138
  }
132
139
  else {
133
140
  void mainRepl();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eagleoutice/flowr",
3
- "version": "1.3.14",
3
+ "version": "1.4.2",
4
4
  "description": "Static Dataflow Analyzer and Program Slicer for the R Programming Language",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "repository": {
@@ -19,7 +19,7 @@
19
19
  "slicer": "ts-node src/cli/slicer-app.ts",
20
20
  "release": "release-it --ci",
21
21
  "benchmark-helper": "ts-node src/cli/benchmark-helper-app.ts",
22
- "benchmark": "ts-node src/cli/benchmark-app.ts",
22
+ "benchmark": "npm run build && node dist/src/cli/benchmark-app.js",
23
23
  "summarizer": "ts-node src/cli/summarizer-app.ts",
24
24
  "export-quads": "ts-node src/cli/export-quads-app.ts",
25
25
  "build": "tsc --project .",
@@ -27,8 +27,8 @@
27
27
  "lint": "npm run license-compat -- --summary && eslint src/ test/",
28
28
  "license-compat": "license-checker --onlyAllow 'MIT;MIT OR X11;GPLv2;LGPL;GNUGPL;ISC;Apache-2.0;FreeBSD;BSD-2-Clause;clearbsd;ModifiedBSD;BSD-3-Clause;Python-2.0;Unlicense;WTFPL;CC-BY-4.0;CC-BY-3.0;CC0-1.0;0BSD'",
29
29
  "doc": "typedoc",
30
- "test": "nyc --no-clean mocha --require ts-node/register --timeout 60000 \"test/**/*.spec.ts\"",
31
- "performance-test": "func() { cd test/performance/ && bash run-all-suites.sh $1 $2; cd ../../; }; func",
30
+ "test": "nyc --no-clean mocha",
31
+ "performance-test": "func() { cd test/performance/ && bash run-all-suites.sh $1 $2 $3; cd ../../; }; func",
32
32
  "test-full": "npm run test -- --test-installation"
33
33
  },
34
34
  "keywords": [
@@ -41,6 +41,11 @@
41
41
  ],
42
42
  "author": "Florian Sihler",
43
43
  "license": "ISC",
44
+ "mocha": {
45
+ "require": "ts-node/register",
46
+ "timeout": 60000,
47
+ "spec": "test/**/*.spec.ts"
48
+ },
44
49
  "nyc": {
45
50
  "all": true,
46
51
  "per-file": true,
@@ -132,11 +137,18 @@
132
137
  "plugins": [
133
138
  "@typescript-eslint",
134
139
  "eslint-plugin-tsdoc",
135
- "check-file"
140
+ "check-file",
141
+ "@stylistic",
142
+ "@stylistic/js",
143
+ "@stylistic/ts",
144
+ "import"
136
145
  ],
137
146
  "rules": {
138
- "indent": "off",
139
- "@typescript-eslint/indent": [
147
+ "@stylistic/js/object-curly-spacing": [
148
+ "error",
149
+ "always"
150
+ ],
151
+ "@stylistic/js/indent": [
140
152
  "error",
141
153
  "tab",
142
154
  {
@@ -147,14 +159,14 @@
147
159
  "SwitchCase": 1
148
160
  }
149
161
  ],
150
- "quotes": [
162
+ "@stylistic/js/quotes": [
151
163
  "error",
152
164
  "single",
153
165
  {
154
166
  "avoidEscape": true
155
167
  }
156
168
  ],
157
- "no-mixed-spaces-and-tabs": [
169
+ "@stylistic/no-mixed-spaces-and-tabs": [
158
170
  "error",
159
171
  "smart-tabs"
160
172
  ],
@@ -172,21 +184,27 @@
172
184
  "@typescript-eslint/non-nullable-type-assertion-style": "off",
173
185
  "@typescript-eslint/no-unsafe-enum-comparison": "off",
174
186
  "@typescript-eslint/no-redundant-type-constituents": "off",
175
- "@typescript-eslint/key-spacing": [
187
+ "@typescript-eslint/consistent-type-assertions": [
188
+ "error",
189
+ {
190
+ "assertionStyle": "as"
191
+ }
192
+ ],
193
+ "@stylistic/ts/key-spacing": [
176
194
  "error",
177
195
  {
178
196
  "align": "value"
179
197
  }
180
198
  ],
181
- "semi": [
199
+ "@stylistic/js/semi": [
182
200
  "error",
183
201
  "never"
184
202
  ],
185
- "space-before-function-paren": [
203
+ "@stylistic/js/space-before-function-paren": [
186
204
  "error",
187
205
  "never"
188
206
  ],
189
- "keyword-spacing": "off",
207
+ "@stylistic/js/keyword-spacing": "off",
190
208
  "check-file/filename-naming-convention": [
191
209
  "error",
192
210
  {
@@ -199,7 +217,7 @@
199
217
  "*.spec.{js,jsx,ts,tsx}": "test/**"
200
218
  }
201
219
  ],
202
- "@typescript-eslint/keyword-spacing": [
220
+ "@stylistic/ts/keyword-spacing": [
203
221
  "error",
204
222
  {
205
223
  "before": true,
@@ -232,7 +250,7 @@
232
250
  }
233
251
  }
234
252
  ],
235
- "@typescript-eslint/space-before-function-paren": [
253
+ "@stylistic/ts/space-before-function-paren": [
236
254
  "error",
237
255
  "never"
238
256
  ],
@@ -288,7 +306,15 @@
288
306
  "PascalCase"
289
307
  ]
290
308
  }
291
- ]
309
+ ],
310
+ "@typescript-eslint/consistent-type-imports": "error",
311
+ "curly": "error",
312
+ "@stylistic/js/brace-style": [
313
+ "error",
314
+ "1tbs"
315
+ ],
316
+ "@stylistic/js/new-parens": "error",
317
+ "import/no-duplicates": "error"
292
318
  }
293
319
  },
294
320
  "release-it": {
@@ -325,9 +351,15 @@
325
351
  "after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
326
352
  }
327
353
  },
354
+ "engines": {
355
+ "node": ">=16.0.0"
356
+ },
328
357
  "devDependencies": {
329
358
  "@commitlint/cli": "^18.4.3",
330
359
  "@commitlint/config-angular": "^18.4.3",
360
+ "@stylistic/eslint-plugin": "^1.6.2",
361
+ "@stylistic/eslint-plugin-plus": "^1.6.2",
362
+ "@stylistic/eslint-plugin-ts": "^1.6.2",
331
363
  "@types/chai": "^4.3.11",
332
364
  "@types/chai-as-promised": "^7.1.8",
333
365
  "@types/command-line-args": "^5.2.3",
@@ -337,7 +369,6 @@
337
369
  "@types/n3": "^1.16.4",
338
370
  "@types/object-hash": "^3.0.6",
339
371
  "@types/tmp": "^0.2.6",
340
- "@types/xml2js": "^0.4.14",
341
372
  "@typescript-eslint/eslint-plugin": "^6.13.2",
342
373
  "chai": "^4.3.10",
343
374
  "chai-as-promised": "^7.1.1",
@@ -363,6 +394,7 @@
363
394
  "dependencies": {
364
395
  "@types/semver": "^7.5.6",
365
396
  "@types/tar": "^6.1.10",
397
+ "@types/ws": "^8.5.10",
366
398
  "@xmldom/xmldom": "^0.8.10",
367
399
  "command-line-args": "^5.2.1",
368
400
  "command-line-usage": "^7.0.1",
@@ -377,7 +409,7 @@
377
409
  "tmp": "^0.2.1",
378
410
  "ts-essentials": "^9.4.1",
379
411
  "tslog": "^4.9.2",
380
- "xml2js": "^0.6.2",
412
+ "ws": "^8.16.0",
381
413
  "xpath-ts2": "^1.4.2"
382
414
  }
383
415
  }
@@ -1,2 +1,3 @@
1
1
  export * from './model';
2
2
  export * from './parser/xml';
3
+ export { parseLog } from './parser/json/parser';
@@ -14,6 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.parseLog = void 0;
17
18
  __exportStar(require("./model"), exports);
18
19
  __exportStar(require("./parser/xml"), exports);
20
+ var parser_1 = require("./parser/json/parser");
21
+ Object.defineProperty(exports, "parseLog", { enumerable: true, get: function () { return parser_1.parseLog; } });
19
22
  //# sourceMappingURL=index.js.map
@@ -1,5 +1,5 @@
1
- import { NodeId, ParentInformation } from './processing';
2
- import { RNode } from './model';
1
+ import type { NodeId, ParentInformation } from './processing';
2
+ import type { RNode } from './model';
3
3
  /**
4
4
  * Collects all node ids within a tree given by a respective root node
5
5
  *
@@ -1,9 +1,9 @@
1
- import { SourceRange } from '../../../../util/range';
2
- import { RType } from './type';
3
- import { MergeableRecord } from '../../../../util/objects';
4
- import { RNa, RNull } from '../../values';
5
- import { RExpressionList, RNumber, RSymbol, RLogical, RString, RBinaryOp, RUnaryOp, RIfThenElse, RParameter, RFunctionDefinition, RRepeatLoop, RForLoop, RWhileLoop, RComment, RFunctionCall, RBreak, RNext, RArgument, RNamedAccess, RIndexAccess, RLineDirective, RPipe } from './nodes';
6
- import { OtherInfoNode } from './nodes/info';
1
+ import type { SourceRange } from '../../../../util/range';
2
+ import type { RType } from './type';
3
+ import type { MergeableRecord } from '../../../../util/objects';
4
+ import type { RNa, RNull } from '../../values';
5
+ import type { RExpressionList, RNumber, RSymbol, RLogical, RString, RBinaryOp, RUnaryOp, RIfThenElse, RParameter, RFunctionDefinition, RRepeatLoop, RForLoop, RWhileLoop, RComment, RFunctionCall, RBreak, RNext, RArgument, RNamedAccess, RIndexAccess, RLineDirective, RPipe } from './nodes';
6
+ import type { OtherInfoNode } from './nodes/info';
7
7
  /** Simply an empty interface used to say that there are additional decorations (see {@link Base}). */
8
8
  export interface NoInfo {
9
9
  }
@@ -7,7 +7,7 @@
7
7
  * In the future, they could be still integrated into the main ast.
8
8
  * @module
9
9
  */
10
- import { RNode } from '../../model';
11
- import { RDelimiter } from './r-delimiter';
10
+ import type { RNode } from '../../model';
11
+ import type { RDelimiter } from './r-delimiter';
12
12
  export * from './r-delimiter';
13
13
  export type OtherInfoNode = RNode | RDelimiter;
@@ -1,6 +1,6 @@
1
- import { RawRType, RType } from '../../type';
2
- import { Location } from '../../model';
3
- import { MergeableRecord } from '../../../../../../util/objects';
1
+ import type { RawRType, RType } from '../../type';
2
+ import type { Location } from '../../model';
3
+ import type { MergeableRecord } from '../../../../../../util/objects';
4
4
  /**
5
5
  * Combines '`{`', '`}`', '`(`', '`)`', and other delimiters used by R, they are ignored for most analysis
6
6
  * but helpful during reconstruction.
@@ -1,6 +1,6 @@
1
- import { Base, Location, NoInfo, RNode } from '../model';
2
- import { RType } from '../type';
3
- import { RArgument } from './r-argument';
1
+ import type { Base, Location, NoInfo, RNode } from '../model';
2
+ import type { RType } from '../type';
3
+ import type { RArgument } from './r-argument';
4
4
  /**
5
5
  * Represents an R Indexing operation with `$`, `@`, `[[`, or `[`.
6
6
  */
@@ -1,6 +1,6 @@
1
- import { Base, Location, NoInfo, RNode } from '../model';
2
- import { RType } from '../type';
3
- import { RSymbol } from './r-symbol';
1
+ import type { Base, Location, NoInfo, RNode } from '../model';
2
+ import type { RType } from '../type';
3
+ import type { RSymbol } from './r-symbol';
4
4
  /**
5
5
  * Represents a named or unnamed argument of a function definition in R.
6
6
  */
@@ -1,6 +1,6 @@
1
- import { Base, Location, NoInfo, RNode } from '../model';
2
- import { RType } from '../type';
3
- import { BinaryOperatorFlavor } from '../operators';
1
+ import type { Base, Location, NoInfo, RNode } from '../model';
2
+ import type { RType } from '../type';
3
+ import type { BinaryOperatorFlavor } from '../operators';
4
4
  export interface RBinaryOp<Info = NoInfo> extends Base<Info>, Location {
5
5
  readonly type: RType.BinaryOp;
6
6
  readonly flavor: BinaryOperatorFlavor;
@@ -1,5 +1,5 @@
1
- import { Leaf, Location, NoInfo } from '../model';
2
- import { RType } from '../type';
1
+ import type { Leaf, Location, NoInfo } from '../model';
2
+ import type { RType } from '../type';
3
3
  export interface RBreak<Info = NoInfo> extends Location, Leaf<Info> {
4
4
  readonly type: RType.Break;
5
5
  }
@@ -1,5 +1,5 @@
1
- import { Leaf, Location, NoInfo } from '../model';
2
- import { RType } from '../type';
1
+ import type { Leaf, Location, NoInfo } from '../model';
2
+ import type { RType } from '../type';
3
3
  export interface RComment<Info = NoInfo> extends Location, Leaf<Info> {
4
4
  readonly type: RType.Comment;
5
5
  content: string;
@@ -1,5 +1,5 @@
1
- import { Base, Location, NoInfo, RNode, WithChildren } from '../model';
2
- import { RType } from '../type';
1
+ import type { Base, Location, NoInfo, RNode, WithChildren } from '../model';
2
+ import type { RType } from '../type';
3
3
  export interface RExpressionList<Info = NoInfo> extends WithChildren<Info, RNode<Info>>, Base<Info, string | undefined>, Partial<Location> {
4
4
  readonly type: RType.ExpressionList;
5
5
  readonly content?: string;
@@ -1,7 +1,7 @@
1
- import { Base, Location, NoInfo, RNode } from '../model';
2
- import { RType } from '../type';
3
- import { RSymbol } from './r-symbol';
4
- import { RExpressionList } from './r-expression-list';
1
+ import type { Base, Location, NoInfo, RNode } from '../model';
2
+ import type { RType } from '../type';
3
+ import type { RSymbol } from './r-symbol';
4
+ import type { RExpressionList } from './r-expression-list';
5
5
  /**
6
6
  * ```ts
7
7
  * for(<variable> in <vector>) <body>
@@ -1,7 +1,7 @@
1
- import { Base, Location, NoInfo, RNode } from '../model';
2
- import { RType } from '../type';
3
- import { RSymbol } from './r-symbol';
4
- import { RArgument } from './r-argument';
1
+ import type { Base, Location, NoInfo, RNode } from '../model';
2
+ import type { RType } from '../type';
3
+ import type { RSymbol } from './r-symbol';
4
+ import type { RArgument } from './r-argument';
5
5
  /**
6
6
  * Calls of functions like `a()` and `foo(42, "hello")`.
7
7
  *
@@ -1,7 +1,7 @@
1
- import { Base, Location, NoInfo } from '../model';
2
- import { RType } from '../type';
3
- import { RParameter } from './r-parameter';
4
- import { RExpressionList } from './r-expression-list';
1
+ import type { Base, Location, NoInfo } from '../model';
2
+ import type { RType } from '../type';
3
+ import type { RParameter } from './r-parameter';
4
+ import type { RExpressionList } from './r-expression-list';
5
5
  export interface RFunctionDefinition<Info = NoInfo> extends Base<Info>, Location {
6
6
  readonly type: RType.FunctionDefinition;
7
7
  /** the R formals, to our knowledge they must be unique */
@@ -1,6 +1,6 @@
1
- import { Base, Location, NoInfo, RNode } from '../model';
2
- import { RType } from '../type';
3
- import { RExpressionList } from './r-expression-list';
1
+ import type { Base, Location, NoInfo, RNode } from '../model';
2
+ import type { RType } from '../type';
3
+ import type { RExpressionList } from './r-expression-list';
4
4
  export interface RIfThenElse<Info = NoInfo> extends Base<Info>, Location {
5
5
  readonly type: RType.IfThenElse;
6
6
  condition: RNode<Info>;
@@ -1,5 +1,5 @@
1
- import { Leaf, Location, NoInfo } from '../model';
2
- import { RType } from '../type';
1
+ import type { Leaf, Location, NoInfo } from '../model';
2
+ import type { RType } from '../type';
3
3
  export interface RLineDirective<Info = NoInfo> extends Location, Leaf<Info> {
4
4
  readonly type: RType.LineDirective;
5
5
  line: number;
@@ -1,5 +1,5 @@
1
- import { Leaf, Location, NoInfo } from '../model';
2
- import { RType } from '../type';
1
+ import type { Leaf, Location, NoInfo } from '../model';
2
+ import type { RType } from '../type';
3
3
  export type RLogicalValue = boolean;
4
4
  export interface RLogical<Info = NoInfo> extends Leaf<Info>, Location {
5
5
  readonly type: RType.Logical;
@@ -1,5 +1,5 @@
1
- import { Leaf, Location, NoInfo } from '../model';
2
- import { RType } from '../type';
1
+ import type { Leaf, Location, NoInfo } from '../model';
2
+ import type { RType } from '../type';
3
3
  export interface RNext<Info = NoInfo> extends Location, Leaf<Info> {
4
4
  readonly type: RType.Next;
5
5
  }
@@ -1,6 +1,6 @@
1
- import { Leaf, Location, NoInfo } from '../model';
2
- import { RType } from '../type';
3
- import { RNumberValue } from '../../../values';
1
+ import type { Leaf, Location, NoInfo } from '../model';
2
+ import type { RType } from '../type';
3
+ import type { RNumberValue } from '../../../values';
4
4
  /** includes numeric, integer, and complex */
5
5
  export interface RNumber<Info = NoInfo> extends Leaf<Info>, Location {
6
6
  readonly type: RType.Number;
@@ -1,6 +1,6 @@
1
- import { Base, Location, NoInfo, RNode } from '../model';
2
- import { RType } from '../type';
3
- import { RSymbol } from './r-symbol';
1
+ import type { Base, Location, NoInfo, RNode } from '../model';
2
+ import type { RType } from '../type';
3
+ import type { RSymbol } from './r-symbol';
4
4
  /**
5
5
  * Represents a parameter of a function definition in R.
6
6
  */
@@ -1,5 +1,5 @@
1
- import { Base, Location, NoInfo, RNode } from '../model';
2
- import { RType } from '../type';
1
+ import type { Base, Location, NoInfo, RNode } from '../model';
2
+ import type { RType } from '../type';
3
3
  export interface RPipe<Info = NoInfo> extends Base<Info>, Location {
4
4
  readonly type: RType.Pipe;
5
5
  readonly lhs: RNode<Info>;
@@ -1,6 +1,6 @@
1
- import { Base, Location, NoInfo } from '../model';
2
- import { RType } from '../type';
3
- import { RExpressionList } from './r-expression-list';
1
+ import type { Base, Location, NoInfo } from '../model';
2
+ import type { RType } from '../type';
3
+ import type { RExpressionList } from './r-expression-list';
4
4
  /**
5
5
  * ```ts
6
6
  * repeat <body>
@@ -1,6 +1,6 @@
1
- import { Leaf, Location, NoInfo } from '../model';
2
- import { RType } from '../type';
3
- import { RStringValue } from '../../../values';
1
+ import type { Leaf, Location, NoInfo } from '../model';
2
+ import type { RType } from '../type';
3
+ import type { RStringValue } from '../../../values';
4
4
  export interface RString<Info = NoInfo> extends Leaf<Info>, Location {
5
5
  readonly type: RType.String;
6
6
  content: RStringValue;