Skip to main content

@getriebe/model-check

Analyse supported model behaviour with bounded exploration.

Source revision 49560371f6cd34d30383df5619df46969c594ae4.

export interface BehavioralCheck {
readonly property: BehaviorProperty;
readonly result: BehaviorResult;
readonly message: string;
readonly assumptions: readonly string[];
readonly limits: BehaviorLimits;
readonly counterexample?: Counterexample;
}
export interface BehaviorCallTarget {
readonly versionId: string;
readonly model: BpmnModel;
}
export interface BehaviorDiagnostic {
readonly severity: "error" | "warning";
readonly code: string;
readonly message: string;
readonly elementId?: string;
readonly scopeId?: string;
readonly modelVersionId?: string;
readonly scopeVersionId?: string;
}
export interface BehaviorLimits {
readonly maxStates: number;
readonly maxTransitions: number;
readonly maxLiveTokens: number;
}
export type BehaviorProperty = (typeof properties)[number];
export interface BehaviorReport {
readonly checkerVersion: string;
readonly behavioralChecks: readonly BehavioralCheck[];
readonly exploredStates: number;
readonly exploredTransitions: number;
readonly closed: boolean;
readonly targetVersionIds?: readonly string[];
}
export type BehaviorResult = "proven" | "violated" | "unknown" | "not_checked";
export declare const checkerVersion = "marking-search/v8";
export declare function checkModelBehavior(model: BpmnModel, options?: Partial<BehaviorLimits>, resolveCall?: ResolveBehaviorCall): BehaviorReport;
export interface CheckStep {
readonly elementId: string;
readonly scopeId?: string;
readonly modelVersionId?: string;
readonly scopeVersionId?: string;
readonly flowId?: string;
readonly outcome?: "repeat" | "skip" | "no-route" | "round-opened" | "round-published" | "scope-entered" | "scope-completed" | "error-caught" | "error-unhandled";
readonly errorCode?: string;
readonly handlerElementId?: string;
readonly handlerVersionId?: string;
readonly reviewCount?: number;
readonly approvals?: number;
}
export interface Counterexample {
readonly kind: "concrete" | "abstract";
readonly steps: readonly CheckStep[];
readonly elementId?: string;
readonly scopeId?: string;
readonly modelVersionId?: string;
readonly scopeVersionId?: string;
}
export declare const defaultBehaviorLimits: BehaviorLimits;
export declare function deploymentDecision(structure: "valid" | "invalid" | "unknown", report?: BehaviorReport): {
readonly deployable: boolean;
readonly diagnostics: readonly BehaviorDiagnostic[];
};
export type ResolveBehaviorCall = (call: BpmnCallActivity, callerVersionId: string | undefined) => BehaviorCallTarget | undefined;