import { SYSIDE_RULES, SYSIDE_VERSION, type SysideRule } from '../conformance/generated/syside-rules.js'; import type { MemoModelDTO } from '../model/semantic.js'; export { SYSIDE_RULES, SYSIDE_VERSION }; /** One violation, in the shape a `sysml`-domain diagnostic is built from. */ export interface ConstraintViolation { /** Syside's code, verbatim. */ code: string; message: string; elementId: string; file: string; } export interface SysmlConstraint { /** Syside's code, verbatim — never a MEMO-invented identifier. */ code: string; /** Specification clause this implements, e.g. `KerML 8.3.3.1`. */ clause: string; /** Metaclass or MEMO construct the rule ranges over, for reporting. */ appliesTo: string; /** * What this implementation does *not* catch, where that is known. * * A partially-implemented rule reported as "implemented" is worse than an * unimplemented one: it converts a gap into false confidence. Stating the * limitation in the data means the scoreboard prints it, so the coverage * number is never read as more than it is. */ limitation?: string; check(model: MemoModelDTO): ConstraintViolation[]; } /** Why a published code has no implementation here. */ export type UnimplementedReason = 'blocked' | 'out-of-scope' | 'not-yet'; export interface UnimplementedConstraint { code: string; reason: UnimplementedReason; /** Required: an unexplained gap is indistinguishable from an oversight. */ detail: string; } export declare const IMPLEMENTED_CONSTRAINTS: readonly SysmlConstraint[]; /** * The reasons, keyed by prefix rather than enumerated one by one. * * Most of the 151 fall into a handful of buckets, and a bucket with a reason is * more honest than 147 individual "not yet" entries that all mean the same * thing. `classifyConstraints` applies these to whatever is not implemented. */ export declare const UNIMPLEMENTED_REASONS: readonly { match: RegExp; reason: UnimplementedReason; detail: string; }[]; export interface ConstraintScore { sysideVersion: string; total: number; implemented: SysmlConstraint[]; unimplemented: UnimplementedConstraint[]; /** Implemented codes Syside does not publish — a code MEMO invented. */ unpublished: string[]; byReason: Record; } /** Score the implemented set against the published checklist. */ export declare function classifyConstraints(implemented?: readonly SysmlConstraint[], published?: readonly SysideRule[]): ConstraintScore; /** Evaluate every implemented constraint against one model. */ export declare function checkSysmlConstraints(model: MemoModelDTO, constraints?: readonly SysmlConstraint[]): ConstraintViolation[]; //# sourceMappingURL=sysml-constraints.d.ts.map