@eagleoutice/flowr 2.9.14 → 2.10.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.
- package/README.md +52 -29
- package/abstract-interpretation/absint-visitor.d.ts +13 -8
- package/abstract-interpretation/absint-visitor.js +35 -26
- package/abstract-interpretation/data-frame/dataframe-domain.d.ts +1 -2
- package/abstract-interpretation/data-frame/dataframe-domain.js +14 -15
- package/abstract-interpretation/data-frame/mappers/access-mapper.js +2 -15
- package/abstract-interpretation/data-frame/mappers/arguments.d.ts +11 -17
- package/abstract-interpretation/data-frame/mappers/arguments.js +18 -18
- package/abstract-interpretation/data-frame/mappers/function-mapper.d.ts +41 -15
- package/abstract-interpretation/data-frame/mappers/function-mapper.js +74 -48
- package/abstract-interpretation/data-frame/mappers/replacement-mapper.js +2 -1
- package/abstract-interpretation/data-frame/semantics.d.ts +1 -1
- package/abstract-interpretation/data-frame/semantics.js +31 -35
- package/abstract-interpretation/data-frame/shape-inference.js +1 -1
- package/abstract-interpretation/domains/interval-domain.d.ts +1 -0
- package/abstract-interpretation/domains/interval-domain.js +3 -0
- package/abstract-interpretation/domains/product-domain.d.ts +9 -0
- package/abstract-interpretation/domains/product-domain.js +26 -6
- package/abstract-interpretation/domains/state-abstract-domain.d.ts +36 -22
- package/abstract-interpretation/domains/state-abstract-domain.js +169 -62
- package/abstract-interpretation/unsupported-functions.d.ts +10 -0
- package/abstract-interpretation/unsupported-functions.js +45 -0
- package/benchmark/slicer.js +10 -13
- package/benchmark/stats/stats.d.ts +2 -2
- package/cli/flowr.js +1 -1
- package/cli/repl/parser/slice-query-parser.d.ts +2 -2
- package/config.d.ts +4 -0
- package/config.js +5 -3
- package/control-flow/control-flow-graph.js +13 -9
- package/control-flow/semantic-cfg-guided-visitor.d.ts +6 -0
- package/control-flow/semantic-cfg-guided-visitor.js +6 -0
- package/dataflow/environments/built-in-proc-name.d.ts +6 -0
- package/dataflow/environments/built-in-proc-name.js +6 -0
- package/dataflow/environments/built-in.d.ts +7 -5
- package/dataflow/environments/built-in.js +2 -0
- package/dataflow/environments/default-builtin-config.d.ts +442 -6
- package/dataflow/environments/default-builtin-config.js +158 -3
- package/dataflow/environments/identifier.d.ts +4 -0
- package/dataflow/environments/identifier.js +17 -0
- package/dataflow/environments/overwrite.js +2 -5
- package/dataflow/graph/call-graph.d.ts +4 -7
- package/dataflow/graph/call-graph.js +0 -22
- package/dataflow/graph/df-helper.d.ts +23 -12
- package/dataflow/graph/df-helper.js +44 -7
- package/dataflow/graph/graph-helper.d.ts +9 -4
- package/dataflow/graph/graph-helper.js +26 -3
- package/dataflow/graph/graph.d.ts +23 -2
- package/dataflow/graph/graph.js +38 -4
- package/dataflow/graph/vertex.d.ts +2 -0
- package/dataflow/instrument/instrument-dataflow-count.d.ts +10 -0
- package/dataflow/instrument/instrument-dataflow-count.js +10 -0
- package/dataflow/internal/process/functions/call/argument/unpack-argument.d.ts +4 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-access.d.ts +3 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-apply.js +1 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.d.ts +3 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-assignment.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-eval.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-expression-list.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-for-loop.js +1 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-function-definition.js +8 -19
- package/dataflow/internal/process/functions/call/built-in/built-in-get.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-if-then-else.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-library.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-list.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-local.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.d.ts +23 -3
- package/dataflow/internal/process/functions/call/built-in/built-in-pipe.js +80 -12
- package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.d.ts +41 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-purrr-formula.js +179 -0
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.d.ts +7 -4
- package/dataflow/internal/process/functions/call/built-in/built-in-quote.js +62 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-recall.d.ts +7 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-recall.js +15 -1
- package/dataflow/internal/process/functions/call/built-in/built-in-register-hook.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-repeat-loop.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-replacement.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-rm.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-dispatch.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-s-seven-new-generic.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-s-three-dispatch.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-source.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-special-bin-op.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-stop-if-not.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-try-catch.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-vector.d.ts +2 -2
- package/dataflow/internal/process/functions/call/built-in/built-in-while-loop.d.ts +2 -2
- package/dataflow/internal/process/functions/call/common.d.ts +2 -2
- package/dataflow/internal/process/functions/call/common.js +6 -4
- package/dataflow/internal/process/functions/call/known-call-handling.d.ts +2 -2
- package/dataflow/internal/process/functions/call/named-call-handling.d.ts +2 -2
- package/dataflow/internal/process/functions/process-parameter.js +1 -1
- package/documentation/doc-readme.js +2 -1
- package/documentation/wiki-absint.js +6 -5
- package/documentation/wiki-analyzer.js +0 -2
- package/documentation/wiki-linter.js +6 -0
- package/documentation/wiki-normalized-ast.js +7 -7
- package/linter/linter-rules.d.ts +49 -1
- package/linter/linter-rules.js +5 -1
- package/linter/rules/dataframe-access-validation.d.ts +1 -1
- package/linter/rules/dataframe-access-validation.js +3 -4
- package/linter/rules/problematic-eval.d.ts +44 -0
- package/linter/rules/problematic-eval.js +83 -0
- package/linter/rules/roxygen-arguments.d.ts +35 -0
- package/linter/rules/roxygen-arguments.js +100 -0
- package/package.json +8 -9
- package/project/context/flowr-analyzer-context.d.ts +1 -8
- package/project/context/flowr-analyzer-context.js +1 -7
- package/project/context/flowr-analyzer-environment-context.d.ts +5 -0
- package/project/context/flowr-analyzer-environment-context.js +6 -0
- package/project/context/flowr-analyzer-files-context.d.ts +6 -0
- package/project/context/flowr-analyzer-files-context.js +4 -2
- package/project/flowr-analyzer-builder.js +1 -4
- package/queries/catalog/call-context-query/call-context-query-executor.d.ts +1 -1
- package/queries/catalog/call-context-query/call-context-query-executor.js +10 -5
- package/queries/catalog/call-context-query/call-context-query-format.d.ts +1 -1
- package/queries/catalog/dependencies-query/function-info/library-functions.js +2 -0
- package/queries/catalog/df-shape-query/df-shape-query-executor.js +1 -1
- package/queries/catalog/df-shape-query/df-shape-query-format.d.ts +3 -3
- package/queries/catalog/df-shape-query/df-shape-query-format.js +7 -2
- package/queries/catalog/does-call-query/does-call-query-executor.js +1 -1
- package/queries/catalog/does-call-query/does-call-query-format.d.ts +2 -2
- package/queries/catalog/files-query/files-query-executor.js +0 -1
- package/queries/catalog/happens-before-query/happens-before-query-executor.js +2 -2
- package/queries/catalog/happens-before-query/happens-before-query-format.d.ts +3 -3
- package/queries/catalog/input-sources-query/input-sources-query-executor.d.ts +6 -0
- package/queries/catalog/input-sources-query/input-sources-query-executor.js +66 -0
- package/queries/catalog/input-sources-query/input-sources-query-format.d.ts +36 -0
- package/queries/catalog/input-sources-query/input-sources-query-format.js +63 -0
- package/queries/catalog/input-sources-query/simple-input-classifier.d.ts +92 -0
- package/queries/catalog/input-sources-query/simple-input-classifier.js +310 -0
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.d.ts +2 -2
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-executor.js +1 -1
- package/queries/catalog/inspect-exceptions-query/inspect-exception-query-format.d.ts +2 -2
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-executor.js +1 -1
- package/queries/catalog/inspect-higher-order-query/inspect-higher-order-query-format.d.ts +2 -2
- package/queries/catalog/inspect-recursion-query/inspect-recursion-query-format.d.ts +2 -2
- package/queries/catalog/location-map-query/location-map-query-executor.js +1 -1
- package/queries/catalog/location-map-query/location-map-query-format.d.ts +2 -2
- package/queries/catalog/origin-query/origin-query-executor.d.ts +2 -2
- package/queries/catalog/origin-query/origin-query-executor.js +1 -1
- package/queries/catalog/origin-query/origin-query-format.d.ts +3 -3
- package/queries/catalog/provenance-query/provenance-query-executor.d.ts +1 -4
- package/queries/catalog/provenance-query/provenance-query-executor.js +3 -6
- package/queries/catalog/provenance-query/provenance-query-format.d.ts +2 -2
- package/queries/catalog/resolve-value-query/resolve-value-query-executor.js +1 -1
- package/queries/query.d.ts +9 -1
- package/queries/query.js +2 -0
- package/r-bridge/data/data.d.ts +2 -2
- package/r-bridge/data/data.js +2 -2
- package/r-bridge/lang-4.x/ast/model/model.d.ts +3 -0
- package/r-bridge/lang-4.x/ast/model/model.js +3 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-access.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.d.ts +29 -6
- package/r-bridge/lang-4.x/ast/model/nodes/r-argument.js +16 -2
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-binary-op.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.d.ts +15 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-break.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.d.ts +15 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-comment.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-expression-list.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-for-loop.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.d.ts +19 -4
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-call.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.d.ts +21 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-function-definition.js +16 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-if-then-else.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-line-directive.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-logical.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-next.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-number.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-parameter.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.d.ts +25 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-pipe.js +15 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-repeat-loop.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-string.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-symbol.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-unary-op.js +2 -0
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.d.ts +16 -1
- package/r-bridge/lang-4.x/ast/model/nodes/r-while-loop.js +2 -0
- package/r-bridge/lang-4.x/ast/model/versions.d.ts +2 -0
- package/r-bridge/lang-4.x/ast/model/versions.js +3 -1
- package/r-bridge/roxygen2/documentation-provider.js +15 -6
- package/r-bridge/roxygen2/roxygen-ast.d.ts +3 -1
- package/search/flowr-search-builder.js +3 -2
- package/search/search-executor/search-generators.js +1 -1
- package/slicing/criterion/parse.d.ts +11 -10
- package/slicing/criterion/parse.js +9 -8
- package/slicing/static/static-slicer.js +24 -1
- package/util/collections/arrays.d.ts +4 -0
- package/util/collections/arrays.js +7 -0
- package/util/mermaid/ast.js +2 -1
- package/util/mermaid/dfg.js +2 -1
- package/util/record.d.ts +23 -0
- package/util/record.js +33 -0
- package/util/version.js +1 -1
- package/abstract-interpretation/domains/mapped-abstract-domain.d.ts +0 -41
- package/abstract-interpretation/domains/mapped-abstract-domain.js +0 -213
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MutableMappedAbstractDomain = exports.MappedAbstractDomain = void 0;
|
|
4
|
-
const abstract_domain_1 = require("./abstract-domain");
|
|
5
|
-
const lattice_1 = require("./lattice");
|
|
6
|
-
/**
|
|
7
|
-
* A mapped abstract domain as mapping of keys to abstract values of an abstract domain.
|
|
8
|
-
* The Bottom element is defined as empty mapping and the Top element is defined as mapping every existing key to Top.
|
|
9
|
-
* @template Key - Type of the keys of the mapping to abstract values
|
|
10
|
-
* @template Domain - Type of the abstract domain to map the keys to
|
|
11
|
-
*/
|
|
12
|
-
class MappedAbstractDomain extends abstract_domain_1.AbstractDomain {
|
|
13
|
-
constructor(value) {
|
|
14
|
-
super(new Map(value));
|
|
15
|
-
}
|
|
16
|
-
create(value) {
|
|
17
|
-
return new MappedAbstractDomain(value);
|
|
18
|
-
}
|
|
19
|
-
get(key) {
|
|
20
|
-
return this._value.get(key);
|
|
21
|
-
}
|
|
22
|
-
has(key) {
|
|
23
|
-
return this._value.has(key);
|
|
24
|
-
}
|
|
25
|
-
set(key, value) {
|
|
26
|
-
this._value.set(key, value);
|
|
27
|
-
}
|
|
28
|
-
remove(key) {
|
|
29
|
-
this._value.delete(key);
|
|
30
|
-
}
|
|
31
|
-
bottom() {
|
|
32
|
-
return this.create(new Map());
|
|
33
|
-
}
|
|
34
|
-
top() {
|
|
35
|
-
const result = this.create(this.value);
|
|
36
|
-
for (const [key, value] of result.value) {
|
|
37
|
-
result.set(key, value.top());
|
|
38
|
-
}
|
|
39
|
-
return result;
|
|
40
|
-
}
|
|
41
|
-
equals(other) {
|
|
42
|
-
if (this.value === other.value) {
|
|
43
|
-
return true;
|
|
44
|
-
}
|
|
45
|
-
else if (this.value.size !== other.value.size) {
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
for (const [key, value] of this.value) {
|
|
49
|
-
const otherValue = other.get(key);
|
|
50
|
-
if (otherValue === undefined || !value.equals(otherValue)) {
|
|
51
|
-
return false;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return true;
|
|
55
|
-
}
|
|
56
|
-
leq(other) {
|
|
57
|
-
if (this.value === other.value) {
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
60
|
-
else if (this.value.size > other.value.size) {
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
for (const [key, value] of this.value) {
|
|
64
|
-
const otherValue = other.get(key);
|
|
65
|
-
if (otherValue === undefined || !value.leq(otherValue)) {
|
|
66
|
-
return false;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
return true;
|
|
70
|
-
}
|
|
71
|
-
join(other) {
|
|
72
|
-
const result = this.create(this.value);
|
|
73
|
-
for (const [key, value] of other.value) {
|
|
74
|
-
const currValue = result.get(key);
|
|
75
|
-
if (currValue === undefined) {
|
|
76
|
-
result.set(key, value);
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
result.set(key, currValue.join(value));
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
return result;
|
|
83
|
-
}
|
|
84
|
-
meet(other) {
|
|
85
|
-
const result = this.create(this.value);
|
|
86
|
-
for (const [key] of result.value) {
|
|
87
|
-
if (!other.has(key)) {
|
|
88
|
-
result.remove(key);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
for (const [key, value] of other.value) {
|
|
92
|
-
const currValue = result.get(key);
|
|
93
|
-
if (currValue !== undefined) {
|
|
94
|
-
result.set(key, currValue.meet(value));
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
return result;
|
|
98
|
-
}
|
|
99
|
-
widen(other) {
|
|
100
|
-
const result = this.create(this.value);
|
|
101
|
-
for (const [key, value] of other.value) {
|
|
102
|
-
const currValue = result.get(key);
|
|
103
|
-
if (currValue === undefined) {
|
|
104
|
-
result.set(key, value);
|
|
105
|
-
}
|
|
106
|
-
else {
|
|
107
|
-
result.set(key, currValue.widen(value));
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return result;
|
|
111
|
-
}
|
|
112
|
-
narrow(other) {
|
|
113
|
-
const result = this.create(this.value);
|
|
114
|
-
for (const [key] of this.value) {
|
|
115
|
-
if (!other.has(key)) {
|
|
116
|
-
result.remove(key);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
for (const [key, value] of other.value) {
|
|
120
|
-
const currValue = result.get(key);
|
|
121
|
-
if (currValue !== undefined) {
|
|
122
|
-
result.set(key, currValue.narrow(value));
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
return result;
|
|
126
|
-
}
|
|
127
|
-
concretize(limit) {
|
|
128
|
-
if (this.value.size === 0) {
|
|
129
|
-
return new Set();
|
|
130
|
-
}
|
|
131
|
-
let mappings = new Set([new Map()]);
|
|
132
|
-
for (const [key, value] of this.value) {
|
|
133
|
-
const concreteValues = value.concretize(limit);
|
|
134
|
-
if (concreteValues === lattice_1.Top) {
|
|
135
|
-
return lattice_1.Top;
|
|
136
|
-
}
|
|
137
|
-
const newMappings = new Set();
|
|
138
|
-
for (const state of mappings) {
|
|
139
|
-
for (const concrete of concreteValues) {
|
|
140
|
-
if (newMappings.size > limit) {
|
|
141
|
-
return lattice_1.Top;
|
|
142
|
-
}
|
|
143
|
-
const map = new Map(state);
|
|
144
|
-
map.set(key, concrete);
|
|
145
|
-
newMappings.add(map);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
mappings = newMappings;
|
|
149
|
-
}
|
|
150
|
-
return mappings;
|
|
151
|
-
}
|
|
152
|
-
abstract(concrete) {
|
|
153
|
-
if (concrete === lattice_1.Top) {
|
|
154
|
-
return this.top();
|
|
155
|
-
}
|
|
156
|
-
else if (concrete.size === 0) {
|
|
157
|
-
return this.bottom();
|
|
158
|
-
}
|
|
159
|
-
const domain = this.value.values().toArray()[0];
|
|
160
|
-
if (domain === undefined) {
|
|
161
|
-
return this.top();
|
|
162
|
-
}
|
|
163
|
-
const mapping = new Map();
|
|
164
|
-
for (const concreteMapping of concrete) {
|
|
165
|
-
for (const [key, value] of concreteMapping) {
|
|
166
|
-
const set = mapping.get(key);
|
|
167
|
-
if (set === undefined) {
|
|
168
|
-
mapping.set(key, new Set([value]));
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
set.add(value);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
const result = new Map();
|
|
176
|
-
for (const [key, values] of mapping) {
|
|
177
|
-
result.set(key, domain.abstract(values));
|
|
178
|
-
}
|
|
179
|
-
return this.create(result);
|
|
180
|
-
}
|
|
181
|
-
toJson() {
|
|
182
|
-
return Object.fromEntries(this.value.entries().map(([key, value]) => [key, value.toJson()]));
|
|
183
|
-
}
|
|
184
|
-
toString() {
|
|
185
|
-
return '(' + this.value.entries().toArray().map(([key, value]) => `${(0, abstract_domain_1.domainElementToString)(key)} -> ${value.toString()}`).join(', ') + ')';
|
|
186
|
-
}
|
|
187
|
-
isTop() {
|
|
188
|
-
return this.value.values().some(entry => entry.isTop());
|
|
189
|
-
}
|
|
190
|
-
isBottom() {
|
|
191
|
-
return this.value.size === 0;
|
|
192
|
-
}
|
|
193
|
-
isValue() {
|
|
194
|
-
return true;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
exports.MappedAbstractDomain = MappedAbstractDomain;
|
|
198
|
-
/**
|
|
199
|
-
* A mutable version of the {@link MappedAbstractDomain} with {@link MutableMappedAbstractDomain#set|`set`} and {@link MutableMappedAbstractDomain#remove|`remove`}.
|
|
200
|
-
*/
|
|
201
|
-
class MutableMappedAbstractDomain extends MappedAbstractDomain {
|
|
202
|
-
create(value) {
|
|
203
|
-
return new MutableMappedAbstractDomain(value);
|
|
204
|
-
}
|
|
205
|
-
set(key, value) {
|
|
206
|
-
super.set(key, value);
|
|
207
|
-
}
|
|
208
|
-
remove(key) {
|
|
209
|
-
super.remove(key);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
exports.MutableMappedAbstractDomain = MutableMappedAbstractDomain;
|
|
213
|
-
//# sourceMappingURL=mapped-abstract-domain.js.map
|