@eagleoutice/flowr 1.3.14 → 1.4.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 (218) hide show
  1. package/abstract-interpretation/domain.d.ts +27 -0
  2. package/abstract-interpretation/domain.js +146 -0
  3. package/abstract-interpretation/handler/binop/binop.d.ts +16 -0
  4. package/abstract-interpretation/handler/binop/binop.js +40 -0
  5. package/abstract-interpretation/handler/binop/operators.d.ts +2 -0
  6. package/abstract-interpretation/handler/binop/operators.js +42 -0
  7. package/abstract-interpretation/handler/handler.d.ts +6 -0
  8. package/abstract-interpretation/handler/handler.js +3 -0
  9. package/abstract-interpretation/processor.d.ts +10 -0
  10. package/abstract-interpretation/processor.js +78 -0
  11. package/benchmark/slicer.d.ts +6 -5
  12. package/benchmark/slicer.js +2 -0
  13. package/benchmark/stats/print.d.ts +1 -1
  14. package/benchmark/stats/stats.d.ts +4 -4
  15. package/benchmark/stats/stats.js +1 -1
  16. package/cli/common/features.d.ts +1 -1
  17. package/cli/common/options.d.ts +1 -1
  18. package/cli/common/script.d.ts +1 -1
  19. package/cli/common/scripts-info.d.ts +2 -2
  20. package/cli/repl/commands/cfg.d.ts +1 -1
  21. package/cli/repl/commands/cfg.js +1 -1
  22. package/cli/repl/commands/commands.d.ts +1 -1
  23. package/cli/repl/commands/dataflow.d.ts +1 -1
  24. package/cli/repl/commands/execute.d.ts +2 -2
  25. package/cli/repl/commands/main.d.ts +2 -2
  26. package/cli/repl/commands/normalize.d.ts +1 -1
  27. package/cli/repl/commands/parse.d.ts +1 -1
  28. package/cli/repl/commands/quit.d.ts +1 -1
  29. package/cli/repl/commands/version.d.ts +1 -1
  30. package/cli/repl/core.d.ts +1 -1
  31. package/cli/repl/execute.d.ts +1 -1
  32. package/cli/repl/server/connection.d.ts +2 -2
  33. package/cli/repl/server/connection.js +3 -2
  34. package/cli/repl/server/messages/analysis.d.ts +3 -3
  35. package/cli/repl/server/messages/analysis.js +12 -32
  36. package/cli/repl/server/messages/error.d.ts +1 -1
  37. package/cli/repl/server/messages/hello.d.ts +2 -2
  38. package/cli/repl/server/messages/messages.d.ts +5 -5
  39. package/cli/repl/server/messages/repl.d.ts +1 -1
  40. package/cli/repl/server/messages/slice.d.ts +3 -3
  41. package/cli/repl/server/net.d.ts +16 -0
  42. package/cli/repl/server/net.js +40 -1
  43. package/cli/repl/server/send.d.ts +2 -2
  44. package/cli/repl/server/server.d.ts +2 -2
  45. package/cli/repl/server/validate.d.ts +3 -3
  46. package/cli/statistics-helper-app.js +2 -2
  47. package/core/input.d.ts +6 -6
  48. package/core/output.d.ts +3 -2
  49. package/core/print/dataflow-printer.d.ts +3 -3
  50. package/core/print/normalize-printer.d.ts +2 -2
  51. package/core/print/parse-printer.d.ts +2 -2
  52. package/core/print/print.d.ts +1 -1
  53. package/core/print/slice-diff-ansi.d.ts +1 -1
  54. package/core/slicer.d.ts +5 -4
  55. package/core/slicer.js +6 -2
  56. package/core/steps.d.ts +22 -4
  57. package/core/steps.js +10 -2
  58. package/dataflow/environments/append.d.ts +1 -1
  59. package/dataflow/environments/environment.d.ts +4 -4
  60. package/dataflow/environments/overwrite.d.ts +1 -1
  61. package/dataflow/environments/register.d.ts +2 -2
  62. package/dataflow/environments/resolve-by-name.d.ts +2 -2
  63. package/dataflow/environments/scoping.d.ts +1 -1
  64. package/dataflow/extractor.d.ts +4 -4
  65. package/dataflow/graph/diff.d.ts +3 -3
  66. package/dataflow/graph/graph.d.ts +8 -7
  67. package/dataflow/graph/quads.d.ts +2 -2
  68. package/dataflow/graph/vertex.d.ts +5 -5
  69. package/dataflow/internal/info.d.ts +2 -2
  70. package/dataflow/internal/linker.d.ts +3 -3
  71. package/dataflow/internal/process/access.d.ts +3 -3
  72. package/dataflow/internal/process/expression-list.d.ts +3 -3
  73. package/dataflow/internal/process/expression-list.js +0 -4
  74. package/dataflow/internal/process/functions/argument.d.ts +4 -4
  75. package/dataflow/internal/process/functions/exit-points.d.ts +1 -1
  76. package/dataflow/internal/process/functions/function-call.d.ts +3 -3
  77. package/dataflow/internal/process/functions/function-definition.d.ts +3 -3
  78. package/dataflow/internal/process/functions/parameter.d.ts +3 -3
  79. package/dataflow/internal/process/if-then-else.d.ts +3 -3
  80. package/dataflow/internal/process/loops/for-loop.d.ts +3 -3
  81. package/dataflow/internal/process/loops/repeat-loop.d.ts +3 -3
  82. package/dataflow/internal/process/loops/while-loop.d.ts +3 -3
  83. package/dataflow/internal/process/operators/assignment.d.ts +3 -3
  84. package/dataflow/internal/process/operators/non-assignment-binary-op.d.ts +3 -3
  85. package/dataflow/internal/process/operators/pipe.d.ts +3 -3
  86. package/dataflow/internal/process/operators/unary-op.d.ts +3 -3
  87. package/dataflow/internal/process/symbol.d.ts +3 -3
  88. package/dataflow/internal/process/uninteresting-leaf.d.ts +2 -2
  89. package/dataflow/processor.d.ts +3 -3
  90. package/flowr.d.ts +3 -2
  91. package/flowr.js +5 -3
  92. package/package.json +11 -2
  93. package/r-bridge/lang-4.x/ast/model/collect.d.ts +2 -2
  94. package/r-bridge/lang-4.x/ast/model/model.d.ts +6 -6
  95. package/r-bridge/lang-4.x/ast/model/nodes/info/index.d.ts +2 -2
  96. package/r-bridge/lang-4.x/ast/model/nodes/info/r-delimiter.d.ts +3 -3
  97. package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +3 -3
  98. package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +3 -3
  99. package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +3 -3
  100. package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +2 -2
  101. package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +2 -2
  102. package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +2 -2
  103. package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +4 -4
  104. package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +4 -4
  105. package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +4 -4
  106. package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +3 -3
  107. package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +2 -2
  108. package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +2 -2
  109. package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +2 -2
  110. package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +3 -3
  111. package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +3 -3
  112. package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +2 -2
  113. package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +3 -3
  114. package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +3 -3
  115. package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +2 -2
  116. package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +3 -3
  117. package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +3 -3
  118. package/r-bridge/lang-4.x/ast/model/operators.d.ts +1 -1
  119. package/r-bridge/lang-4.x/ast/model/processing/decorate.d.ts +2 -2
  120. package/r-bridge/lang-4.x/ast/model/processing/fold.d.ts +3 -3
  121. package/r-bridge/lang-4.x/ast/model/processing/role.d.ts +1 -1
  122. package/r-bridge/lang-4.x/ast/model/processing/stateful-fold.d.ts +3 -3
  123. package/r-bridge/lang-4.x/ast/model/processing/visitor.d.ts +1 -1
  124. package/r-bridge/lang-4.x/ast/parser/xml/config.d.ts +2 -2
  125. package/r-bridge/lang-4.x/ast/parser/xml/data.d.ts +5 -5
  126. package/r-bridge/lang-4.x/ast/parser/xml/hooks.d.ts +5 -5
  127. package/r-bridge/lang-4.x/ast/parser/xml/input-format.d.ts +1 -1
  128. package/r-bridge/lang-4.x/ast/parser/xml/internal/access.d.ts +3 -3
  129. package/r-bridge/lang-4.x/ast/parser/xml/internal/control/if-then-else.d.ts +3 -3
  130. package/r-bridge/lang-4.x/ast/parser/xml/internal/control/if-then.d.ts +3 -3
  131. package/r-bridge/lang-4.x/ast/parser/xml/internal/expression/expression.d.ts +3 -3
  132. package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/argument.d.ts +3 -3
  133. package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/call.d.ts +3 -3
  134. package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/definition.d.ts +3 -3
  135. package/r-bridge/lang-4.x/ast/parser/xml/internal/functions/parameter.d.ts +3 -3
  136. package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/break.d.ts +3 -3
  137. package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/for.d.ts +3 -3
  138. package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/next.d.ts +3 -3
  139. package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/repeat.d.ts +3 -3
  140. package/r-bridge/lang-4.x/ast/parser/xml/internal/loops/while.d.ts +3 -3
  141. package/r-bridge/lang-4.x/ast/parser/xml/internal/meta.d.ts +4 -4
  142. package/r-bridge/lang-4.x/ast/parser/xml/internal/operators/binary.d.ts +3 -3
  143. package/r-bridge/lang-4.x/ast/parser/xml/internal/operators/special.d.ts +1 -1
  144. package/r-bridge/lang-4.x/ast/parser/xml/internal/operators/unary.d.ts +3 -3
  145. package/r-bridge/lang-4.x/ast/parser/xml/internal/other/comment.d.ts +3 -3
  146. package/r-bridge/lang-4.x/ast/parser/xml/internal/other/line-directive.d.ts +3 -3
  147. package/r-bridge/lang-4.x/ast/parser/xml/internal/structure/elements.d.ts +4 -4
  148. package/r-bridge/lang-4.x/ast/parser/xml/internal/structure/root.d.ts +3 -3
  149. package/r-bridge/lang-4.x/ast/parser/xml/internal/structure/single-element.d.ts +4 -4
  150. package/r-bridge/lang-4.x/ast/parser/xml/internal/values/number.d.ts +4 -4
  151. package/r-bridge/lang-4.x/ast/parser/xml/internal/values/string.d.ts +3 -3
  152. package/r-bridge/lang-4.x/ast/parser/xml/internal/values/symbol.d.ts +3 -3
  153. package/r-bridge/lang-4.x/ast/parser/xml/internal/xml-to-json.d.ts +2 -2
  154. package/r-bridge/lang-4.x/ast/parser/xml/parser.d.ts +4 -4
  155. package/r-bridge/retriever.d.ts +2 -2
  156. package/r-bridge/shell-executor.d.ts +25 -0
  157. package/r-bridge/shell-executor.js +119 -0
  158. package/r-bridge/shell.d.ts +8 -5
  159. package/r-bridge/shell.js +6 -3
  160. package/reconstruct/reconstruct.d.ts +1 -1
  161. package/slicing/criterion/collect-all.d.ts +3 -3
  162. package/slicing/criterion/filters/all-variables.d.ts +1 -1
  163. package/slicing/criterion/parse.d.ts +1 -1
  164. package/slicing/static/static-slicer.d.ts +3 -3
  165. package/statistics/features/common-syntax-probability.d.ts +3 -2
  166. package/statistics/features/common-syntax-probability.js +0 -3
  167. package/statistics/features/feature.d.ts +6 -6
  168. package/statistics/features/post-processing.d.ts +2 -2
  169. package/statistics/features/supported/assignments/assignments.d.ts +2 -2
  170. package/statistics/features/supported/assignments/post-process.d.ts +2 -2
  171. package/statistics/features/supported/comments/comments.d.ts +2 -2
  172. package/statistics/features/supported/comments/post-process.d.ts +2 -2
  173. package/statistics/features/supported/control-flow/control-flow.d.ts +2 -2
  174. package/statistics/features/supported/control-flow/post-process.d.ts +2 -2
  175. package/statistics/features/supported/data-access/data-access.d.ts +3 -3
  176. package/statistics/features/supported/data-access/post-process.d.ts +2 -2
  177. package/statistics/features/supported/defined-functions/defined-functions.d.ts +4 -4
  178. package/statistics/features/supported/defined-functions/post-process.d.ts +2 -2
  179. package/statistics/features/supported/expression-list/expression-list.d.ts +2 -2
  180. package/statistics/features/supported/expression-list/post-process.d.ts +2 -2
  181. package/statistics/features/supported/loops/loops.d.ts +2 -2
  182. package/statistics/features/supported/loops/post-process.d.ts +2 -2
  183. package/statistics/features/supported/used-functions/post-process.d.ts +2 -2
  184. package/statistics/features/supported/used-functions/used-functions.d.ts +3 -3
  185. package/statistics/features/supported/used-packages/post-process.d.ts +2 -2
  186. package/statistics/features/supported/used-packages/used-packages.d.ts +2 -2
  187. package/statistics/features/supported/values/post-process.d.ts +2 -2
  188. package/statistics/features/supported/values/values.d.ts +2 -2
  189. package/statistics/features/supported/variables/post-process.d.ts +3 -3
  190. package/statistics/features/supported/variables/variables.d.ts +2 -2
  191. package/statistics/meta-statistics.d.ts +1 -1
  192. package/statistics/output/print-stats.d.ts +2 -2
  193. package/statistics/output/statistics-file.d.ts +1 -1
  194. package/statistics/statistics.d.ts +4 -4
  195. package/util/{cfg.d.ts → cfg/cfg.d.ts} +18 -6
  196. package/util/{cfg.js → cfg/cfg.js} +42 -37
  197. package/util/cfg/visitor.d.ts +14 -0
  198. package/util/cfg/visitor.js +64 -0
  199. package/util/diff.d.ts +1 -1
  200. package/util/files.d.ts +1 -1
  201. package/util/mermaid/ast.d.ts +1 -1
  202. package/util/mermaid/cfg.d.ts +2 -2
  203. package/util/mermaid/dfg.d.ts +3 -3
  204. package/util/objects.d.ts +1 -1
  205. package/util/quads.d.ts +2 -2
  206. package/util/summarizer/benchmark/data.d.ts +1 -1
  207. package/util/summarizer/benchmark/first-phase/process.d.ts +3 -3
  208. package/util/summarizer/benchmark/second-phase/graph.d.ts +1 -1
  209. package/util/summarizer/benchmark/second-phase/process.d.ts +1 -1
  210. package/util/summarizer/benchmark/summarizer.d.ts +3 -2
  211. package/util/summarizer/benchmark/summarizer.js +0 -4
  212. package/util/summarizer/statistics/post-process/clusterer.d.ts +2 -2
  213. package/util/summarizer/statistics/post-process/file-based-count.d.ts +1 -1
  214. package/util/summarizer/statistics/post-process/histogram.d.ts +2 -2
  215. package/util/summarizer/statistics/post-process/post-process-output.d.ts +2 -2
  216. package/util/summarizer/statistics/second-phase/process.d.ts +2 -2
  217. package/util/summarizer/statistics/summarizer.d.ts +3 -2
  218. package/util/summarizer/summarizer.d.ts +1 -1
@@ -1,4 +1,4 @@
1
- import { NoInfo, RNode } from '../model';
1
+ import type { NoInfo, RNode } from '../model';
2
2
  /** Return `true` to stop visiting from this node (i.e., do not continue to visit this node *and* the children) */
3
3
  export type OnEnter<OtherInfo> = (node: RNode<OtherInfo>) => (boolean | void);
4
4
  /** Similar to {@link OnEnter} but called when leaving a node. Can't stop exploration as the subtree is already visited! */
@@ -1,5 +1,5 @@
1
- import { MergeableRecord } from '../../../../../util/objects';
2
- import { TokenMap } from '../../../../retriever';
1
+ import type { MergeableRecord } from '../../../../../util/objects';
2
+ import type { TokenMap } from '../../../../retriever';
3
3
  /**
4
4
  * Configures the settings for the xml parser (like what names should be used to represent the given objects,
5
5
  * and what replacements are active with `xmlparsedata` on the R-side of things).
@@ -1,8 +1,8 @@
1
- import { MergeableRecord } from '../../../../../util/objects';
2
- import { DeepReadonly } from 'ts-essentials';
3
- import { XmlParserConfig } from './config';
4
- import { XmlParserHooks } from './hooks';
5
- import { SourceRange } from '../../../../../util/range';
1
+ import type { MergeableRecord } from '../../../../../util/objects';
2
+ import type { DeepReadonly } from 'ts-essentials';
3
+ import type { XmlParserConfig } from './config';
4
+ import type { XmlParserHooks } from './hooks';
5
+ import type { SourceRange } from '../../../../../util/range';
6
6
  /**
7
7
  * Contains all information populated and present during parsing and normalization of the R AST.
8
8
  */
@@ -1,8 +1,8 @@
1
- import { NamedXmlBasedJson, XmlBasedJson } from './input-format';
2
- import { RNumber, NoInfo, RBinaryOp, RComment, RForLoop, RFunctionCall, RIfThenElse, RNode, RRepeatLoop, RString, RUnaryOp, RWhileLoop, RSymbol, RLogical, BinaryOperatorFlavor, RParameter, RFunctionDefinition, RArgument, UnaryOperatorFlavor, RBreak, RNext, RAccess, RLineDirective, RPipe } from '../../model';
3
- import { RNa } from '../../../values';
4
- import { ParserData } from './data';
5
- import { DeepReadonly, DeepRequired } from 'ts-essentials';
1
+ import type { NamedXmlBasedJson, XmlBasedJson } from './input-format';
2
+ import type { RNumber, NoInfo, RBinaryOp, RComment, RForLoop, RFunctionCall, RIfThenElse, RNode, RRepeatLoop, RString, RUnaryOp, RWhileLoop, RSymbol, RLogical, BinaryOperatorFlavor, RParameter, RFunctionDefinition, RArgument, UnaryOperatorFlavor, RBreak, RNext, RAccess, RLineDirective, RPipe } from '../../model';
3
+ import type { RNa } from '../../../values';
4
+ import type { ParserData } from './data';
5
+ import type { DeepReadonly, DeepRequired } from 'ts-essentials';
6
6
  /** Denotes that if you return `undefined`, the parser will automatically take the original arguments (unchanged) */
7
7
  type AutoIfOmit<T> = T | undefined | void;
8
8
  /**
@@ -1,4 +1,4 @@
1
- import { RawRType } from '../../model';
1
+ import type { RawRType } from '../../model';
2
2
  /**
3
3
  * Thrown if the given input xml is not valid/contains unexpected elements.
4
4
  */
@@ -1,6 +1,6 @@
1
- import { NamedXmlBasedJson } from '../input-format';
2
- import { ParserData } from '../data';
3
- import { RAccess } from '../../../model';
1
+ import type { NamedXmlBasedJson } from '../input-format';
2
+ import type { ParserData } from '../data';
3
+ import type { RAccess } from '../../../model';
4
4
  /**
5
5
  * Tries to normalize the given data as access (e.g., indexing).
6
6
  *
@@ -1,6 +1,6 @@
1
- import { NamedXmlBasedJson } from '../../input-format';
2
- import { ParserData } from '../../data';
3
- import { RIfThenElse } from '../../../../model';
1
+ import type { NamedXmlBasedJson } from '../../input-format';
2
+ import type { ParserData } from '../../data';
3
+ import type { RIfThenElse } from '../../../../model';
4
4
  /**
5
5
  * Try to parse the construct as a {@link RIfThenElse}.
6
6
  */
@@ -1,6 +1,6 @@
1
- import { NamedXmlBasedJson } from '../../input-format';
2
- import { ParserData } from '../../data';
3
- import { RIfThenElse } from '../../../../model';
1
+ import type { NamedXmlBasedJson } from '../../input-format';
2
+ import type { ParserData } from '../../data';
3
+ import type { RIfThenElse } from '../../../../model';
4
4
  /**
5
5
  * Try to parse the construct as a {@link RIfThenElse}.
6
6
  */
@@ -1,6 +1,6 @@
1
- import { XmlBasedJson } from '../../input-format';
2
- import { ParserData } from '../../data';
3
- import { RNode } from '../../../../model';
1
+ import type { XmlBasedJson } from '../../input-format';
2
+ import type { ParserData } from '../../data';
3
+ import type { RNode } from '../../../../model';
4
4
  /**
5
5
  * Returns an expression list if there are multiple children, otherwise returns the single child directly with no expr wrapper
6
6
  *
@@ -1,6 +1,6 @@
1
- import { NamedXmlBasedJson } from '../../input-format';
2
- import { RArgument } from '../../../../model';
3
- import { ParserData } from '../../data';
1
+ import type { NamedXmlBasedJson } from '../../input-format';
2
+ import type { RArgument } from '../../../../model';
3
+ import type { ParserData } from '../../data';
4
4
  /**
5
5
  * Either parses `[expr]` or `[SYMBOL_SUB, EQ_SUB, expr]` as an argument of a function call in R.
6
6
  * Probably directly called by the function call parser as otherwise, we do not expect to find arguments.
@@ -1,6 +1,6 @@
1
- import { NamedXmlBasedJson } from '../../input-format';
2
- import { ParserData } from '../../data';
3
- import { RFunctionCall, RNext, RBreak } from '../../../../model';
1
+ import type { NamedXmlBasedJson } from '../../input-format';
2
+ import type { ParserData } from '../../data';
3
+ import type { RFunctionCall, RNext, RBreak } from '../../../../model';
4
4
  /**
5
5
  * Tries to parse the given data as a function call.
6
6
  *
@@ -1,6 +1,6 @@
1
- import { ParserData } from '../../data';
2
- import { NamedXmlBasedJson } from '../../input-format';
3
- import { RFunctionDefinition } from '../../../../model';
1
+ import type { ParserData } from '../../data';
2
+ import type { NamedXmlBasedJson } from '../../input-format';
3
+ import type { RFunctionDefinition } from '../../../../model';
4
4
  /**
5
5
  * Tries to parse the given data as a function definition.
6
6
  *
@@ -1,6 +1,6 @@
1
- import { NamedXmlBasedJson } from '../../input-format';
2
- import { RParameter } from '../../../../model';
3
- import { ParserData } from '../../data';
1
+ import type { NamedXmlBasedJson } from '../../input-format';
2
+ import type { RParameter } from '../../../../model';
3
+ import type { ParserData } from '../../data';
4
4
  /**
5
5
  * Either parses `[SYMBOL_FORMALS]` or `[SYMBOL_FORMALS, EQ_FORMALS, expr]` as a parameter of a function definition in R.
6
6
  * Probably directly called by the function definition parser as otherwise, we do not expect to find parameters.
@@ -1,4 +1,4 @@
1
- import { ParserData } from '../../data';
2
- import { XmlBasedJson } from '../../input-format';
3
- import { RBreak } from '../../../../model';
1
+ import type { ParserData } from '../../data';
2
+ import type { XmlBasedJson } from '../../input-format';
3
+ import type { RBreak } from '../../../../model';
4
4
  export declare function normalizeBreak(data: ParserData, obj: XmlBasedJson): RBreak;
@@ -1,4 +1,4 @@
1
- import { NamedXmlBasedJson } from '../../input-format';
2
- import { ParserData } from '../../data';
3
- import { RForLoop } from '../../../../model';
1
+ import type { NamedXmlBasedJson } from '../../input-format';
2
+ import type { ParserData } from '../../data';
3
+ import type { RForLoop } from '../../../../model';
4
4
  export declare function tryNormalizeFor(data: ParserData, forToken: NamedXmlBasedJson, head: NamedXmlBasedJson, body: NamedXmlBasedJson): RForLoop | undefined;
@@ -1,4 +1,4 @@
1
- import { ParserData } from '../../data';
2
- import { XmlBasedJson } from '../../input-format';
3
- import { RNext } from '../../../../model';
1
+ import type { ParserData } from '../../data';
2
+ import type { XmlBasedJson } from '../../input-format';
3
+ import type { RNext } from '../../../../model';
4
4
  export declare function normalizeNext(data: ParserData, obj: XmlBasedJson): RNext;
@@ -1,6 +1,6 @@
1
- import { NamedXmlBasedJson } from '../../input-format';
2
- import { ParserData } from '../../data';
3
- import { RRepeatLoop } from '../../../../model';
1
+ import type { NamedXmlBasedJson } from '../../input-format';
2
+ import type { ParserData } from '../../data';
3
+ import type { RRepeatLoop } from '../../../../model';
4
4
  /**
5
5
  * Try to parse the construct as a {@link RRepeatLoop}.
6
6
  *
@@ -1,4 +1,4 @@
1
- import { NamedXmlBasedJson } from '../../input-format';
2
- import { ParserData } from '../../data';
3
- import { RWhileLoop } from '../../../../model';
1
+ import type { NamedXmlBasedJson } from '../../input-format';
2
+ import type { ParserData } from '../../data';
3
+ import type { RWhileLoop } from '../../../../model';
4
4
  export declare function tryNormalizeWhile(data: ParserData, whileToken: NamedXmlBasedJson, leftParen: NamedXmlBasedJson, condition: NamedXmlBasedJson, rightParen: NamedXmlBasedJson, body: NamedXmlBasedJson): RWhileLoop | undefined;
@@ -1,7 +1,7 @@
1
- import { NamedXmlBasedJson, XmlBasedJson } from '../input-format';
2
- import { SourceRange } from '../../../../../../util/range';
3
- import { XmlParserConfig } from '../config';
4
- import { RawRType, RExpressionList, RNode } from '../../../model';
1
+ import type { NamedXmlBasedJson, XmlBasedJson } from '../input-format';
2
+ import type { SourceRange } from '../../../../../../util/range';
3
+ import type { XmlParserConfig } from '../config';
4
+ import type { RawRType, RExpressionList, RNode } from '../../../model';
5
5
  /**
6
6
  * if the passed object is an array with only one element, remove the array wrapper
7
7
  */
@@ -1,6 +1,6 @@
1
- import { NamedXmlBasedJson } from '../../input-format';
2
- import { ParserData } from '../../data';
3
- import { RNode } from '../../../../model';
1
+ import type { NamedXmlBasedJson } from '../../input-format';
2
+ import type { ParserData } from '../../data';
3
+ import type { RNode } from '../../../../model';
4
4
  /**
5
5
  * Parsing binary operations includes the pipe, even though the produced PIPE construct is not a binary operation,
6
6
  * to ensure it is handled separately from the others (especially in the combination of a pipe bind)
@@ -1,4 +1,4 @@
1
- import { BinaryOperatorFlavor } from '../../../../model';
1
+ import type { BinaryOperatorFlavor } from '../../../../model';
2
2
  /**
3
3
  * Identify the flavor of a given operator, as we do not really have a use for "special"
4
4
  * operators within our internal AST.
@@ -1,6 +1,6 @@
1
- import { NamedXmlBasedJson } from '../../input-format';
2
- import { ParserData } from '../../data';
3
- import { RNode } from '../../../../model';
1
+ import type { NamedXmlBasedJson } from '../../input-format';
2
+ import type { ParserData } from '../../data';
3
+ import type { RNode } from '../../../../model';
4
4
  /**
5
5
  * Parses the construct as a {@link RUnaryOp} (automatically identifies the flavor).
6
6
  *
@@ -1,6 +1,6 @@
1
- import { XmlBasedJson } from '../../input-format';
2
- import { RComment } from '../../../../model';
3
- import { ParserData } from '../../data';
1
+ import type { XmlBasedJson } from '../../input-format';
2
+ import type { RComment } from '../../../../model';
3
+ import type { ParserData } from '../../data';
4
4
  /**
5
5
  * Normalize the given object as an R comment.
6
6
  * This requires you to check the corresponding name beforehand.
@@ -1,6 +1,6 @@
1
- import { XmlBasedJson } from '../../input-format';
2
- import { RComment, RLineDirective } from '../../../../model';
3
- import { ParserData } from '../../data';
1
+ import type { XmlBasedJson } from '../../input-format';
2
+ import type { RComment, RLineDirective } from '../../../../model';
3
+ import type { ParserData } from '../../data';
4
4
  /**
5
5
  * Normalize the given object as an R line directive (`#line <number> "<file>"`).
6
6
  * This requires you to check the corresponding name beforehand.
@@ -1,7 +1,7 @@
1
- import { NamedXmlBasedJson, XmlBasedJson } from '../../input-format';
2
- import { ParserData } from '../../data';
3
- import { RNode } from '../../../../model';
4
- import { RDelimiter } from '../../../../model/nodes/info';
1
+ import type { NamedXmlBasedJson, XmlBasedJson } from '../../input-format';
2
+ import type { ParserData } from '../../data';
3
+ import type { RNode } from '../../../../model';
4
+ import type { RDelimiter } from '../../../../model/nodes/info';
5
5
  export declare function splitComments(mappedWithName: NamedXmlBasedJson[]): {
6
6
  comments: NamedXmlBasedJson[];
7
7
  others: NamedXmlBasedJson[];
@@ -1,4 +1,4 @@
1
- import { XmlBasedJson } from '../../input-format';
2
- import { ParserData } from '../../data';
3
- import { RExpressionList } from '../../../../model';
1
+ import type { XmlBasedJson } from '../../input-format';
2
+ import type { ParserData } from '../../data';
3
+ import type { RExpressionList } from '../../../../model';
4
4
  export declare function parseRootObjToAst(data: ParserData, obj: XmlBasedJson): RExpressionList;
@@ -1,7 +1,7 @@
1
- import { NamedXmlBasedJson } from '../../input-format';
2
- import { ParserData } from '../../data';
3
- import { RNode } from '../../../../model';
4
- import { RDelimiter } from '../../../../model/nodes/info';
1
+ import type { NamedXmlBasedJson } from '../../input-format';
2
+ import type { ParserData } from '../../data';
3
+ import type { RNode } from '../../../../model';
4
+ import type { RDelimiter } from '../../../../model/nodes/info';
5
5
  /**
6
6
  * Parses a single structure in the ast based on its type (e.g., a string, a number, a symbol, ...)
7
7
  *
@@ -1,7 +1,7 @@
1
- import { XmlBasedJson } from '../../input-format';
2
- import { RNa } from '../../../../../values';
3
- import { RLogical, RSymbol, NoInfo, RNumber } from '../../../../model';
4
- import { ParserData } from '../../data';
1
+ import type { XmlBasedJson } from '../../input-format';
2
+ import type { RNa } from '../../../../../values';
3
+ import type { RLogical, RSymbol, NoInfo, RNumber } from '../../../../model';
4
+ import type { ParserData } from '../../data';
5
5
  /**
6
6
  * Normalize the given object as a R number (see {@link number2ts}), supporting booleans (see {@link boolean2ts}),
7
7
  * and special values.
@@ -1,6 +1,6 @@
1
- import { XmlBasedJson } from '../../input-format';
2
- import { RString } from '../../../../model';
3
- import { ParserData } from '../../data';
1
+ import type { XmlBasedJson } from '../../input-format';
2
+ import type { RString } from '../../../../model';
3
+ import type { ParserData } from '../../data';
4
4
  /**
5
5
  * Normalize the given object as a R string (see {@link string2ts}).
6
6
  * This requires you to check the corresponding name beforehand.
@@ -1,6 +1,6 @@
1
- import { NamedXmlBasedJson } from '../../input-format';
2
- import { RSymbol } from '../../../../model';
3
- import { ParserData } from '../../data';
1
+ import type { NamedXmlBasedJson } from '../../input-format';
2
+ import type { RSymbol } from '../../../../model';
3
+ import type { ParserData } from '../../data';
4
4
  /**
5
5
  * Normalize the given object as an R symbol (incorporating namespace information).
6
6
  * <p>
@@ -1,5 +1,5 @@
1
- import { XmlParserConfig } from '../config';
2
- import { XmlBasedJson } from '../input-format';
1
+ import type { XmlParserConfig } from '../config';
2
+ import type { XmlBasedJson } from '../input-format';
3
3
  /**
4
4
  * Parse the xml presented by R into a json object that will be used for conversion
5
5
  *
@@ -1,7 +1,7 @@
1
- import { NormalizedAst, IdGenerator, NoInfo } from '../../model';
2
- import { XmlParserHooks } from './hooks';
3
- import { DeepPartial } from 'ts-essentials';
4
- import { TokenMap } from '../../../../retriever';
1
+ import type { NormalizedAst, IdGenerator, NoInfo } from '../../model';
2
+ import type { XmlParserHooks } from './hooks';
3
+ import type { DeepPartial } from 'ts-essentials';
4
+ import type { TokenMap } from '../../../../retriever';
5
5
  export declare const parseLog: import("tslog").Logger<import("tslog").ILogObj>;
6
6
  /**
7
7
  * The main entry point to normalize the given R ast.
@@ -1,6 +1,6 @@
1
1
  import { type RShell } from './shell';
2
- import { XmlParserHooks, NormalizedAst } from './lang-4.x';
3
- import { DeepPartial, DeepReadonly } from 'ts-essentials';
2
+ import type { XmlParserHooks, NormalizedAst } from './lang-4.x';
3
+ import type { DeepPartial, DeepReadonly } from 'ts-essentials';
4
4
  export interface RParseRequestFromFile {
5
5
  request: 'file';
6
6
  /** The path to the file (absolute paths are probably best here */
@@ -0,0 +1,25 @@
1
+ import type { RShellExecutionOptions } from './shell';
2
+ import type { SemVer } from 'semver';
3
+ import type { TokenMap } from './retriever';
4
+ export declare class RShellExecutor {
5
+ readonly options: Readonly<RShellExecutionOptions>;
6
+ private readonly log;
7
+ private readonly prerequisites;
8
+ constructor(options?: Partial<RShellExecutionOptions>);
9
+ continueOnError(): RShellExecutor;
10
+ injectLibPaths(...paths: string[]): RShellExecutor;
11
+ tryToInjectHomeLibPath(): RShellExecutor;
12
+ addPrerequisites(commands: string | string[]): RShellExecutor;
13
+ usedRVersion(): SemVer | null;
14
+ allInstalledPackages(): string[];
15
+ isPackageInstalled(packageName: string): boolean;
16
+ ensurePackageInstalled(packageName: string, autoload?: boolean, force?: boolean): {
17
+ packageName: string;
18
+ packageExistedAlready: boolean;
19
+ /** the temporary directory used for the installation, undefined if none was used */
20
+ libraryLocation?: string;
21
+ };
22
+ obtainTempDir(): string;
23
+ getTokenMap(): TokenMap;
24
+ run(commands: string | string[], returnErr?: boolean): string;
25
+ }
@@ -0,0 +1,119 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.RShellExecutor = void 0;
7
+ const shell_1 = require("./shell");
8
+ const objects_1 = require("../util/objects");
9
+ const child_process_1 = require("child_process");
10
+ const lang_4_x_1 = require("./lang-4.x");
11
+ const preload_1 = __importDefault(require("semver/preload"));
12
+ const log_1 = require("../util/log");
13
+ const fs_1 = __importDefault(require("fs"));
14
+ const retriever_1 = require("./retriever");
15
+ class RShellExecutor {
16
+ options;
17
+ log;
18
+ prerequisites = [];
19
+ constructor(options) {
20
+ this.options = (0, objects_1.deepMergeObject)(shell_1.DEFAULT_R_SHELL_OPTIONS, options);
21
+ this.log = log_1.log.getSubLogger({ name: 'RShellExecutor' });
22
+ }
23
+ continueOnError() {
24
+ this.log.info('continue in case of Errors');
25
+ this.addPrerequisites('options(error=function() {})');
26
+ return this;
27
+ }
28
+ injectLibPaths(...paths) {
29
+ this.log.debug(`injecting lib paths ${JSON.stringify(paths)}`);
30
+ this.addPrerequisites(`.libPaths(c(.libPaths(), ${paths.map(lang_4_x_1.ts2r).join(',')}))`);
31
+ return this;
32
+ }
33
+ tryToInjectHomeLibPath() {
34
+ if (this.options.homeLibPath === undefined) {
35
+ this.log.debug('ensuring home lib path exists (automatic inject)');
36
+ this.addPrerequisites([
37
+ 'if(!dir.exists(Sys.getenv("R_LIBS_USER"))) { dir.create(path=Sys.getenv("R_LIBS_USER"),showWarnings=FALSE,recursive=TRUE) }',
38
+ '.libPaths(c(.libPaths(), Sys.getenv("R_LIBS_USER")))'
39
+ ]);
40
+ }
41
+ else {
42
+ this.injectLibPaths(this.options.homeLibPath);
43
+ }
44
+ return this;
45
+ }
46
+ addPrerequisites(commands) {
47
+ this.prerequisites.push(...(typeof commands == 'string' ? [commands] : commands));
48
+ return this;
49
+ }
50
+ usedRVersion() {
51
+ const version = this.run(`cat(paste0(R.version$major,".",R.version$minor), ${(0, lang_4_x_1.ts2r)(this.options.eol)})`);
52
+ this.log.trace(`raw version: ${JSON.stringify(version)}`);
53
+ return preload_1.default.coerce(version);
54
+ }
55
+ allInstalledPackages() {
56
+ this.log.debug('getting all installed packages');
57
+ const packages = this.run(`cat(paste0(installed.packages()[,1], collapse=","),"${this.options.eol}")`);
58
+ return packages.split(',');
59
+ }
60
+ isPackageInstalled(packageName) {
61
+ this.log.debug(`checking if package "${packageName}" is installed`);
62
+ return this.run(`cat(system.file(package="${packageName}")!="","${this.options.eol}")`) === 'TRUE';
63
+ }
64
+ ensurePackageInstalled(packageName, autoload = false, force = false) {
65
+ const packageExistedAlready = this.isPackageInstalled(packageName);
66
+ if (!force && packageExistedAlready) {
67
+ this.log.info(`package "${packageName}" is already installed`);
68
+ if (autoload)
69
+ this.addPrerequisites(`library(${(0, lang_4_x_1.ts2r)(packageName)})`);
70
+ return { packageName, packageExistedAlready };
71
+ }
72
+ const tempDir = this.obtainTempDir();
73
+ this.log.debug(`using temporary directory: "${tempDir}" to install package "${packageName}"`);
74
+ this.run(`install.packages(${(0, lang_4_x_1.ts2r)(packageName)},repos="https://cloud.r-project.org/",quiet=FALSE,lib=temp)`);
75
+ if (autoload)
76
+ this.addPrerequisites(`library(${(0, lang_4_x_1.ts2r)(packageName)},lib.loc=temp)`);
77
+ return { packageName, packageExistedAlready, libraryLocation: tempDir };
78
+ }
79
+ obtainTempDir() {
80
+ const tempDir = this.run([
81
+ 'temp <- tempdir()',
82
+ `cat(temp, ${(0, lang_4_x_1.ts2r)(this.options.eol)})`
83
+ ]);
84
+ log_1.log.info(`obtained temp dir ${tempDir}`);
85
+ const deleteOnExit = function () {
86
+ if (fs_1.default.existsSync(tempDir)) {
87
+ log_1.log.info(`deleting temp dir ${tempDir}`);
88
+ fs_1.default.rmSync(tempDir, { recursive: true, force: true });
89
+ }
90
+ };
91
+ process.on('SIGINT', deleteOnExit);
92
+ process.on('SIGTERM', deleteOnExit);
93
+ return tempDir;
94
+ }
95
+ getTokenMap() {
96
+ this.ensurePackageInstalled('xmlparsedata', true);
97
+ // we invert the token map to get a mapping back from the replacement
98
+ const parsed = (0, lang_4_x_1.parseCSV)(this.run('write.table(xmlparsedata::xml_parse_token_map,sep=",",col.names=FALSE)').split('\n'));
99
+ if (parsed.some(s => s.length !== 2))
100
+ throw new Error(`Expected two columns in token map, but got ${JSON.stringify(parsed)}`);
101
+ // we swap key and value to get the other direction, furthermore we remove quotes from keys if they are quoted
102
+ const ret = {};
103
+ for (const [key, value] of parsed)
104
+ ret[value] = (0, retriever_1.removeTokenMapQuotationMarks)(key);
105
+ return ret;
106
+ }
107
+ run(commands, returnErr = false) {
108
+ this.log.trace(`> ${JSON.stringify(commands)}`);
109
+ const returns = (0, child_process_1.spawnSync)(this.options.pathToRExecutable, this.options.commandLineOptions, {
110
+ env: this.options.env,
111
+ cwd: this.options.cwd,
112
+ encoding: 'utf8',
113
+ input: [...this.prerequisites, commands].join(this.options.eol)
114
+ });
115
+ return (returnErr ? returns.stderr : returns.stdout).trim();
116
+ }
117
+ }
118
+ exports.RShellExecutor = RShellExecutor;
119
+ //# sourceMappingURL=shell-executor.js.map
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  import { type MergeableRecord } from '../util/objects';
3
- import { SemVer } from 'semver';
4
- import { TokenMap } from './retriever';
3
+ import type { SemVer } from 'semver';
4
+ import type { TokenMap } from './retriever';
5
5
  export type OutputStreamSelector = 'stdout' | 'stderr' | 'both';
6
6
  export interface CollectorTimeout extends MergeableRecord {
7
7
  /**
@@ -33,7 +33,7 @@ export interface OutputCollectorConfiguration extends MergeableRecord {
33
33
  automaticallyTrimOutput: boolean;
34
34
  }
35
35
  export declare const DEFAULT_OUTPUT_COLLECTOR_CONFIGURATION: OutputCollectorConfiguration;
36
- export interface RShellSessionOptions extends MergeableRecord {
36
+ export interface RShellExecutionOptions extends MergeableRecord {
37
37
  /** The path to the R executable, can be only the executable if it is to be found on the PATH. */
38
38
  readonly pathToRExecutable: string;
39
39
  /** Command line options to use when starting the R session. */
@@ -44,12 +44,14 @@ export interface RShellSessionOptions extends MergeableRecord {
44
44
  readonly eol: string;
45
45
  /** The environment variables available in the R session. */
46
46
  readonly env: NodeJS.ProcessEnv;
47
+ /** The path to the library directory, use undefined to let R figure that out for itself */
48
+ readonly homeLibPath: string | undefined;
49
+ }
50
+ export interface RShellSessionOptions extends RShellExecutionOptions {
47
51
  /** If set, the R session will be restarted if it exits due to an error */
48
52
  readonly revive: 'never' | 'on-error' | 'always';
49
53
  /** Called when the R session is restarted, this makes only sense if `revive` is not set to `'never'` */
50
54
  readonly onRevive: (code: number, signal: string | null) => void;
51
- /** The path to the library directory, use undefined to let R figure that out for itself */
52
- readonly homeLibPath: string | undefined;
53
55
  }
54
56
  /**
55
57
  * Configuration of an {@link RShell} instance.
@@ -58,6 +60,7 @@ export interface RShellSessionOptions extends MergeableRecord {
58
60
  export interface RShellOptions extends RShellSessionOptions {
59
61
  readonly sessionName: string;
60
62
  }
63
+ export declare const DEFAULT_R_SHELL_EXEC_OPTIONS: RShellExecutionOptions;
61
64
  export declare const DEFAULT_R_SHELL_OPTIONS: RShellOptions;
62
65
  /**
63
66
  * The `RShell` represents an interactive session with the R interpreter.
package/r-bridge/shell.js CHANGED
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.RShell = exports.DEFAULT_R_SHELL_OPTIONS = exports.DEFAULT_OUTPUT_COLLECTOR_CONFIGURATION = void 0;
29
+ exports.RShell = exports.DEFAULT_R_SHELL_OPTIONS = exports.DEFAULT_R_SHELL_EXEC_OPTIONS = exports.DEFAULT_OUTPUT_COLLECTOR_CONFIGURATION = void 0;
30
30
  const child_process_1 = require("child_process");
31
31
  const objects_1 = require("../util/objects");
32
32
  const readline = __importStar(require("node:readline"));
@@ -47,14 +47,17 @@ exports.DEFAULT_OUTPUT_COLLECTOR_CONFIGURATION = {
47
47
  automaticallyTrimOutput: true,
48
48
  errorStopsWaiting: true
49
49
  };
50
- exports.DEFAULT_R_SHELL_OPTIONS = {
51
- sessionName: 'default',
50
+ exports.DEFAULT_R_SHELL_EXEC_OPTIONS = {
52
51
  pathToRExecutable: (0, os_1.getPlatform)() === 'windows' ? 'R.exe' : 'R',
53
52
  commandLineOptions: ['--vanilla', '--quiet', '--no-echo', '--no-save'],
54
53
  cwd: process.cwd(),
55
54
  env: process.env,
56
55
  eol: '\n',
57
56
  homeLibPath: (0, os_1.getPlatform)() === 'windows' ? undefined : '~/.r-libs',
57
+ };
58
+ exports.DEFAULT_R_SHELL_OPTIONS = {
59
+ ...exports.DEFAULT_R_SHELL_EXEC_OPTIONS,
60
+ sessionName: 'default',
58
61
  revive: 'never',
59
62
  onRevive: () => { }
60
63
  };
@@ -3,7 +3,7 @@
3
3
  * as the file itself is way too long). See {@link reconstructToCode}.
4
4
  * @module
5
5
  */
6
- import { NormalizedAst, NodeId, ParentInformation, RNode } from '../r-bridge';
6
+ import type { NormalizedAst, NodeId, ParentInformation, RNode } from '../r-bridge';
7
7
  type Selection = Set<NodeId>;
8
8
  export declare const reconstructLogger: import("tslog").Logger<import("tslog").ILogObj>;
9
9
  /** The structure of the predicate that should be used to determine if a given normalized node should be included in the reconstructed code independent of if it is selected by the slice or not */
@@ -3,9 +3,9 @@
3
3
  * This module provides a function to collect all slicing criteria.
4
4
  * @module
5
5
  */
6
- import { MergeableRecord } from '../../util/objects';
7
- import { NodeId, RNodeWithParent } from '../../r-bridge';
8
- import { SlicingCriteria } from './parse';
6
+ import type { MergeableRecord } from '../../util/objects';
7
+ import type { NodeId, RNodeWithParent } from '../../r-bridge';
8
+ import type { SlicingCriteria } from './parse';
9
9
  /**
10
10
  * Defines the filter for collecting all possible slicing criteria.
11
11
  * @see DefaultAllVariablesFilter
@@ -1,2 +1,2 @@
1
- import { SlicingCriteriaFilter } from '../collect-all';
1
+ import type { SlicingCriteriaFilter } from '../collect-all';
2
2
  export declare const DefaultAllVariablesFilter: SlicingCriteriaFilter;
@@ -1,4 +1,4 @@
1
- import { NormalizedAst, NodeId, NoInfo, ParentInformation } from '../../r-bridge';
1
+ import type { NormalizedAst, NodeId, NoInfo, ParentInformation } from '../../r-bridge';
2
2
  /** Either `line:column`, `line@variable-name`, or `$id` */
3
3
  export type SingleSlicingCriterion = `${number}:${number}` | `${number}@${string}` | `$${number}`;
4
4
  export type SlicingCriteria = SingleSlicingCriterion[];