@eagleoutice/flowr 2.17.12 → 2.17.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -15
- package/cli/repl/core.js +9 -27
- package/config.d.ts +1 -0
- package/config.js +4 -2
- package/data/r-datasets.generated.js +2 -2
- package/dataflow/environments/ambient-effect.d.ts +4 -0
- package/dataflow/environments/ambient-effect.js +5 -4
- package/dataflow/environments/ambient-state-name.d.ts +2 -2
- package/dataflow/environments/ambient-state-name.js +3 -3
- package/dataflow/environments/built-in-props.d.ts +5 -0
- package/dataflow/environments/default-builtin-config/base-functions.d.ts +1 -1
- package/dataflow/environments/default-builtin-config/base-functions.js +6 -2
- package/dataflow/environments/default-builtin-config/base-language.d.ts +12 -1
- package/dataflow/environments/default-builtin-config/base-language.js +3 -2
- package/dataflow/environments/default-builtin-config/guards.js +3 -1
- package/dataflow/environments/default-builtin-config/index.d.ts +12 -2
- package/dataflow/environments/default-builtin-config/misc-packages.d.ts +1 -1
- package/dataflow/environments/default-builtin-config/misc-packages.js +2 -0
- package/dataflow/environments/default-builtin-config/shared-configs.d.ts +24 -0
- package/dataflow/environments/default-builtin-config/shared-configs.js +8 -6
- package/dataflow/environments/pkg-name.d.ts +1 -0
- package/dataflow/eval/resolve/alias-tracking.js +11 -12
- package/dataflow/extractor.js +58 -0
- package/dataflow/fn/guards/built-in-guards.js +4 -4
- package/dataflow/fn/guards/call-contracts.js +8 -8
- package/dataflow/fn/guards/condition-grouping.js +4 -3
- package/dataflow/fn/guards/function-guards.js +103 -97
- package/dataflow/fn/guards/group-method-guards.js +10 -8
- package/dataflow/fn/guards/guard-claims.js +152 -128
- package/dataflow/fn/guards/guard-knowledge.js +19 -18
- package/dataflow/fn/guards/guard-term-syntax.js +13 -12
- package/dataflow/fn/guards/guard-term.d.ts +71 -0
- package/dataflow/fn/guards/guard-term.js +183 -75
- package/dataflow/graph/df-helper.d.ts +6 -6
- package/dataflow/graph/df-helper.js +1 -1
- package/dataflow/graph/graph.d.ts +9 -0
- package/dataflow/graph/graph.js +19 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-ambient-state.js +18 -14
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +29 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-attach.js +2 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.d.ts +6 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-envir-utils.js +9 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.d.ts +12 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +24 -6
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +10 -10
- package/dataflow/internal/process/functions/call/built-in/built-in-load.js +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-local.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-source.js +19 -9
- package/dataflow/internal/process/functions/call/built-in/built-in-with.js +35 -3
- package/documentation/doc-readme.js +1 -2
- package/documentation/doc-util/doc-query.d.ts +1 -1
- package/documentation/doc-util/doc-query.js +4 -2
- package/documentation/wiki-interface.js +1 -0
- package/documentation/wiki-linter.d.ts +2 -0
- package/documentation/wiki-linter.js +7 -1
- package/documentation/wiki-query.js +28 -0
- package/linter/linter-format.d.ts +5 -1
- package/linter/linter-format.js +4 -0
- package/linter/linter-output.js +18 -16
- package/linter/linter-rules.d.ts +50 -0
- package/linter/linter-rules.js +5 -1
- package/linter/rules/notebook-cell-order.d.ts +43 -0
- package/linter/rules/notebook-cell-order.js +97 -0
- package/linter/rules/project-entry-point.d.ts +53 -0
- package/linter/rules/project-entry-point.js +62 -0
- package/linter/rules/undefined-symbol.d.ts +2 -0
- package/linter/rules/undefined-symbol.js +6 -1
- package/notebook/cell-graph.d.ts +23 -0
- package/notebook/cell-graph.js +48 -0
- package/notebook/cell-order-mermaid.d.ts +16 -0
- package/notebook/cell-order-mermaid.js +51 -0
- package/notebook/cell-order.d.ts +270 -0
- package/notebook/cell-order.js +1452 -0
- package/notebook/cell-split.d.ts +27 -0
- package/notebook/cell-split.js +99 -0
- package/package.json +1 -1
- package/project/context/flowr-analyzer-dependencies-context.d.ts +4 -0
- package/project/context/flowr-analyzer-files-context.d.ts +2 -0
- package/project/flowr-analyzer.js +5 -1
- package/project/plugins/file-plugins/files/cell-runner.d.ts +22 -0
- package/project/plugins/file-plugins/files/cell-runner.js +32 -0
- package/project/plugins/file-plugins/files/flowr-jupyter-file.d.ts +4 -0
- package/project/plugins/file-plugins/files/flowr-jupyter-file.js +22 -6
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.d.ts +22 -0
- package/project/plugins/file-plugins/files/flowr-rmarkdown-file.js +63 -7
- package/project/plugins/file-plugins/files/flowr-rsession-file.d.ts +2 -0
- package/project/plugins/file-plugins/files/flowr-rsession-file.js +2 -0
- package/project/plugins/file-plugins/files/flowr-sweave-file.d.ts +3 -5
- package/project/plugins/file-plugins/files/flowr-sweave-file.js +6 -0
- package/project/plugins/file-plugins/files/recorded-runs.d.ts +2 -0
- package/queries/catalog/aliases-query/aliases-query-executor.d.ts +6 -0
- package/queries/catalog/aliases-query/aliases-query-executor.js +108 -0
- package/queries/catalog/aliases-query/aliases-query-format.d.ts +21 -0
- package/queries/catalog/aliases-query/aliases-query-format.js +34 -0
- package/queries/catalog/cell-order-query/cell-order-query-format.d.ts +81 -0
- package/queries/catalog/cell-order-query/cell-order-query-format.js +82 -0
- package/queries/catalog/linter-query/linter-query-format.js +2 -1
- package/queries/query.d.ts +17 -2
- package/queries/query.js +6 -2
- package/queries/virtual-query/compound-query.d.ts +1 -1
- package/util/flowr-version.d.ts +1 -1
- package/util/flowr-version.js +2 -2
- package/util/mermaid/ast.js +4 -11
- package/util/mermaid/cfg.js +1 -2
- package/util/mermaid/dfg.d.ts +5 -0
- package/util/mermaid/dfg.js +23 -4
- package/util/mermaid/mermaid.d.ts +5 -0
- package/util/mermaid/mermaid.js +8 -0
- package/util/r-datasets.d.ts +2 -0
- package/util/r-datasets.js +3 -0
- package/util/text/playground-link.d.ts +2 -2
- package/util/text/playground-link.js +2 -2
|
@@ -13,9 +13,9 @@ function withoutFrame(term) {
|
|
|
13
13
|
if (!OfTheFrame.values().some(fn => guard_term_1.GuardTerm.mentions(term, fn))) {
|
|
14
14
|
return term;
|
|
15
15
|
}
|
|
16
|
-
else if (guard_term_1.GuardTerm.isCall(term) && term.known && (term.fn ===
|
|
16
|
+
else if (guard_term_1.GuardTerm.isCall(term) && term.known && (term.fn === guard_term_1.GuardFn.And || term.fn === guard_term_1.GuardFn.Or)) {
|
|
17
17
|
const operands = term.args.map(a => withoutFrame(a.value));
|
|
18
|
-
return term.fn ===
|
|
18
|
+
return term.fn === guard_term_1.GuardFn.And ? guard_term_1.GuardTerm.allOf(operands) : guard_term_1.GuardTerm.anyOf(operands);
|
|
19
19
|
}
|
|
20
20
|
return guard_term_1.GuardTerm.True;
|
|
21
21
|
}
|
|
@@ -47,18 +47,20 @@ function groupMethodConditions(name, operands, excluded, facts) {
|
|
|
47
47
|
})), undefined, facts);
|
|
48
48
|
const key = guard_term_1.GuardTerm.render(asked);
|
|
49
49
|
if (!guard_term_1.GuardTerm.isTrue(asked)) {
|
|
50
|
-
|
|
50
|
+
const known = byAsked.get(key)?.classes ?? [];
|
|
51
|
+
known.push(classes);
|
|
52
|
+
byAsked.set(key, { asked, classes: known });
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
|
-
return
|
|
55
|
+
return byAsked.values().flatMap(({ asked, classes }) => dispatched.flatMap((operand, at) => {
|
|
54
56
|
/* the other operand having a class may bring a method of its own */
|
|
55
57
|
const others = dispatched.filter((_, i) => i !== at);
|
|
56
58
|
if (operand === undefined || operand.kind === 'constant' || others.includes(undefined)) {
|
|
57
59
|
return [];
|
|
58
60
|
}
|
|
59
|
-
const notOfClass = classes.map(cls => guard_term_1.GuardTerm.known(
|
|
60
|
-
const classed = others.filter(o => o.kind !== 'constant').map(o => guard_term_1.GuardTerm.known(
|
|
61
|
-
return [guard_term_1.GuardTerm.
|
|
62
|
-
}));
|
|
61
|
+
const notOfClass = classes.map(cls => guard_term_1.GuardTerm.known(guard_term_1.GuardFn.Not, guard_term_1.GuardTerm.known(guard_term_1.GuardFn.Identical, guard_term_1.GuardTerm.known(guard_term_1.GuardFn.OldClass, operand), cls.length === 1 ? guard_term_1.GuardTerm.string(cls[0]) : guard_term_1.GuardTerm.knownOf(guard_term_1.GuardFn.Combine, cls.map(guard_term_1.GuardTerm.string)))));
|
|
62
|
+
const classed = others.filter(o => o.kind !== 'constant').map(o => guard_term_1.GuardTerm.known(guard_term_1.GuardFn.IsObject, o));
|
|
63
|
+
return [guard_term_1.GuardTerm.anyOf([guard_term_1.GuardTerm.allOf(notOfClass), ...classed, asked])];
|
|
64
|
+
})).toArray();
|
|
63
65
|
}
|
|
64
66
|
//# sourceMappingURL=group-method-guards.js.map
|