@nahisaho/musubix-synthesis 2.1.0 → 2.2.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/dist/EnhancedPBESynthesizer.d.ts +182 -0
- package/dist/EnhancedPBESynthesizer.d.ts.map +1 -0
- package/dist/EnhancedPBESynthesizer.js +266 -0
- package/dist/EnhancedPBESynthesizer.js.map +1 -0
- package/dist/analysis/ExampleAnalyzer.d.ts +81 -0
- package/dist/analysis/ExampleAnalyzer.d.ts.map +1 -0
- package/dist/analysis/ExampleAnalyzer.js +358 -0
- package/dist/analysis/ExampleAnalyzer.js.map +1 -0
- package/dist/analysis/index.d.ts +9 -0
- package/dist/analysis/index.d.ts.map +1 -0
- package/dist/analysis/index.js +8 -0
- package/dist/analysis/index.js.map +1 -0
- package/dist/dsl/DSLExtender.d.ts +79 -0
- package/dist/dsl/DSLExtender.d.ts.map +1 -0
- package/dist/dsl/DSLExtender.js +312 -0
- package/dist/dsl/DSLExtender.js.map +1 -0
- package/dist/dsl/index.d.ts +2 -0
- package/dist/dsl/index.d.ts.map +1 -1
- package/dist/dsl/index.js +2 -0
- package/dist/dsl/index.js.map +1 -1
- package/dist/explain/ExplanationGenerator.d.ts +91 -0
- package/dist/explain/ExplanationGenerator.d.ts.map +1 -0
- package/dist/explain/ExplanationGenerator.js +236 -0
- package/dist/explain/ExplanationGenerator.js.map +1 -0
- package/dist/explain/index.d.ts +7 -0
- package/dist/explain/index.d.ts.map +1 -0
- package/dist/explain/index.js +7 -0
- package/dist/explain/index.js.map +1 -0
- package/dist/index.d.ts +14 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/meta/MetaLearningEngine.d.ts +106 -0
- package/dist/meta/MetaLearningEngine.d.ts.map +1 -0
- package/dist/meta/MetaLearningEngine.js +196 -0
- package/dist/meta/MetaLearningEngine.js.map +1 -0
- package/dist/meta/__tests__/MetaLearningEngine.test.d.ts +8 -0
- package/dist/meta/__tests__/MetaLearningEngine.test.d.ts.map +1 -0
- package/dist/meta/__tests__/MetaLearningEngine.test.js +244 -0
- package/dist/meta/__tests__/MetaLearningEngine.test.js.map +1 -0
- package/dist/meta/index.d.ts +9 -0
- package/dist/meta/index.d.ts.map +1 -0
- package/dist/meta/index.js +8 -0
- package/dist/meta/index.js.map +1 -0
- package/dist/versionspace/EnhancedVersionSpace.d.ts +170 -0
- package/dist/versionspace/EnhancedVersionSpace.d.ts.map +1 -0
- package/dist/versionspace/EnhancedVersionSpace.js +265 -0
- package/dist/versionspace/EnhancedVersionSpace.js.map +1 -0
- package/dist/versionspace/index.d.ts +7 -0
- package/dist/versionspace/index.d.ts.map +1 -0
- package/dist/versionspace/index.js +6 -0
- package/dist/versionspace/index.js.map +1 -0
- package/dist/witness/EnhancedWitnessEngine.d.ts +108 -0
- package/dist/witness/EnhancedWitnessEngine.d.ts.map +1 -0
- package/dist/witness/EnhancedWitnessEngine.js +555 -0
- package/dist/witness/EnhancedWitnessEngine.js.map +1 -0
- package/dist/witness/index.d.ts +6 -0
- package/dist/witness/index.d.ts.map +1 -0
- package/dist/witness/index.js +6 -0
- package/dist/witness/index.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ExampleAnalyzer
|
|
3
|
+
* @module @nahisaho/musubix-synthesis
|
|
4
|
+
* @description Input/output example quality analysis
|
|
5
|
+
* Traces to: TSK-SY-105, DES-SY-105, REQ-SY-105
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Default configuration
|
|
9
|
+
*/
|
|
10
|
+
const DEFAULT_CONFIG = {
|
|
11
|
+
minExamples: 3,
|
|
12
|
+
ambiguityThreshold: 0.5,
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Edge case definitions
|
|
16
|
+
*/
|
|
17
|
+
const EDGE_CASES = {
|
|
18
|
+
string: ['empty', 'whitespace', 'special-chars', 'unicode', 'numeric-string'],
|
|
19
|
+
number: ['zero', 'negative', 'large', 'decimal', 'infinity'],
|
|
20
|
+
array: ['empty', 'single-element', 'large', 'nested', 'mixed-types'],
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Default example analyzer implementation
|
|
24
|
+
*/
|
|
25
|
+
class DefaultExampleAnalyzer {
|
|
26
|
+
config;
|
|
27
|
+
constructor(config = DEFAULT_CONFIG) {
|
|
28
|
+
this.config = { ...DEFAULT_CONFIG, ...config };
|
|
29
|
+
}
|
|
30
|
+
analyzeQuality(examples) {
|
|
31
|
+
const issues = [];
|
|
32
|
+
const missingEdgeCases = [];
|
|
33
|
+
// Check minimum examples
|
|
34
|
+
if (examples.length < this.config.minExamples) {
|
|
35
|
+
issues.push('Insufficient examples');
|
|
36
|
+
}
|
|
37
|
+
// Check for duplicates
|
|
38
|
+
const uniqueInputs = new Set(examples.map(e => JSON.stringify(e.input)));
|
|
39
|
+
if (uniqueInputs.size < examples.length) {
|
|
40
|
+
issues.push('Contains redundant/duplicate examples');
|
|
41
|
+
}
|
|
42
|
+
// Calculate diversity
|
|
43
|
+
const diversity = this.calculateDiversity(examples);
|
|
44
|
+
// Calculate consistency
|
|
45
|
+
const consistency = this.calculateConsistency(examples);
|
|
46
|
+
// Find missing edge cases
|
|
47
|
+
const inputType = this.detectType(examples[0]?.input);
|
|
48
|
+
const coveredEdgeCases = this.detectCoveredEdgeCases(examples);
|
|
49
|
+
const allEdgeCases = EDGE_CASES[inputType] || [];
|
|
50
|
+
for (const edgeCase of allEdgeCases) {
|
|
51
|
+
if (!coveredEdgeCases.has(edgeCase)) {
|
|
52
|
+
missingEdgeCases.push(edgeCase);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// Calculate overall score
|
|
56
|
+
let score = 0.5;
|
|
57
|
+
// Adjust for number of examples
|
|
58
|
+
if (examples.length >= this.config.minExamples) {
|
|
59
|
+
score += 0.2;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
score -= 0.2;
|
|
63
|
+
}
|
|
64
|
+
// Adjust for diversity
|
|
65
|
+
score += diversity * 0.2;
|
|
66
|
+
// Adjust for consistency
|
|
67
|
+
score += consistency * 0.1;
|
|
68
|
+
// Penalize for issues
|
|
69
|
+
score -= issues.length * 0.1;
|
|
70
|
+
// Heavy penalty for duplicates (redundant examples)
|
|
71
|
+
const duplicateRatio = (examples.length - uniqueInputs.size) / examples.length;
|
|
72
|
+
if (duplicateRatio > 0.5) {
|
|
73
|
+
score -= 0.5; // Major penalty for mostly duplicates
|
|
74
|
+
}
|
|
75
|
+
else if (duplicateRatio > 0) {
|
|
76
|
+
score -= 0.2; // Minor penalty for some duplicates
|
|
77
|
+
}
|
|
78
|
+
// Clamp score
|
|
79
|
+
score = Math.max(0, Math.min(1, score));
|
|
80
|
+
return {
|
|
81
|
+
score,
|
|
82
|
+
diversity,
|
|
83
|
+
consistency,
|
|
84
|
+
issues,
|
|
85
|
+
missingEdgeCases,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
suggestAdditionalExamples(examples, maxSuggestions = 5) {
|
|
89
|
+
const suggestions = [];
|
|
90
|
+
const inputType = this.detectType(examples[0]?.input);
|
|
91
|
+
// Check for empty/zero case
|
|
92
|
+
const hasEmptyCase = examples.some(e => {
|
|
93
|
+
if (typeof e.input === 'string')
|
|
94
|
+
return e.input === '';
|
|
95
|
+
if (Array.isArray(e.input))
|
|
96
|
+
return e.input.length === 0;
|
|
97
|
+
if (typeof e.input === 'number')
|
|
98
|
+
return e.input === 0;
|
|
99
|
+
return false;
|
|
100
|
+
});
|
|
101
|
+
if (!hasEmptyCase) {
|
|
102
|
+
if (inputType === 'string') {
|
|
103
|
+
suggestions.push({
|
|
104
|
+
input: '',
|
|
105
|
+
reason: 'Missing empty string edge case',
|
|
106
|
+
priority: 'high',
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
else if (inputType === 'array') {
|
|
110
|
+
suggestions.push({
|
|
111
|
+
input: [],
|
|
112
|
+
reason: 'Missing empty array edge case',
|
|
113
|
+
priority: 'high',
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
// Suggest numeric content for strings
|
|
118
|
+
if (inputType === 'string') {
|
|
119
|
+
const hasNumericInput = examples.some(e => typeof e.input === 'string' && /\d/.test(e.input));
|
|
120
|
+
if (!hasNumericInput) {
|
|
121
|
+
suggestions.push({
|
|
122
|
+
input: 'test123',
|
|
123
|
+
reason: 'Missing numeric content in string examples',
|
|
124
|
+
priority: 'medium',
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
// Suggest negative numbers
|
|
129
|
+
if (inputType === 'array') {
|
|
130
|
+
const hasNegative = examples.some(e => Array.isArray(e.input) && e.input.some(n => n < 0));
|
|
131
|
+
if (!hasNegative) {
|
|
132
|
+
suggestions.push({
|
|
133
|
+
input: [-1, -2, -3],
|
|
134
|
+
reason: 'Missing negative number examples',
|
|
135
|
+
priority: 'medium',
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
// Suggest special characters
|
|
140
|
+
if (inputType === 'string') {
|
|
141
|
+
const hasSpecialChars = examples.some(e => typeof e.input === 'string' && /[!@#$%^&*]/.test(e.input));
|
|
142
|
+
if (!hasSpecialChars) {
|
|
143
|
+
suggestions.push({
|
|
144
|
+
input: 'test@example!',
|
|
145
|
+
reason: 'Missing special character examples',
|
|
146
|
+
priority: 'low',
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
// Suggest whitespace handling
|
|
151
|
+
if (inputType === 'string') {
|
|
152
|
+
const hasWhitespace = examples.some(e => typeof e.input === 'string' && /^\s|\s$/.test(e.input));
|
|
153
|
+
if (!hasWhitespace) {
|
|
154
|
+
suggestions.push({
|
|
155
|
+
input: ' padded ',
|
|
156
|
+
reason: 'Missing whitespace handling examples',
|
|
157
|
+
priority: 'low',
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return suggestions.slice(0, maxSuggestions);
|
|
162
|
+
}
|
|
163
|
+
detectAmbiguity(examples) {
|
|
164
|
+
const ambiguities = [];
|
|
165
|
+
// Check for type ambiguity (string to number conversion)
|
|
166
|
+
const hasTypeConversion = examples.some(e => {
|
|
167
|
+
const inputType = typeof e.input;
|
|
168
|
+
const outputType = typeof e.output;
|
|
169
|
+
return inputType !== outputType;
|
|
170
|
+
});
|
|
171
|
+
if (hasTypeConversion && examples.length < 3) {
|
|
172
|
+
ambiguities.push({
|
|
173
|
+
type: 'type-ambiguity',
|
|
174
|
+
description: 'Type conversion detected with insufficient examples',
|
|
175
|
+
possibleInterpretations: [
|
|
176
|
+
'Direct type conversion (e.g., parseInt)',
|
|
177
|
+
'Custom parsing logic',
|
|
178
|
+
'Format-specific conversion',
|
|
179
|
+
],
|
|
180
|
+
suggestedDisambiguation: [
|
|
181
|
+
{ input: '0', output: 0 },
|
|
182
|
+
{ input: '-42', output: -42 },
|
|
183
|
+
{ input: '3.14', output: 3 },
|
|
184
|
+
],
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
// Check for capitalization ambiguity
|
|
188
|
+
const stringExamples = examples.filter(e => typeof e.input === 'string' && typeof e.output === 'string');
|
|
189
|
+
if (stringExamples.length === 1) {
|
|
190
|
+
const [ex] = stringExamples;
|
|
191
|
+
const input = ex.input;
|
|
192
|
+
const output = ex.output;
|
|
193
|
+
// Check if it's ambiguous capitalization
|
|
194
|
+
if (output !== input.toUpperCase() &&
|
|
195
|
+
output !== input.toLowerCase() &&
|
|
196
|
+
output.charAt(0) === input.charAt(0).toUpperCase()) {
|
|
197
|
+
ambiguities.push({
|
|
198
|
+
type: 'semantic-ambiguity',
|
|
199
|
+
description: 'Capitalization pattern unclear',
|
|
200
|
+
possibleInterpretations: [
|
|
201
|
+
'Title case (capitalize first letter of each word)',
|
|
202
|
+
'Sentence case (capitalize first letter only)',
|
|
203
|
+
'Custom capitalization rules',
|
|
204
|
+
],
|
|
205
|
+
suggestedDisambiguation: [
|
|
206
|
+
{ input: 'hello world', output: 'Hello World' },
|
|
207
|
+
{ input: 'test case', output: 'Test Case' },
|
|
208
|
+
{ input: 'ALL CAPS', output: 'All Caps' },
|
|
209
|
+
],
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
// No ambiguity for clear uppercase transformation
|
|
214
|
+
if (stringExamples.length >= 3) {
|
|
215
|
+
const allUppercase = stringExamples.every(e => e.output === e.input.toUpperCase());
|
|
216
|
+
if (allUppercase) {
|
|
217
|
+
// Clear transformation, no ambiguity
|
|
218
|
+
return [];
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return ambiguities;
|
|
222
|
+
}
|
|
223
|
+
getExampleCoverage(examples) {
|
|
224
|
+
const inputTypes = new Set();
|
|
225
|
+
const edgeCases = [];
|
|
226
|
+
for (const example of examples) {
|
|
227
|
+
inputTypes.add(this.detectType(example.input));
|
|
228
|
+
}
|
|
229
|
+
// Check covered edge cases
|
|
230
|
+
const coveredEdgeCases = this.detectCoveredEdgeCases(examples);
|
|
231
|
+
edgeCases.push(...coveredEdgeCases);
|
|
232
|
+
// Calculate total coverage
|
|
233
|
+
const possibleEdgeCases = Array.from(inputTypes)
|
|
234
|
+
.flatMap(t => EDGE_CASES[t] || []);
|
|
235
|
+
const totalCoverage = possibleEdgeCases.length > 0
|
|
236
|
+
? edgeCases.length / possibleEdgeCases.length
|
|
237
|
+
: examples.length >= 3 ? 0.5 : 0.2;
|
|
238
|
+
return {
|
|
239
|
+
inputTypes: Array.from(inputTypes),
|
|
240
|
+
edgeCases,
|
|
241
|
+
totalCoverage: Math.min(1, totalCoverage),
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Detect type of value
|
|
246
|
+
*/
|
|
247
|
+
detectType(value) {
|
|
248
|
+
if (value === null)
|
|
249
|
+
return 'null';
|
|
250
|
+
if (value === undefined)
|
|
251
|
+
return 'undefined';
|
|
252
|
+
if (Array.isArray(value))
|
|
253
|
+
return 'array';
|
|
254
|
+
return typeof value;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Calculate diversity score
|
|
258
|
+
*/
|
|
259
|
+
calculateDiversity(examples) {
|
|
260
|
+
if (examples.length <= 1)
|
|
261
|
+
return 0;
|
|
262
|
+
// Check type diversity
|
|
263
|
+
const inputTypes = new Set(examples.map(e => this.detectType(e.input)));
|
|
264
|
+
const typeDiversity = inputTypes.size / Math.max(3, examples.length);
|
|
265
|
+
// Check value diversity for same types
|
|
266
|
+
const stringInputs = examples
|
|
267
|
+
.filter(e => typeof e.input === 'string')
|
|
268
|
+
.map(e => e.input.length);
|
|
269
|
+
let lengthDiversity = 0;
|
|
270
|
+
if (stringInputs.length > 1) {
|
|
271
|
+
const minLen = Math.min(...stringInputs);
|
|
272
|
+
const maxLen = Math.max(...stringInputs);
|
|
273
|
+
lengthDiversity = minLen === maxLen ? 0 : 0.5;
|
|
274
|
+
}
|
|
275
|
+
return Math.min(1, typeDiversity + lengthDiversity);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Calculate consistency score
|
|
279
|
+
*/
|
|
280
|
+
calculateConsistency(examples) {
|
|
281
|
+
if (examples.length <= 1)
|
|
282
|
+
return 1;
|
|
283
|
+
// Check if transformation is consistent
|
|
284
|
+
const stringExamples = examples.filter(e => typeof e.input === 'string' && typeof e.output === 'string');
|
|
285
|
+
if (stringExamples.length >= 2) {
|
|
286
|
+
// Check if all follow same pattern (e.g., all uppercase)
|
|
287
|
+
const patterns = stringExamples.map(e => {
|
|
288
|
+
const input = e.input;
|
|
289
|
+
const output = e.output;
|
|
290
|
+
if (output === input.toUpperCase())
|
|
291
|
+
return 'uppercase';
|
|
292
|
+
if (output === input.toLowerCase())
|
|
293
|
+
return 'lowercase';
|
|
294
|
+
return 'other';
|
|
295
|
+
});
|
|
296
|
+
const uniquePatterns = new Set(patterns);
|
|
297
|
+
return uniquePatterns.size === 1 ? 1 : 0.5;
|
|
298
|
+
}
|
|
299
|
+
return 0.8; // Default for non-string types
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Detect which edge cases are covered
|
|
303
|
+
*/
|
|
304
|
+
detectCoveredEdgeCases(examples) {
|
|
305
|
+
const covered = new Set();
|
|
306
|
+
for (const example of examples) {
|
|
307
|
+
const input = example.input;
|
|
308
|
+
// String edge cases
|
|
309
|
+
if (typeof input === 'string') {
|
|
310
|
+
if (input === '')
|
|
311
|
+
covered.add('empty');
|
|
312
|
+
if (/^\s*$/.test(input) && input !== '')
|
|
313
|
+
covered.add('whitespace');
|
|
314
|
+
if (/[!@#$%^&*]/.test(input))
|
|
315
|
+
covered.add('special-chars');
|
|
316
|
+
if (/[\u0080-\uffff]/.test(input))
|
|
317
|
+
covered.add('unicode');
|
|
318
|
+
if (/\d/.test(input))
|
|
319
|
+
covered.add('numeric-string');
|
|
320
|
+
}
|
|
321
|
+
// Number edge cases
|
|
322
|
+
if (typeof input === 'number') {
|
|
323
|
+
if (input === 0)
|
|
324
|
+
covered.add('zero');
|
|
325
|
+
if (input < 0)
|
|
326
|
+
covered.add('negative');
|
|
327
|
+
if (input > 1000000)
|
|
328
|
+
covered.add('large');
|
|
329
|
+
if (!Number.isInteger(input))
|
|
330
|
+
covered.add('decimal');
|
|
331
|
+
if (!Number.isFinite(input))
|
|
332
|
+
covered.add('infinity');
|
|
333
|
+
}
|
|
334
|
+
// Array edge cases
|
|
335
|
+
if (Array.isArray(input)) {
|
|
336
|
+
if (input.length === 0)
|
|
337
|
+
covered.add('empty');
|
|
338
|
+
if (input.length === 1)
|
|
339
|
+
covered.add('single-element');
|
|
340
|
+
if (input.length > 100)
|
|
341
|
+
covered.add('large');
|
|
342
|
+
if (input.some(Array.isArray))
|
|
343
|
+
covered.add('nested');
|
|
344
|
+
const types = new Set(input.map(i => typeof i));
|
|
345
|
+
if (types.size > 1)
|
|
346
|
+
covered.add('mixed-types');
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
return covered;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Create example analyzer
|
|
354
|
+
*/
|
|
355
|
+
export function createExampleAnalyzer(config) {
|
|
356
|
+
return new DefaultExampleAnalyzer(config);
|
|
357
|
+
}
|
|
358
|
+
//# sourceMappingURL=ExampleAnalyzer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExampleAnalyzer.js","sourceRoot":"","sources":["../../src/analysis/ExampleAnalyzer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAkFH;;GAEG;AACH,MAAM,cAAc,GAA0B;IAC5C,WAAW,EAAE,CAAC;IACd,kBAAkB,EAAE,GAAG;CACxB,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,GAAG;IACjB,MAAM,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,gBAAgB,CAAC;IAC7E,MAAM,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC;IAC5D,KAAK,EAAE,CAAC,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,CAAC;CACrE,CAAC;AAEF;;GAEG;AACH,MAAM,sBAAsB;IACT,MAAM,CAAwB;IAE/C,YAAY,SAAgC,cAAc;QACxD,IAAI,CAAC,MAAM,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,MAAM,EAAE,CAAC;IACjD,CAAC;IAED,cAAc,CAAC,QAAmB;QAChC,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,MAAM,gBAAgB,GAAa,EAAE,CAAC;QAEtC,yBAAyB;QACzB,IAAI,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;YAC9C,MAAM,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;QACvC,CAAC;QAED,u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B,CAAC,CAAC;AACrE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Analysis Module
|
|
3
|
+
* @module @nahisaho/musubix-synthesis
|
|
4
|
+
* @description Example analysis components
|
|
5
|
+
* Traces to: DES-SY-105
|
|
6
|
+
*/
|
|
7
|
+
export { createExampleAnalyzer, } from './ExampleAnalyzer.js';
|
|
8
|
+
export type { ExampleAnalyzer, ExampleAnalyzerConfig, ExampleQuality, Ambiguity, ExampleSuggestion, ExampleCoverage, Example, } from './ExampleAnalyzer.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/analysis/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,OAAO,GACR,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/analysis/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,qBAAqB,GACtB,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSLExtender
|
|
3
|
+
* @module @nahisaho/musubix-synthesis
|
|
4
|
+
* @description DSL grammar extension capabilities
|
|
5
|
+
* Traces to: TSK-SY-104, DES-SY-104, REQ-SY-104
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* DSL expressiveness gap
|
|
9
|
+
*/
|
|
10
|
+
export interface DSLGap {
|
|
11
|
+
type: 'missing-operator' | 'type-conversion' | 'composition';
|
|
12
|
+
severity: 'low' | 'medium' | 'high';
|
|
13
|
+
description: string;
|
|
14
|
+
suggestedFix?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Operator suggestion
|
|
18
|
+
*/
|
|
19
|
+
export interface OperatorSuggestion {
|
|
20
|
+
name: string;
|
|
21
|
+
signature: string;
|
|
22
|
+
confidence: number;
|
|
23
|
+
description: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Operator validation result
|
|
27
|
+
*/
|
|
28
|
+
export interface OperatorValidationResult {
|
|
29
|
+
valid: boolean;
|
|
30
|
+
error?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Example input/output pair
|
|
34
|
+
*/
|
|
35
|
+
export interface Example {
|
|
36
|
+
input: unknown;
|
|
37
|
+
output: unknown;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Configuration for DSL extender
|
|
41
|
+
*/
|
|
42
|
+
export interface DSLExtenderConfig {
|
|
43
|
+
maxSuggestions: number;
|
|
44
|
+
minConfidence: number;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* DSL extender interface
|
|
48
|
+
*/
|
|
49
|
+
export interface DSLExtender {
|
|
50
|
+
/**
|
|
51
|
+
* Analyze gap between DSL capabilities and required transformation
|
|
52
|
+
*/
|
|
53
|
+
analyzeGap(examples: Example[], dslOperators: string[]): DSLGap[];
|
|
54
|
+
/**
|
|
55
|
+
* Suggest operators to fill gaps
|
|
56
|
+
*/
|
|
57
|
+
suggestOperators(examples: Example[]): OperatorSuggestion[];
|
|
58
|
+
/**
|
|
59
|
+
* Generate code for suggested operator
|
|
60
|
+
*/
|
|
61
|
+
generateOperatorCode(suggestion: OperatorSuggestion): string;
|
|
62
|
+
/**
|
|
63
|
+
* Get list of known operators
|
|
64
|
+
*/
|
|
65
|
+
getAvailableOperators(): string[];
|
|
66
|
+
/**
|
|
67
|
+
* Get operators grouped by category
|
|
68
|
+
*/
|
|
69
|
+
getOperatorCategories(): Record<string, string[]>;
|
|
70
|
+
/**
|
|
71
|
+
* Validate an operator implementation
|
|
72
|
+
*/
|
|
73
|
+
validateOperator(name: string, signature: string, implementation: (...args: unknown[]) => unknown): OperatorValidationResult;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Create DSL extender
|
|
77
|
+
*/
|
|
78
|
+
export declare function createDSLExtender(config?: Partial<DSLExtenderConfig>): DSLExtender;
|
|
79
|
+
//# sourceMappingURL=DSLExtender.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DSLExtender.d.ts","sourceRoot":"","sources":["../../src/dsl/DSLExtender.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,kBAAkB,GAAG,iBAAiB,GAAG,aAAa,CAAC;IAC7D,QAAQ,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,UAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,MAA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