/** * Comprehensive POWL model validation based on soundness guarantees * from the POWL paper: irreflexivity, transitivity, proper completion, * and no unreachable parts. */ import type { PowlModel } from "./index.js"; export interface ValidationResult { isValid: boolean; errors: ValidationError[]; warnings: ValidationWarning[]; soundness: SoundnessReport; } export interface ValidationError { type: "irreflexivity" | "transitivity" | "syntax" | "reference" | "completion"; message: string; node?: string; severity: "critical" | "error"; } export interface ValidationWarning { type: "reuse" | "complexity" | "naming" | "unreachable"; message: string; node?: string; } export interface SoundnessReport { isSound: boolean; deadlockFree: boolean; properCompletion: boolean; noUnreachableParts: boolean; } /** * Comprehensive POWL model validator * * Checks soundness properties from the POWL paper: * 1. Irreflexivity: No self-loops in partial orders * 2. Transitivity: If A→B and B→C, then A→C * 3. Proper completion: All paths can reach end * 4. No unreachable parts: All nodes reachable from root */ export declare class PowlValidator { /** * Validate a POWL model for soundness and correctness */ static validate(model: PowlModel): ValidationResult; /** * Check for irreflexivity violations (self-loops in partial orders) * * From the POWL paper: Strict partial orders must be irreflexive, * meaning no element is related to itself. */ private static checkIrreflexivity; /** * Check for transitivity violations in partial orders * * From the POWL paper: Strict partial orders must be transitive. * If A→B and B→C, then A→C must be present. */ private static checkTransitivity; /** * Check for unreachable parts (dead code) * * All nodes should be reachable from the root through the tree structure. */ private static checkUnreachableParts; /** * Check for sub-model reuse without proper copying * * POWL models should use copy() when reusing sub-models to avoid * unintended sharing. This is a heuristic check. */ private static checkSubModelReuse; /** * Check proper completion (all paths can reach end) * * This is a simplified check - a full implementation would require * exhaustive path analysis through the model. */ private static checkProperCompletion; /** * Check for syntax errors in the model */ private static checkSyntax; /** * Check for reference integrity (all child references valid) */ private static checkReferences; /** * Get all nodes in the model with their indices */ private static getAllNodes; /** * Compute a structural signature for a node (for duplicate detection) */ private static computeStructureSignature; } /** * Format validation results for display */ export declare function formatValidationResult(result: ValidationResult): string; /** * Get a short validation summary (one line) */ export declare function getValidationSummary(result: ValidationResult): string; //# sourceMappingURL=validation.d.ts.map