@nahisaho/musubix-lean 1.8.5
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/converters/EarsToLeanConverter.d.ts +61 -0
- package/dist/converters/EarsToLeanConverter.d.ts.map +1 -0
- package/dist/converters/EarsToLeanConverter.js +300 -0
- package/dist/converters/EarsToLeanConverter.js.map +1 -0
- package/dist/converters/TypeScriptSpecifier.d.ts +63 -0
- package/dist/converters/TypeScriptSpecifier.d.ts.map +1 -0
- package/dist/converters/TypeScriptSpecifier.js +307 -0
- package/dist/converters/TypeScriptSpecifier.js.map +1 -0
- package/dist/converters/index.d.ts +7 -0
- package/dist/converters/index.d.ts.map +1 -0
- package/dist/converters/index.js +7 -0
- package/dist/converters/index.js.map +1 -0
- package/dist/environment/LeanEnvironmentDetector.d.ts +57 -0
- package/dist/environment/LeanEnvironmentDetector.d.ts.map +1 -0
- package/dist/environment/LeanEnvironmentDetector.js +221 -0
- package/dist/environment/LeanEnvironmentDetector.js.map +1 -0
- package/dist/environment/LeanProjectInitializer.d.ts +49 -0
- package/dist/environment/LeanProjectInitializer.d.ts.map +1 -0
- package/dist/environment/LeanProjectInitializer.js +232 -0
- package/dist/environment/LeanProjectInitializer.js.map +1 -0
- package/dist/environment/index.d.ts +7 -0
- package/dist/environment/index.d.ts.map +1 -0
- package/dist/environment/index.js +7 -0
- package/dist/environment/index.js.map +1 -0
- package/dist/errors.d.ts +141 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +254 -0
- package/dist/errors.js.map +1 -0
- package/dist/hybrid/HybridVerifier.d.ts +113 -0
- package/dist/hybrid/HybridVerifier.d.ts.map +1 -0
- package/dist/hybrid/HybridVerifier.js +247 -0
- package/dist/hybrid/HybridVerifier.js.map +1 -0
- package/dist/hybrid/index.d.ts +6 -0
- package/dist/hybrid/index.d.ts.map +1 -0
- package/dist/hybrid/index.js +6 -0
- package/dist/hybrid/index.js.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +50 -0
- package/dist/index.js.map +1 -0
- package/dist/infrastructure/LeanFileGenerator.d.ts +70 -0
- package/dist/infrastructure/LeanFileGenerator.d.ts.map +1 -0
- package/dist/infrastructure/LeanFileGenerator.js +253 -0
- package/dist/infrastructure/LeanFileGenerator.js.map +1 -0
- package/dist/infrastructure/LeanRunner.d.ts +93 -0
- package/dist/infrastructure/LeanRunner.d.ts.map +1 -0
- package/dist/infrastructure/LeanRunner.js +296 -0
- package/dist/infrastructure/LeanRunner.js.map +1 -0
- package/dist/infrastructure/index.d.ts +7 -0
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/infrastructure/index.js +7 -0
- package/dist/infrastructure/index.js.map +1 -0
- package/dist/integration/LeanIntegration.d.ts +138 -0
- package/dist/integration/LeanIntegration.d.ts.map +1 -0
- package/dist/integration/LeanIntegration.js +352 -0
- package/dist/integration/LeanIntegration.js.map +1 -0
- package/dist/proof/ProofGenerator.d.ts +53 -0
- package/dist/proof/ProofGenerator.d.ts.map +1 -0
- package/dist/proof/ProofGenerator.js +324 -0
- package/dist/proof/ProofGenerator.js.map +1 -0
- package/dist/proof/ReProverClient.d.ts +58 -0
- package/dist/proof/ReProverClient.d.ts.map +1 -0
- package/dist/proof/ReProverClient.js +260 -0
- package/dist/proof/ReProverClient.js.map +1 -0
- package/dist/proof/index.d.ts +7 -0
- package/dist/proof/index.d.ts.map +1 -0
- package/dist/proof/index.js +7 -0
- package/dist/proof/index.js.map +1 -0
- package/dist/reporting/VerificationReporter.d.ts +89 -0
- package/dist/reporting/VerificationReporter.d.ts.map +1 -0
- package/dist/reporting/VerificationReporter.js +296 -0
- package/dist/reporting/VerificationReporter.js.map +1 -0
- package/dist/reporting/index.d.ts +6 -0
- package/dist/reporting/index.d.ts.map +1 -0
- package/dist/reporting/index.js +6 -0
- package/dist/reporting/index.js.map +1 -0
- package/dist/traceability/TraceabilityManager.d.ts +104 -0
- package/dist/traceability/TraceabilityManager.d.ts.map +1 -0
- package/dist/traceability/TraceabilityManager.js +299 -0
- package/dist/traceability/TraceabilityManager.js.map +1 -0
- package/dist/traceability/index.d.ts +6 -0
- package/dist/traceability/index.d.ts.map +1 -0
- package/dist/traceability/index.js +6 -0
- package/dist/traceability/index.js.map +1 -0
- package/dist/types.d.ts +466 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +17 -0
- package/dist/types.js.map +1 -0
- package/package.json +78 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Core type definitions for musubix-lean package
|
|
3
|
+
* @module @nahisaho/musubix-lean/types
|
|
4
|
+
* @traceability REQ-LEAN-001
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* EARS requirement patterns
|
|
8
|
+
* @traceability REQ-LEAN-CONV-001
|
|
9
|
+
*/
|
|
10
|
+
export type EarsPattern = 'ubiquitous' | 'event-driven' | 'state-driven' | 'unwanted' | 'optional';
|
|
11
|
+
/**
|
|
12
|
+
* Parsed components of an EARS requirement
|
|
13
|
+
*/
|
|
14
|
+
export interface EarsParsedComponents {
|
|
15
|
+
readonly pattern: EarsPattern;
|
|
16
|
+
readonly trigger?: string;
|
|
17
|
+
readonly state?: string;
|
|
18
|
+
readonly condition?: string;
|
|
19
|
+
readonly subject: string;
|
|
20
|
+
readonly action: string;
|
|
21
|
+
readonly negated: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* EARS requirement structure
|
|
25
|
+
* @traceability REQ-LEAN-CONV-001
|
|
26
|
+
*/
|
|
27
|
+
export interface EarsRequirement {
|
|
28
|
+
readonly id: string;
|
|
29
|
+
readonly pattern: EarsPattern;
|
|
30
|
+
readonly text: string;
|
|
31
|
+
readonly parsed?: EarsParsedComponents;
|
|
32
|
+
readonly priority?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Lean version information
|
|
36
|
+
*/
|
|
37
|
+
export interface LeanVersion {
|
|
38
|
+
readonly major: number;
|
|
39
|
+
readonly minor: number;
|
|
40
|
+
readonly patch: number;
|
|
41
|
+
readonly full: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Lean 4 environment information
|
|
45
|
+
* @traceability REQ-LEAN-CORE-001
|
|
46
|
+
*/
|
|
47
|
+
export interface LeanEnvironmentInfo {
|
|
48
|
+
readonly installed: boolean;
|
|
49
|
+
readonly version: LeanVersion | null;
|
|
50
|
+
readonly path: string | null;
|
|
51
|
+
readonly lakeVersion: string | null;
|
|
52
|
+
readonly mathlibAvailable: boolean;
|
|
53
|
+
readonly leanInstalled?: boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Lean hypothesis (assumption)
|
|
57
|
+
*/
|
|
58
|
+
export interface LeanHypothesis {
|
|
59
|
+
readonly name: string;
|
|
60
|
+
readonly type: string;
|
|
61
|
+
readonly leanCode?: string;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Lean expression
|
|
65
|
+
*/
|
|
66
|
+
export interface LeanExpression {
|
|
67
|
+
readonly type: string;
|
|
68
|
+
readonly leanCode: string;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Lean theorem structure
|
|
72
|
+
* @traceability REQ-LEAN-CONV-001
|
|
73
|
+
*/
|
|
74
|
+
export interface LeanTheorem {
|
|
75
|
+
readonly id: string;
|
|
76
|
+
readonly name: string;
|
|
77
|
+
readonly statement: string;
|
|
78
|
+
readonly requirementId: string;
|
|
79
|
+
readonly hypotheses: LeanHypothesis[];
|
|
80
|
+
readonly conclusion?: LeanExpression;
|
|
81
|
+
readonly description?: string;
|
|
82
|
+
readonly sourceText?: string;
|
|
83
|
+
readonly leanCode: string;
|
|
84
|
+
readonly proof?: LeanProof;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Lean proof structure
|
|
88
|
+
*/
|
|
89
|
+
export interface LeanProof {
|
|
90
|
+
readonly id: string;
|
|
91
|
+
readonly theoremId: string;
|
|
92
|
+
readonly tactics: string[];
|
|
93
|
+
readonly leanCode: string;
|
|
94
|
+
readonly isComplete: boolean;
|
|
95
|
+
readonly generatedAt: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Lean proof sketch with sorry markers
|
|
99
|
+
* @traceability REQ-LEAN-PROOF-003
|
|
100
|
+
*/
|
|
101
|
+
export interface LeanProofSketch {
|
|
102
|
+
readonly theoremName: string;
|
|
103
|
+
readonly partialProof: string;
|
|
104
|
+
readonly sorryLocations: SorryLocation[];
|
|
105
|
+
readonly hints: string[];
|
|
106
|
+
readonly completionRate: number;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Location of a sorry marker in proof
|
|
110
|
+
*/
|
|
111
|
+
export interface SorryLocation {
|
|
112
|
+
readonly line: number;
|
|
113
|
+
readonly expectedType: string;
|
|
114
|
+
readonly hint: string;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Proof state during construction
|
|
118
|
+
*/
|
|
119
|
+
export interface ProofState {
|
|
120
|
+
readonly goals: ProofGoal[];
|
|
121
|
+
readonly hypotheses: LeanHypothesis[];
|
|
122
|
+
readonly currentGoal: number;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* A single proof goal
|
|
126
|
+
*/
|
|
127
|
+
export interface ProofGoal {
|
|
128
|
+
readonly id: number;
|
|
129
|
+
readonly type: string;
|
|
130
|
+
readonly leanCode: string;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* TypeScript parameter
|
|
134
|
+
*/
|
|
135
|
+
export interface TypeScriptParameter {
|
|
136
|
+
readonly name: string;
|
|
137
|
+
readonly type: string;
|
|
138
|
+
readonly optional: boolean;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* TypeScript function structure
|
|
142
|
+
* @traceability REQ-LEAN-TS-001
|
|
143
|
+
*/
|
|
144
|
+
export interface TypeScriptFunction {
|
|
145
|
+
readonly name: string;
|
|
146
|
+
readonly filePath?: string;
|
|
147
|
+
readonly parameters: TypeScriptParameter[];
|
|
148
|
+
readonly returnType: string;
|
|
149
|
+
readonly preconditions: Precondition[];
|
|
150
|
+
readonly postconditions: Postcondition[];
|
|
151
|
+
readonly invariants: Invariant[];
|
|
152
|
+
readonly sourceCode?: string;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Precondition annotation
|
|
156
|
+
* @traceability REQ-LEAN-TS-002
|
|
157
|
+
*/
|
|
158
|
+
export interface Precondition {
|
|
159
|
+
readonly expression: string;
|
|
160
|
+
readonly condition?: string;
|
|
161
|
+
readonly description: string;
|
|
162
|
+
readonly source?: 'jsdoc' | 'type-guard' | 'validation';
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Postcondition annotation
|
|
166
|
+
* @traceability REQ-LEAN-TS-003
|
|
167
|
+
*/
|
|
168
|
+
export interface Postcondition {
|
|
169
|
+
readonly expression: string;
|
|
170
|
+
readonly condition?: string;
|
|
171
|
+
readonly description: string;
|
|
172
|
+
readonly source?: 'jsdoc' | 'return-type' | 'result-type';
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Class invariant
|
|
176
|
+
* @traceability REQ-LEAN-TS-004
|
|
177
|
+
*/
|
|
178
|
+
export interface Invariant {
|
|
179
|
+
readonly expression: string;
|
|
180
|
+
readonly condition?: string;
|
|
181
|
+
readonly description: string;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* TypeScript specification for conversion
|
|
185
|
+
*/
|
|
186
|
+
export interface TypeScriptSpec {
|
|
187
|
+
readonly filePath?: string;
|
|
188
|
+
readonly code?: string;
|
|
189
|
+
readonly functions?: TypeScriptFunction[];
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Lean function specification
|
|
193
|
+
* @traceability REQ-LEAN-TS-001
|
|
194
|
+
*/
|
|
195
|
+
export interface LeanFunctionSpec {
|
|
196
|
+
readonly functionName: string;
|
|
197
|
+
readonly typeSignature: string;
|
|
198
|
+
readonly preconditionHypotheses: LeanHypothesis[];
|
|
199
|
+
readonly postconditionGoal: LeanExpression;
|
|
200
|
+
readonly leanCode: string;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Proof strategy configuration
|
|
204
|
+
* @traceability REQ-LEAN-PROOF-001
|
|
205
|
+
*/
|
|
206
|
+
export interface ProofStrategy {
|
|
207
|
+
readonly name: string;
|
|
208
|
+
readonly tactics: string[];
|
|
209
|
+
readonly applicability?: (theorem: LeanTheorem) => boolean;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Proof generation options
|
|
213
|
+
*/
|
|
214
|
+
export interface ProofOptions {
|
|
215
|
+
readonly timeout?: number;
|
|
216
|
+
readonly maxTactics?: number;
|
|
217
|
+
readonly strategies?: ProofStrategy[];
|
|
218
|
+
readonly useReProver?: boolean;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Result of proof attempt
|
|
222
|
+
* @traceability REQ-LEAN-PROOF-001
|
|
223
|
+
*/
|
|
224
|
+
export interface ProofResult {
|
|
225
|
+
readonly success: boolean;
|
|
226
|
+
readonly proof: LeanProof | null;
|
|
227
|
+
readonly proofState: ProofState | null;
|
|
228
|
+
readonly tacticsAttempted: string[];
|
|
229
|
+
readonly duration: number;
|
|
230
|
+
readonly error?: string;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Result of tactic application
|
|
234
|
+
*/
|
|
235
|
+
export interface TacticResult {
|
|
236
|
+
readonly success: boolean;
|
|
237
|
+
readonly newState: ProofState | null;
|
|
238
|
+
readonly error?: string;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* ReProver configuration
|
|
242
|
+
* @traceability REQ-LEAN-REPROVER-001
|
|
243
|
+
*/
|
|
244
|
+
export interface ReProverConfig {
|
|
245
|
+
readonly endpoint: string;
|
|
246
|
+
readonly timeout: number;
|
|
247
|
+
readonly maxDepth: number;
|
|
248
|
+
readonly apiKey?: string;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Search node in proof tree
|
|
252
|
+
*/
|
|
253
|
+
export interface SearchNode {
|
|
254
|
+
readonly tactic: string;
|
|
255
|
+
readonly state: ProofState;
|
|
256
|
+
readonly score: number;
|
|
257
|
+
readonly children: SearchNode[];
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* ReProver search result
|
|
261
|
+
* @traceability REQ-LEAN-REPROVER-002
|
|
262
|
+
*/
|
|
263
|
+
export interface ReProverSearchResult {
|
|
264
|
+
readonly found: boolean;
|
|
265
|
+
readonly proof: string | null;
|
|
266
|
+
readonly searchPath: SearchNode[];
|
|
267
|
+
readonly suggestions: string[];
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Proof feedback for failed attempts
|
|
271
|
+
* @traceability REQ-LEAN-REPROVER-003
|
|
272
|
+
*/
|
|
273
|
+
export interface ProofFeedback {
|
|
274
|
+
readonly stuckState: ProofState;
|
|
275
|
+
readonly attemptedTactics: string[];
|
|
276
|
+
readonly similarTheorems: string[];
|
|
277
|
+
readonly guidance: string[];
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Verification result for a single theorem
|
|
281
|
+
*/
|
|
282
|
+
export interface VerificationResult {
|
|
283
|
+
readonly theoremId: string;
|
|
284
|
+
readonly status: 'proved' | 'incomplete' | 'error';
|
|
285
|
+
readonly proof?: LeanProof;
|
|
286
|
+
readonly errors: string[];
|
|
287
|
+
readonly warnings: string[];
|
|
288
|
+
readonly duration: number;
|
|
289
|
+
readonly feedback?: ProofFeedback;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Report statistics
|
|
293
|
+
*/
|
|
294
|
+
export interface ReportStatistics {
|
|
295
|
+
readonly totalTheorems: number;
|
|
296
|
+
readonly provedCount: number;
|
|
297
|
+
readonly failedCount: number;
|
|
298
|
+
readonly incompleteCount: number;
|
|
299
|
+
readonly averageProofTime: number;
|
|
300
|
+
readonly totalTime: number;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Verification report format
|
|
304
|
+
*/
|
|
305
|
+
export type ReportFormat = 'json' | 'markdown' | 'html' | 'csv';
|
|
306
|
+
/**
|
|
307
|
+
* Verification report
|
|
308
|
+
* @traceability REQ-LEAN-FEEDBACK-001
|
|
309
|
+
*/
|
|
310
|
+
export interface VerificationReport {
|
|
311
|
+
readonly id: string;
|
|
312
|
+
readonly timestamp: string;
|
|
313
|
+
readonly results: VerificationResult[];
|
|
314
|
+
readonly statistics: ReportStatistics;
|
|
315
|
+
readonly executionDetails: {
|
|
316
|
+
totalDuration: number;
|
|
317
|
+
leanVersion: string;
|
|
318
|
+
systemInfo: Record<string, string>;
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Counterexample for failed verification
|
|
323
|
+
* @traceability REQ-LEAN-FEEDBACK-003
|
|
324
|
+
*/
|
|
325
|
+
export interface Counterexample {
|
|
326
|
+
readonly values: Record<string, unknown>;
|
|
327
|
+
readonly violatedCondition: string;
|
|
328
|
+
readonly typescriptReproduction: string;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Diagnostic information
|
|
332
|
+
*/
|
|
333
|
+
export interface Diagnostic {
|
|
334
|
+
readonly severity: 'error' | 'warning' | 'info';
|
|
335
|
+
readonly message: string;
|
|
336
|
+
readonly line?: number;
|
|
337
|
+
readonly column?: number;
|
|
338
|
+
readonly suggestion?: string;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Traceability artifact types
|
|
342
|
+
*/
|
|
343
|
+
export type ArtifactType = 'requirement' | 'theorem' | 'proof' | 'code' | 'test';
|
|
344
|
+
/**
|
|
345
|
+
* Traceability artifact
|
|
346
|
+
*/
|
|
347
|
+
export interface TraceabilityArtifact {
|
|
348
|
+
readonly id: string;
|
|
349
|
+
readonly type: ArtifactType;
|
|
350
|
+
readonly content?: string;
|
|
351
|
+
readonly name?: string;
|
|
352
|
+
readonly version?: string;
|
|
353
|
+
metadata?: Record<string, unknown>;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Traceability link type
|
|
357
|
+
*/
|
|
358
|
+
export type LinkType = 'derives' | 'satisfies' | 'verifies' | 'tests' | 'requirement_to_theorem' | 'theorem_to_proof' | 'theorem_to_code' | 'requirement_to_code' | 'proof_to_verification';
|
|
359
|
+
/**
|
|
360
|
+
* Link between artifacts
|
|
361
|
+
* @traceability REQ-LEAN-INTEG-002
|
|
362
|
+
*/
|
|
363
|
+
export interface TraceabilityLink {
|
|
364
|
+
readonly id: string;
|
|
365
|
+
readonly source: string;
|
|
366
|
+
readonly target: string;
|
|
367
|
+
readonly type: LinkType;
|
|
368
|
+
readonly confidence: number;
|
|
369
|
+
readonly createdAt?: string;
|
|
370
|
+
metadata?: Record<string, unknown>;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Traceability matrix
|
|
374
|
+
* @traceability REQ-LEAN-INTEG-002
|
|
375
|
+
*/
|
|
376
|
+
export interface TraceabilityMatrix {
|
|
377
|
+
readonly links: TraceabilityLink[];
|
|
378
|
+
readonly coverage: number;
|
|
379
|
+
readonly lastUpdated: Date;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Verification target classification
|
|
383
|
+
* @traceability REQ-LEAN-INTEG-001
|
|
384
|
+
*/
|
|
385
|
+
export type VerificationTarget = 'z3' | 'lean' | 'both';
|
|
386
|
+
/**
|
|
387
|
+
* Classification result
|
|
388
|
+
*/
|
|
389
|
+
export interface ClassificationResult {
|
|
390
|
+
readonly target: VerificationTarget;
|
|
391
|
+
readonly reason: string;
|
|
392
|
+
readonly confidence: number;
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Property to verify
|
|
396
|
+
*/
|
|
397
|
+
export interface Property {
|
|
398
|
+
readonly id: string;
|
|
399
|
+
readonly expression: string;
|
|
400
|
+
readonly type: 'precondition' | 'postcondition' | 'invariant' | 'theorem';
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Combined verification result
|
|
404
|
+
*/
|
|
405
|
+
export interface HybridVerificationResult {
|
|
406
|
+
readonly functionId: string;
|
|
407
|
+
readonly runtimeResult?: {
|
|
408
|
+
passed: boolean;
|
|
409
|
+
testCount: number;
|
|
410
|
+
failedTests: string[];
|
|
411
|
+
coverage: number;
|
|
412
|
+
duration: number;
|
|
413
|
+
};
|
|
414
|
+
readonly formalResult?: {
|
|
415
|
+
proved: boolean;
|
|
416
|
+
proof?: string;
|
|
417
|
+
errors: string[];
|
|
418
|
+
duration: number;
|
|
419
|
+
};
|
|
420
|
+
readonly combinedStatus: 'verified' | 'failed' | 'partial' | 'pending' | 'unknown';
|
|
421
|
+
readonly coverage: {
|
|
422
|
+
runtimeCoverage: number;
|
|
423
|
+
formalCoverage: number;
|
|
424
|
+
combinedCoverage: number;
|
|
425
|
+
uncoveredPaths?: string[];
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Lean package configuration
|
|
430
|
+
*/
|
|
431
|
+
export interface LeanConfig {
|
|
432
|
+
/** Lean 4 executable path (auto-detected if not specified) */
|
|
433
|
+
leanPath?: string;
|
|
434
|
+
/** Project path */
|
|
435
|
+
projectPath?: string;
|
|
436
|
+
/** Minimum required Lean version */
|
|
437
|
+
minVersion?: string;
|
|
438
|
+
/** Default proof timeout in milliseconds */
|
|
439
|
+
timeout?: number;
|
|
440
|
+
/** Enable Lake */
|
|
441
|
+
lakeEnabled?: boolean;
|
|
442
|
+
/** Include Mathlib dependency */
|
|
443
|
+
mathlibEnabled?: boolean;
|
|
444
|
+
/** ReProver configuration */
|
|
445
|
+
reprover?: ReProverConfig;
|
|
446
|
+
/** Output directory for generated Lean files */
|
|
447
|
+
outputDir?: string;
|
|
448
|
+
/** Verbose logging */
|
|
449
|
+
verbose?: boolean;
|
|
450
|
+
/** Verification strategy */
|
|
451
|
+
strategy?: 'lean-only' | 'hybrid' | 'z3-fallback';
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Default configuration values
|
|
455
|
+
*/
|
|
456
|
+
export declare const DEFAULT_LEAN_CONFIG: LeanConfig;
|
|
457
|
+
/**
|
|
458
|
+
* Lean runner options
|
|
459
|
+
* @traceability REQ-LEAN-CORE-004
|
|
460
|
+
*/
|
|
461
|
+
export interface LeanRunnerOptions {
|
|
462
|
+
readonly timeout: number;
|
|
463
|
+
readonly cwd?: string;
|
|
464
|
+
readonly env?: Record<string, string>;
|
|
465
|
+
}
|
|
466
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH;;;GAGG;AACH,MAAM,MAAM,WAAW,GACnB,YAAY,GACZ,cAAc,GACd,cAAc,GACd,UAAU,GACV,UAAU,CAAC;AAEf;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,oBAAoB,CAAC;IACvC,QAAQ,CA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ChC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Core type definitions for musubix-lean package
|
|
3
|
+
* @module @nahisaho/musubix-lean/types
|
|
4
|
+
* @traceability REQ-LEAN-001
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Default configuration values
|
|
8
|
+
*/
|
|
9
|
+
export const DEFAULT_LEAN_CONFIG = {
|
|
10
|
+
minVersion: '4.0.0',
|
|
11
|
+
timeout: 30000,
|
|
12
|
+
outputDir: '.musubix/lean',
|
|
13
|
+
mathlibEnabled: false,
|
|
14
|
+
lakeEnabled: true,
|
|
15
|
+
strategy: 'hybrid',
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAyiBH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAe;IAC7C,UAAU,EAAE,OAAO;IACnB,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,eAAe;IAC1B,cAAc,EAAE,KAAK;IACrB,WAAW,EAAE,IAAI;IACjB,QAAQ,EAAE,QAAQ;CACnB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@nahisaho/musubix-lean",
|
|
3
|
+
"version": "1.8.5",
|
|
4
|
+
"description": "Lean 4 formal verification integration for MUSUBIX - EARS-to-Lean conversion, TypeScript specification, and proof generation",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"./environment": {
|
|
14
|
+
"import": "./dist/environment/index.js",
|
|
15
|
+
"types": "./dist/environment/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./converters": {
|
|
18
|
+
"import": "./dist/converters/index.js",
|
|
19
|
+
"types": "./dist/converters/index.d.ts"
|
|
20
|
+
},
|
|
21
|
+
"./proof": {
|
|
22
|
+
"import": "./dist/proof/index.js",
|
|
23
|
+
"types": "./dist/proof/index.d.ts"
|
|
24
|
+
},
|
|
25
|
+
"./reporting": {
|
|
26
|
+
"import": "./dist/reporting/index.js",
|
|
27
|
+
"types": "./dist/reporting/index.d.ts"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"README.md"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "tsc",
|
|
36
|
+
"test": "vitest run",
|
|
37
|
+
"test:watch": "vitest",
|
|
38
|
+
"test:coverage": "vitest run --coverage",
|
|
39
|
+
"typecheck": "tsc --noEmit",
|
|
40
|
+
"clean": "rm -rf dist",
|
|
41
|
+
"prepublishOnly": "npm run build"
|
|
42
|
+
},
|
|
43
|
+
"keywords": [
|
|
44
|
+
"musubix",
|
|
45
|
+
"lean4",
|
|
46
|
+
"formal-verification",
|
|
47
|
+
"theorem-proving",
|
|
48
|
+
"ears",
|
|
49
|
+
"typescript",
|
|
50
|
+
"specification"
|
|
51
|
+
],
|
|
52
|
+
"author": "nahisaho",
|
|
53
|
+
"license": "MIT",
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "https://github.com/nahisaho/MUSUBIX.git",
|
|
57
|
+
"directory": "packages/lean"
|
|
58
|
+
},
|
|
59
|
+
"bugs": {
|
|
60
|
+
"url": "https://github.com/nahisaho/MUSUBIX/issues"
|
|
61
|
+
},
|
|
62
|
+
"homepage": "https://github.com/nahisaho/MUSUBIX/tree/main/packages/lean#readme",
|
|
63
|
+
"engines": {
|
|
64
|
+
"node": ">=20.0.0"
|
|
65
|
+
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"ts-morph": "^24.0.0",
|
|
68
|
+
"neverthrow": "^8.1.1"
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@types/node": "^22.10.5",
|
|
72
|
+
"typescript": "^5.7.2",
|
|
73
|
+
"vitest": "^4.0.16"
|
|
74
|
+
},
|
|
75
|
+
"peerDependencies": {
|
|
76
|
+
"@nahisaho/musubix-core": "^1.8.0"
|
|
77
|
+
}
|
|
78
|
+
}
|