@eagleoutice/flowr 1.4.2 → 1.5.0
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/core/print/slice-diff-ansi.js +7 -7
- package/core/steps.d.ts +352 -11
- package/core/steps.js +4 -4
- package/index.d.ts +0 -2
- package/index.js +0 -2
- package/package.json +65 -215
- package/util/{summarizer/summarizer.d.ts → summarizer.d.ts} +15 -1
- package/util/summarizer.js +37 -0
- package/util/version.d.ts +2 -0
- package/util/version.js +10 -0
- package/benchmark/index.d.ts +0 -3
- package/benchmark/index.js +0 -20
- package/benchmark/slicer.d.ts +0 -98
- package/benchmark/slicer.js +0 -213
- package/benchmark/stats/index.d.ts +0 -10
- package/benchmark/stats/index.js +0 -27
- package/benchmark/stats/print.d.ts +0 -7
- package/benchmark/stats/print.js +0 -155
- package/benchmark/stats/stats.d.ts +0 -40
- package/benchmark/stats/stats.js +0 -6
- package/benchmark/stopwatch.d.ts +0 -35
- package/benchmark/stopwatch.js +0 -79
- package/cli/benchmark-app.d.ts +0 -10
- package/cli/benchmark-app.js +0 -67
- package/cli/benchmark-helper-app.d.ts +0 -9
- package/cli/benchmark-helper-app.js +0 -69
- package/cli/common/features.d.ts +0 -3
- package/cli/common/features.js +0 -30
- package/cli/common/index.d.ts +0 -2
- package/cli/common/index.js +0 -19
- package/cli/common/options.d.ts +0 -20
- package/cli/common/options.js +0 -85
- package/cli/common/script.d.ts +0 -21
- package/cli/common/script.js +0 -61
- package/cli/common/scripts-info.d.ts +0 -25
- package/cli/common/scripts-info.js +0 -83
- package/cli/export-quads-app.d.ts +0 -7
- package/cli/export-quads-app.js +0 -42
- package/cli/repl/commands/cfg.d.ts +0 -3
- package/cli/repl/commands/cfg.js +0 -37
- package/cli/repl/commands/commands.d.ts +0 -13
- package/cli/repl/commands/commands.js +0 -142
- package/cli/repl/commands/dataflow.d.ts +0 -3
- package/cli/repl/commands/dataflow.js +0 -34
- package/cli/repl/commands/execute.d.ts +0 -4
- package/cli/repl/commands/execute.js +0 -27
- package/cli/repl/commands/index.d.ts +0 -2
- package/cli/repl/commands/index.js +0 -19
- package/cli/repl/commands/main.d.ts +0 -39
- package/cli/repl/commands/main.js +0 -14
- package/cli/repl/commands/normalize.d.ts +0 -3
- package/cli/repl/commands/normalize.js +0 -34
- package/cli/repl/commands/parse.d.ts +0 -2
- package/cli/repl/commands/parse.js +0 -109
- package/cli/repl/commands/quit.d.ts +0 -2
- package/cli/repl/commands/quit.js +0 -15
- package/cli/repl/commands/version.d.ts +0 -16
- package/cli/repl/commands/version.js +0 -33
- package/cli/repl/core.d.ts +0 -41
- package/cli/repl/core.js +0 -172
- package/cli/repl/execute.d.ts +0 -28
- package/cli/repl/execute.js +0 -79
- package/cli/repl/index.d.ts +0 -5
- package/cli/repl/index.js +0 -22
- package/cli/repl/prompt.d.ts +0 -2
- package/cli/repl/prompt.js +0 -9
- package/cli/repl/server/connection.d.ts +0 -21
- package/cli/repl/server/connection.js +0 -213
- package/cli/repl/server/messages/analysis.d.ts +0 -71
- package/cli/repl/server/messages/analysis.js +0 -21
- package/cli/repl/server/messages/error.d.ts +0 -11
- package/cli/repl/server/messages/error.js +0 -3
- package/cli/repl/server/messages/hello.d.ts +0 -20
- package/cli/repl/server/messages/hello.js +0 -3
- package/cli/repl/server/messages/index.d.ts +0 -1
- package/cli/repl/server/messages/index.js +0 -3
- package/cli/repl/server/messages/messages.d.ts +0 -35
- package/cli/repl/server/messages/messages.js +0 -40
- package/cli/repl/server/messages/repl.d.ts +0 -33
- package/cli/repl/server/messages/repl.js +0 -37
- package/cli/repl/server/messages/slice.d.ts +0 -25
- package/cli/repl/server/messages/slice.js +0 -37
- package/cli/repl/server/net.d.ts +0 -49
- package/cli/repl/server/net.js +0 -63
- package/cli/repl/server/send.d.ts +0 -4
- package/cli/repl/server/send.js +0 -18
- package/cli/repl/server/server.d.ts +0 -20
- package/cli/repl/server/server.js +0 -66
- package/cli/repl/server/validate.d.ts +0 -15
- package/cli/repl/server/validate.js +0 -34
- package/cli/slicer-app.d.ts +0 -11
- package/cli/slicer-app.js +0 -81
- package/cli/statistics-app.d.ts +0 -11
- package/cli/statistics-app.js +0 -98
- package/cli/statistics-helper-app.d.ts +0 -11
- package/cli/statistics-helper-app.js +0 -82
- package/cli/summarizer-app.d.ts +0 -18
- package/cli/summarizer-app.js +0 -66
- package/flowr.d.ts +0 -29
- package/flowr.js +0 -142
- package/statistics/features/common-syntax-probability.d.ts +0 -31
- package/statistics/features/common-syntax-probability.js +0 -156
- package/statistics/features/feature.d.ts +0 -175
- package/statistics/features/feature.js +0 -30
- package/statistics/features/index.d.ts +0 -1
- package/statistics/features/index.js +0 -18
- package/statistics/features/post-processing.d.ts +0 -12
- package/statistics/features/post-processing.js +0 -21
- package/statistics/features/supported/assignments/assignments.d.ts +0 -11
- package/statistics/features/supported/assignments/assignments.js +0 -53
- package/statistics/features/supported/assignments/index.d.ts +0 -1
- package/statistics/features/supported/assignments/index.js +0 -6
- package/statistics/features/supported/assignments/post-process.d.ts +0 -3
- package/statistics/features/supported/assignments/post-process.js +0 -125
- package/statistics/features/supported/comments/comments.d.ts +0 -18
- package/statistics/features/supported/comments/comments.js +0 -133
- package/statistics/features/supported/comments/index.d.ts +0 -1
- package/statistics/features/supported/comments/index.js +0 -6
- package/statistics/features/supported/comments/post-process.d.ts +0 -3
- package/statistics/features/supported/comments/post-process.js +0 -50
- package/statistics/features/supported/control-flow/control-flow.d.ts +0 -17
- package/statistics/features/supported/control-flow/control-flow.js +0 -67
- package/statistics/features/supported/control-flow/index.d.ts +0 -1
- package/statistics/features/supported/control-flow/index.js +0 -6
- package/statistics/features/supported/control-flow/post-process.d.ts +0 -3
- package/statistics/features/supported/control-flow/post-process.js +0 -65
- package/statistics/features/supported/data-access/data-access.d.ts +0 -15
- package/statistics/features/supported/data-access/data-access.js +0 -118
- package/statistics/features/supported/data-access/index.d.ts +0 -1
- package/statistics/features/supported/data-access/index.js +0 -6
- package/statistics/features/supported/data-access/post-process.d.ts +0 -3
- package/statistics/features/supported/data-access/post-process.js +0 -107
- package/statistics/features/supported/defined-functions/defined-functions.d.ts +0 -35
- package/statistics/features/supported/defined-functions/defined-functions.js +0 -139
- package/statistics/features/supported/defined-functions/index.d.ts +0 -1
- package/statistics/features/supported/defined-functions/index.js +0 -6
- package/statistics/features/supported/defined-functions/post-process.d.ts +0 -6
- package/statistics/features/supported/defined-functions/post-process.js +0 -177
- package/statistics/features/supported/expression-list/expression-list.d.ts +0 -9
- package/statistics/features/supported/expression-list/expression-list.js +0 -36
- package/statistics/features/supported/expression-list/index.d.ts +0 -1
- package/statistics/features/supported/expression-list/index.js +0 -6
- package/statistics/features/supported/expression-list/post-process.d.ts +0 -3
- package/statistics/features/supported/expression-list/post-process.js +0 -44
- package/statistics/features/supported/index.d.ts +0 -10
- package/statistics/features/supported/index.js +0 -27
- package/statistics/features/supported/loops/index.d.ts +0 -1
- package/statistics/features/supported/loops/index.js +0 -6
- package/statistics/features/supported/loops/loops.d.ts +0 -20
- package/statistics/features/supported/loops/loops.js +0 -79
- package/statistics/features/supported/loops/post-process.d.ts +0 -3
- package/statistics/features/supported/loops/post-process.js +0 -72
- package/statistics/features/supported/used-functions/index.d.ts +0 -1
- package/statistics/features/supported/used-functions/index.js +0 -6
- package/statistics/features/supported/used-functions/post-process.d.ts +0 -6
- package/statistics/features/supported/used-functions/post-process.js +0 -179
- package/statistics/features/supported/used-functions/used-functions.d.ts +0 -24
- package/statistics/features/supported/used-functions/used-functions.js +0 -95
- package/statistics/features/supported/used-packages/index.d.ts +0 -1
- package/statistics/features/supported/used-packages/index.js +0 -6
- package/statistics/features/supported/used-packages/post-process.d.ts +0 -3
- package/statistics/features/supported/used-packages/post-process.js +0 -121
- package/statistics/features/supported/used-packages/used-packages.d.ts +0 -16
- package/statistics/features/supported/used-packages/used-packages.js +0 -130
- package/statistics/features/supported/values/index.d.ts +0 -1
- package/statistics/features/supported/values/index.js +0 -6
- package/statistics/features/supported/values/post-process.d.ts +0 -3
- package/statistics/features/supported/values/post-process.js +0 -72
- package/statistics/features/supported/values/values.d.ts +0 -14
- package/statistics/features/supported/values/values.js +0 -101
- package/statistics/features/supported/variables/index.d.ts +0 -1
- package/statistics/features/supported/variables/index.js +0 -6
- package/statistics/features/supported/variables/post-process.d.ts +0 -9
- package/statistics/features/supported/variables/post-process.js +0 -122
- package/statistics/features/supported/variables/variables.d.ts +0 -15
- package/statistics/features/supported/variables/variables.js +0 -70
- package/statistics/index.d.ts +0 -6
- package/statistics/index.js +0 -24
- package/statistics/meta-statistics.d.ts +0 -33
- package/statistics/meta-statistics.js +0 -17
- package/statistics/output/file-provider.d.ts +0 -37
- package/statistics/output/file-provider.js +0 -97
- package/statistics/output/index.d.ts +0 -4
- package/statistics/output/index.js +0 -21
- package/statistics/output/print-stats.d.ts +0 -17
- package/statistics/output/print-stats.js +0 -69
- package/statistics/output/statistics-file.d.ts +0 -37
- package/statistics/output/statistics-file.js +0 -69
- package/statistics/statistics.d.ts +0 -24
- package/statistics/statistics.js +0 -108
- package/util/summarizer/auto-detect.d.ts +0 -2
- package/util/summarizer/auto-detect.js +0 -32
- package/util/summarizer/benchmark/data.d.ts +0 -66
- package/util/summarizer/benchmark/data.js +0 -13
- package/util/summarizer/benchmark/first-phase/input.d.ts +0 -3
- package/util/summarizer/benchmark/first-phase/input.js +0 -75
- package/util/summarizer/benchmark/first-phase/process.d.ts +0 -11
- package/util/summarizer/benchmark/first-phase/process.js +0 -217
- package/util/summarizer/benchmark/second-phase/graph.d.ts +0 -2
- package/util/summarizer/benchmark/second-phase/graph.js +0 -54
- package/util/summarizer/benchmark/second-phase/process.d.ts +0 -6
- package/util/summarizer/benchmark/second-phase/process.js +0 -126
- package/util/summarizer/benchmark/summarizer.d.ts +0 -31
- package/util/summarizer/benchmark/summarizer.js +0 -58
- package/util/summarizer/statistics/first-phase/process.d.ts +0 -6
- package/util/summarizer/statistics/first-phase/process.js +0 -81
- package/util/summarizer/statistics/post-process/clusterer.d.ts +0 -26
- package/util/summarizer/statistics/post-process/clusterer.js +0 -43
- package/util/summarizer/statistics/post-process/file-based-count.d.ts +0 -17
- package/util/summarizer/statistics/post-process/file-based-count.js +0 -49
- package/util/summarizer/statistics/post-process/histogram.d.ts +0 -59
- package/util/summarizer/statistics/post-process/histogram.js +0 -128
- package/util/summarizer/statistics/post-process/index.d.ts +0 -4
- package/util/summarizer/statistics/post-process/index.js +0 -21
- package/util/summarizer/statistics/post-process/post-process-output.d.ts +0 -16
- package/util/summarizer/statistics/post-process/post-process-output.js +0 -103
- package/util/summarizer/statistics/second-phase/process.d.ts +0 -11
- package/util/summarizer/statistics/second-phase/process.js +0 -117
- package/util/summarizer/statistics/summarizer.d.ts +0 -35
- package/util/summarizer/statistics/summarizer.js +0 -135
- package/util/summarizer/summarizer.js +0 -13
- /package/{statistics/output → util}/ansi.d.ts +0 -0
- /package/{statistics/output → util}/ansi.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eagleoutice/flowr",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
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": {
|
|
@@ -13,15 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"scripts": {
|
|
15
15
|
"publish-library": "cp .npmignore package.json README.md LICENSE dist/src/ && cd dist/src && npm publish --access public",
|
|
16
|
-
"main": "ts-node src/flowr.ts",
|
|
17
|
-
"stats": "ts-node src/cli/statistics-app.ts",
|
|
18
|
-
"stats-helper": "ts-node src/cli/statistics-helper-app.ts",
|
|
19
|
-
"slicer": "ts-node src/cli/slicer-app.ts",
|
|
20
16
|
"release": "release-it --ci",
|
|
21
|
-
"benchmark-helper": "ts-node src/cli/benchmark-helper-app.ts",
|
|
22
|
-
"benchmark": "npm run build && node dist/src/cli/benchmark-app.js",
|
|
23
|
-
"summarizer": "ts-node src/cli/summarizer-app.ts",
|
|
24
|
-
"export-quads": "ts-node src/cli/export-quads-app.ts",
|
|
25
17
|
"build": "tsc --project .",
|
|
26
18
|
"lint-local": "eslint src/ test/ --rule \"no-warning-comments: off\"",
|
|
27
19
|
"lint": "npm run license-compat -- --summary && eslint src/ test/",
|
|
@@ -63,6 +55,69 @@
|
|
|
63
55
|
"cobertura"
|
|
64
56
|
]
|
|
65
57
|
},
|
|
58
|
+
"eslintConfig": {
|
|
59
|
+
"settings": {
|
|
60
|
+
"import/resolver": {
|
|
61
|
+
"node": {
|
|
62
|
+
"extensions": [
|
|
63
|
+
".ts"
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"extends": [
|
|
69
|
+
"@eagleoutice/eslint-config-flowr"
|
|
70
|
+
],
|
|
71
|
+
"rules": {
|
|
72
|
+
"import/no-restricted-paths": [
|
|
73
|
+
"error",
|
|
74
|
+
{
|
|
75
|
+
"zones": [
|
|
76
|
+
{
|
|
77
|
+
"target": "benchmark",
|
|
78
|
+
"from": [
|
|
79
|
+
"cli",
|
|
80
|
+
"src",
|
|
81
|
+
"statistics"
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"target": "cli",
|
|
86
|
+
"from": [
|
|
87
|
+
"benchmark",
|
|
88
|
+
"src",
|
|
89
|
+
"statistics"
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"target": "statistics",
|
|
94
|
+
"from": [
|
|
95
|
+
"benchmark",
|
|
96
|
+
"cli",
|
|
97
|
+
"src"
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"target": "src",
|
|
102
|
+
"from": [
|
|
103
|
+
"benchmark",
|
|
104
|
+
"cli",
|
|
105
|
+
"statistics"
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"target": "test",
|
|
110
|
+
"from": [
|
|
111
|
+
"benchmark",
|
|
112
|
+
"cli",
|
|
113
|
+
"statistics"
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
},
|
|
66
121
|
"typedocOptions": {
|
|
67
122
|
"includeVersion": true,
|
|
68
123
|
"plugin": [
|
|
@@ -114,209 +169,6 @@
|
|
|
114
169
|
},
|
|
115
170
|
"treatValidationWarningsAsErrors": false
|
|
116
171
|
},
|
|
117
|
-
"eslintConfig": {
|
|
118
|
-
"root": true,
|
|
119
|
-
"env": {
|
|
120
|
-
"browser": false,
|
|
121
|
-
"node": true,
|
|
122
|
-
"es2022": true
|
|
123
|
-
},
|
|
124
|
-
"extends": [
|
|
125
|
-
"eslint:recommended",
|
|
126
|
-
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
|
127
|
-
"plugin:@typescript-eslint/strict",
|
|
128
|
-
"plugin:@typescript-eslint/recommended"
|
|
129
|
-
],
|
|
130
|
-
"overrides": [],
|
|
131
|
-
"parserOptions": {
|
|
132
|
-
"ecmaVersion": "latest",
|
|
133
|
-
"sourceType": "module",
|
|
134
|
-
"project": "./tsconfig.json"
|
|
135
|
-
},
|
|
136
|
-
"parser": "@typescript-eslint/parser",
|
|
137
|
-
"plugins": [
|
|
138
|
-
"@typescript-eslint",
|
|
139
|
-
"eslint-plugin-tsdoc",
|
|
140
|
-
"check-file",
|
|
141
|
-
"@stylistic",
|
|
142
|
-
"@stylistic/js",
|
|
143
|
-
"@stylistic/ts",
|
|
144
|
-
"import"
|
|
145
|
-
],
|
|
146
|
-
"rules": {
|
|
147
|
-
"@stylistic/js/object-curly-spacing": [
|
|
148
|
-
"error",
|
|
149
|
-
"always"
|
|
150
|
-
],
|
|
151
|
-
"@stylistic/js/indent": [
|
|
152
|
-
"error",
|
|
153
|
-
"tab",
|
|
154
|
-
{
|
|
155
|
-
"FunctionDeclaration": {
|
|
156
|
-
"parameters": "first"
|
|
157
|
-
},
|
|
158
|
-
"ObjectExpression": 1,
|
|
159
|
-
"SwitchCase": 1
|
|
160
|
-
}
|
|
161
|
-
],
|
|
162
|
-
"@stylistic/js/quotes": [
|
|
163
|
-
"error",
|
|
164
|
-
"single",
|
|
165
|
-
{
|
|
166
|
-
"avoidEscape": true
|
|
167
|
-
}
|
|
168
|
-
],
|
|
169
|
-
"@stylistic/no-mixed-spaces-and-tabs": [
|
|
170
|
-
"error",
|
|
171
|
-
"smart-tabs"
|
|
172
|
-
],
|
|
173
|
-
"no-warning-comments": [
|
|
174
|
-
"error",
|
|
175
|
-
{
|
|
176
|
-
"terms": [
|
|
177
|
-
"todo",
|
|
178
|
-
"fixme",
|
|
179
|
-
"xxx"
|
|
180
|
-
],
|
|
181
|
-
"location": "anywhere"
|
|
182
|
-
}
|
|
183
|
-
],
|
|
184
|
-
"@typescript-eslint/non-nullable-type-assertion-style": "off",
|
|
185
|
-
"@typescript-eslint/no-unsafe-enum-comparison": "off",
|
|
186
|
-
"@typescript-eslint/no-redundant-type-constituents": "off",
|
|
187
|
-
"@typescript-eslint/consistent-type-assertions": [
|
|
188
|
-
"error",
|
|
189
|
-
{
|
|
190
|
-
"assertionStyle": "as"
|
|
191
|
-
}
|
|
192
|
-
],
|
|
193
|
-
"@stylistic/ts/key-spacing": [
|
|
194
|
-
"error",
|
|
195
|
-
{
|
|
196
|
-
"align": "value"
|
|
197
|
-
}
|
|
198
|
-
],
|
|
199
|
-
"@stylistic/js/semi": [
|
|
200
|
-
"error",
|
|
201
|
-
"never"
|
|
202
|
-
],
|
|
203
|
-
"@stylistic/js/space-before-function-paren": [
|
|
204
|
-
"error",
|
|
205
|
-
"never"
|
|
206
|
-
],
|
|
207
|
-
"@stylistic/js/keyword-spacing": "off",
|
|
208
|
-
"check-file/filename-naming-convention": [
|
|
209
|
-
"error",
|
|
210
|
-
{
|
|
211
|
-
"**/*.ts": "?([A-Z])+([a-z])*((-|.)?([A-Z])+([a-z]))"
|
|
212
|
-
}
|
|
213
|
-
],
|
|
214
|
-
"check-file/folder-match-with-fex": [
|
|
215
|
-
"error",
|
|
216
|
-
{
|
|
217
|
-
"*.spec.{js,jsx,ts,tsx}": "test/**"
|
|
218
|
-
}
|
|
219
|
-
],
|
|
220
|
-
"@stylistic/ts/keyword-spacing": [
|
|
221
|
-
"error",
|
|
222
|
-
{
|
|
223
|
-
"before": true,
|
|
224
|
-
"after": true,
|
|
225
|
-
"overrides": {
|
|
226
|
-
"if": {
|
|
227
|
-
"after": false
|
|
228
|
-
},
|
|
229
|
-
"for": {
|
|
230
|
-
"after": false
|
|
231
|
-
},
|
|
232
|
-
"while": {
|
|
233
|
-
"after": false
|
|
234
|
-
},
|
|
235
|
-
"do": {
|
|
236
|
-
"after": false
|
|
237
|
-
},
|
|
238
|
-
"catch": {
|
|
239
|
-
"after": false
|
|
240
|
-
},
|
|
241
|
-
"switch": {
|
|
242
|
-
"after": false
|
|
243
|
-
},
|
|
244
|
-
"default": {
|
|
245
|
-
"after": false
|
|
246
|
-
},
|
|
247
|
-
"throw": {
|
|
248
|
-
"after": false
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
],
|
|
253
|
-
"@stylistic/ts/space-before-function-paren": [
|
|
254
|
-
"error",
|
|
255
|
-
"never"
|
|
256
|
-
],
|
|
257
|
-
"@typescript-eslint/no-unused-vars": [
|
|
258
|
-
"error",
|
|
259
|
-
{
|
|
260
|
-
"argsIgnorePattern": "^_",
|
|
261
|
-
"destructuredArrayIgnorePattern": "^_",
|
|
262
|
-
"varsIgnorePattern": "^_"
|
|
263
|
-
}
|
|
264
|
-
],
|
|
265
|
-
"tsdoc/syntax": "error",
|
|
266
|
-
"@typescript-eslint/naming-convention": [
|
|
267
|
-
"error",
|
|
268
|
-
{
|
|
269
|
-
"selector": "variable",
|
|
270
|
-
"modifiers": [
|
|
271
|
-
"const",
|
|
272
|
-
"global",
|
|
273
|
-
"exported"
|
|
274
|
-
],
|
|
275
|
-
"format": [
|
|
276
|
-
"camelCase",
|
|
277
|
-
"PascalCase",
|
|
278
|
-
"UPPER_CASE"
|
|
279
|
-
],
|
|
280
|
-
"leadingUnderscore": "allow",
|
|
281
|
-
"trailingUnderscore": "allow"
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
"selector": "variable",
|
|
285
|
-
"modifiers": [
|
|
286
|
-
"const"
|
|
287
|
-
],
|
|
288
|
-
"format": [
|
|
289
|
-
"camelCase",
|
|
290
|
-
"PascalCase"
|
|
291
|
-
],
|
|
292
|
-
"leadingUnderscore": "allow",
|
|
293
|
-
"trailingUnderscore": "allow"
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
"selector": "enumMember",
|
|
297
|
-
"format": [
|
|
298
|
-
"StrictPascalCase"
|
|
299
|
-
],
|
|
300
|
-
"leadingUnderscore": "forbid",
|
|
301
|
-
"trailingUnderscore": "forbid"
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
"selector": "typeLike",
|
|
305
|
-
"format": [
|
|
306
|
-
"PascalCase"
|
|
307
|
-
]
|
|
308
|
-
}
|
|
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"
|
|
318
|
-
}
|
|
319
|
-
},
|
|
320
172
|
"release-it": {
|
|
321
173
|
"git": {
|
|
322
174
|
"commitMessage": "[skip ci] Release v${version}",
|
|
@@ -351,12 +203,10 @@
|
|
|
351
203
|
"after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
|
|
352
204
|
}
|
|
353
205
|
},
|
|
354
|
-
"engines": {
|
|
355
|
-
"node": ">=16.0.0"
|
|
356
|
-
},
|
|
357
206
|
"devDependencies": {
|
|
358
207
|
"@commitlint/cli": "^18.4.3",
|
|
359
208
|
"@commitlint/config-angular": "^18.4.3",
|
|
209
|
+
"@eagleoutice/eslint-config-flowr": "^1.0.2",
|
|
360
210
|
"@stylistic/eslint-plugin": "^1.6.2",
|
|
361
211
|
"@stylistic/eslint-plugin-plus": "^1.6.2",
|
|
362
212
|
"@stylistic/eslint-plugin-ts": "^1.6.2",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MergeableRecord } from '
|
|
1
|
+
import type { MergeableRecord } from './objects';
|
|
2
2
|
export declare const enum SummarizerType {
|
|
3
3
|
Benchmark = "benchmark",
|
|
4
4
|
Statistics = "statistics"
|
|
@@ -6,6 +6,17 @@ export declare const enum SummarizerType {
|
|
|
6
6
|
export interface CommonSummarizerConfiguration extends MergeableRecord {
|
|
7
7
|
logger: (message: string) => void;
|
|
8
8
|
}
|
|
9
|
+
export interface SummarizedMeasurement<T = number> {
|
|
10
|
+
min: T;
|
|
11
|
+
max: T;
|
|
12
|
+
median: T;
|
|
13
|
+
/** total may be useless for some measurements, especially if they are weighted before (it is just the sum...)*/
|
|
14
|
+
total: T;
|
|
15
|
+
/** average */
|
|
16
|
+
mean: number;
|
|
17
|
+
/** standard deviation */
|
|
18
|
+
std: number;
|
|
19
|
+
}
|
|
9
20
|
export declare abstract class Summarizer<Output, Configuration extends CommonSummarizerConfiguration> {
|
|
10
21
|
protected readonly config: Configuration;
|
|
11
22
|
protected readonly log: CommonSummarizerConfiguration['logger'];
|
|
@@ -23,3 +34,6 @@ export declare abstract class Summarizer<Output, Configuration extends CommonSum
|
|
|
23
34
|
*/
|
|
24
35
|
abstract summarizePhase(): Promise<Output>;
|
|
25
36
|
}
|
|
37
|
+
export declare function summarizedMeasurement2Csv(a: SummarizedMeasurement): string;
|
|
38
|
+
export declare function summarizedMeasurement2CsvHeader(prefix?: string): string;
|
|
39
|
+
export declare function summarizeMeasurement(data: number[], totalNumberOfDataPoints?: number): SummarizedMeasurement;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.summarizeMeasurement = exports.summarizedMeasurement2CsvHeader = exports.summarizedMeasurement2Csv = exports.Summarizer = void 0;
|
|
4
|
+
const arrays_1 = require("./arrays");
|
|
5
|
+
class Summarizer {
|
|
6
|
+
config;
|
|
7
|
+
log;
|
|
8
|
+
constructor(config) {
|
|
9
|
+
this.config = config;
|
|
10
|
+
this.log = this.config.logger;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.Summarizer = Summarizer;
|
|
14
|
+
function summarizedMeasurement2Csv(a) {
|
|
15
|
+
return `${a.min},${a.max},${a.median},${a.mean},${a.std},${a.total}`;
|
|
16
|
+
}
|
|
17
|
+
exports.summarizedMeasurement2Csv = summarizedMeasurement2Csv;
|
|
18
|
+
const summarizedKeys = ['min', 'max', 'median', 'mean', 'std', 'total'];
|
|
19
|
+
function summarizedMeasurement2CsvHeader(prefix) {
|
|
20
|
+
return summarizedKeys.map(k => prefix ? `${prefix}-${k}` : k).join(',');
|
|
21
|
+
}
|
|
22
|
+
exports.summarizedMeasurement2CsvHeader = summarizedMeasurement2CsvHeader;
|
|
23
|
+
function summarizeMeasurement(data, totalNumberOfDataPoints) {
|
|
24
|
+
// just to avoid in-place modification
|
|
25
|
+
const sorted = [...data].sort((a, b) => a - b);
|
|
26
|
+
const min = sorted[0];
|
|
27
|
+
const max = sorted[sorted.length - 1];
|
|
28
|
+
const median = sorted[Math.floor(sorted.length / 2)];
|
|
29
|
+
const total = (0, arrays_1.sum)(sorted);
|
|
30
|
+
const length = totalNumberOfDataPoints ?? sorted.length;
|
|
31
|
+
const mean = total / length;
|
|
32
|
+
// sqrt(sum(x-mean)^2 / n)
|
|
33
|
+
const std = Math.sqrt(sorted.map(x => (x - mean) ** 2).reduce((a, b) => a + b, 0) / length);
|
|
34
|
+
return { min, max, median, mean, std, total };
|
|
35
|
+
}
|
|
36
|
+
exports.summarizeMeasurement = summarizeMeasurement;
|
|
37
|
+
//# sourceMappingURL=summarizer.js.map
|
package/util/version.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.flowrVersion = void 0;
|
|
4
|
+
const package_json_1 = require("../../package.json");
|
|
5
|
+
const semver_1 = require("semver");
|
|
6
|
+
function flowrVersion() {
|
|
7
|
+
return new semver_1.SemVer(package_json_1.version);
|
|
8
|
+
}
|
|
9
|
+
exports.flowrVersion = flowrVersion;
|
|
10
|
+
//# sourceMappingURL=version.js.map
|
package/benchmark/index.d.ts
DELETED
package/benchmark/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./stats"), exports);
|
|
18
|
-
__exportStar(require("./slicer"), exports);
|
|
19
|
-
__exportStar(require("./stopwatch"), exports);
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
package/benchmark/slicer.d.ts
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Provides a top-level slicer that can be used to slice code *and* retrieve stats.
|
|
3
|
-
* @module
|
|
4
|
-
*/
|
|
5
|
-
import type { NormalizedAst, RParseRequestFromFile, RParseRequestFromText } from '../r-bridge';
|
|
6
|
-
import type { DataflowInformation } from '../dataflow/internal/info';
|
|
7
|
-
import type { SlicingCriteria, SlicingCriteriaFilter, SliceResult, ReconstructionResult } from '../slicing';
|
|
8
|
-
import type { PerSliceStats, SlicerStats } from './stats';
|
|
9
|
-
import type { MergeableRecord } from '../util/objects';
|
|
10
|
-
export declare const benchmarkLogger: import("tslog").Logger<import("tslog").ILogObj>;
|
|
11
|
-
/**
|
|
12
|
-
* Returns the stats but also the result of all setup steps (parsing, normalization, and the dataflow analysis) during the slicing.
|
|
13
|
-
* This is useful for debugging and visualizing the slicing process.
|
|
14
|
-
*/
|
|
15
|
-
export interface BenchmarkSlicerStats extends MergeableRecord {
|
|
16
|
-
/** the measurements obtained during the benchmark */
|
|
17
|
-
stats: SlicerStats;
|
|
18
|
-
/** the initial and unmodified AST produced by the R side/the 'parse' step */
|
|
19
|
-
parse: string;
|
|
20
|
-
/** the normalized AST produced by the 'normalization' step, including its parent decoration */
|
|
21
|
-
normalize: NormalizedAst;
|
|
22
|
-
/** the dataflow graph produced by the 'dataflow' step */
|
|
23
|
-
dataflow: DataflowInformation;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Additionally to {@link BenchmarkSlicerStats}, this contains the results of a *single* slice.
|
|
27
|
-
* In other words, it holds the results of the slice and reconstruct steps.
|
|
28
|
-
*/
|
|
29
|
-
export interface BenchmarkSingleSliceStats extends MergeableRecord {
|
|
30
|
-
/** the measurements obtained during the single slice */
|
|
31
|
-
stats: PerSliceStats;
|
|
32
|
-
/** the result of the 'slice' step */
|
|
33
|
-
slice: SliceResult;
|
|
34
|
-
/** the final code, as the result of the 'reconstruct' step */
|
|
35
|
-
code: ReconstructionResult;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* A slicer that can be used to slice exactly one file (multiple times).
|
|
39
|
-
* It holds its own {@link RShell} instance, maintains a cached dataflow and keeps measurements.
|
|
40
|
-
*
|
|
41
|
-
* Make sure to call {@link init} to initialize the slicer, before calling {@link slice}.
|
|
42
|
-
* After slicing, call {@link finish} to close the R session and retrieve the stats.
|
|
43
|
-
*
|
|
44
|
-
* @note Under the hood, the benchmark slicer maintains a {@link SteppingSlicer}.
|
|
45
|
-
*/
|
|
46
|
-
export declare class BenchmarkSlicer {
|
|
47
|
-
/** Measures all data that is recorded *once* per slicer (complete setup up to the dataflow graph creation) */
|
|
48
|
-
private readonly commonMeasurements;
|
|
49
|
-
private readonly perSliceMeasurements;
|
|
50
|
-
private readonly shell;
|
|
51
|
-
private stats;
|
|
52
|
-
private loadedXml;
|
|
53
|
-
private dataflow;
|
|
54
|
-
private ai;
|
|
55
|
-
private normalizedAst;
|
|
56
|
-
private totalStopwatch;
|
|
57
|
-
private finished;
|
|
58
|
-
private stepper;
|
|
59
|
-
constructor();
|
|
60
|
-
/**
|
|
61
|
-
* Initialize the slicer on the given request.
|
|
62
|
-
* Can only be called once for each instance.
|
|
63
|
-
*/
|
|
64
|
-
init(request: RParseRequestFromFile | RParseRequestFromText): Promise<void>;
|
|
65
|
-
private calculateStatsAfterInit;
|
|
66
|
-
/**
|
|
67
|
-
* Slice for the given {@link SlicingCriteria}.
|
|
68
|
-
* @see SingleSlicingCriterion
|
|
69
|
-
*
|
|
70
|
-
* @returns The per slice stats retrieved for this slicing criteria
|
|
71
|
-
*/
|
|
72
|
-
slice(...slicingCriteria: SlicingCriteria): Promise<BenchmarkSingleSliceStats>;
|
|
73
|
-
/** Bridging the gap between the new internal and the old names for the benchmarking */
|
|
74
|
-
private measureCommonStep;
|
|
75
|
-
private measureSliceStep;
|
|
76
|
-
private guardActive;
|
|
77
|
-
/**
|
|
78
|
-
* Call {@link slice} for all slicing criteria that match the given filter.
|
|
79
|
-
* See {@link collectAllSlicingCriteria} for details.
|
|
80
|
-
* <p>
|
|
81
|
-
* the `report` function will be called *before* each individual slice is performed.
|
|
82
|
-
*
|
|
83
|
-
* @returns The number of slices that were produced
|
|
84
|
-
*
|
|
85
|
-
* @see collectAllSlicingCriteria
|
|
86
|
-
* @see SlicingCriteriaFilter
|
|
87
|
-
*/
|
|
88
|
-
sliceForAll(filter: SlicingCriteriaFilter, report?: (current: number, total: number, allCriteria: SlicingCriteria[]) => void): Promise<number>;
|
|
89
|
-
/**
|
|
90
|
-
* Retrieves the final stats and closes the shell session.
|
|
91
|
-
* Can be called multiple times to retrieve the stored stats, but will only close the session once (the first time).
|
|
92
|
-
*/
|
|
93
|
-
finish(): BenchmarkSlicerStats;
|
|
94
|
-
/**
|
|
95
|
-
* Only call in case of an error - if the session must be closed and the benchmark itself is to be considered failed/dead.
|
|
96
|
-
*/
|
|
97
|
-
ensureSessionClosed(): void;
|
|
98
|
-
}
|