Did this run violate the inventory rule?
- Method
- Evaluate the observed trace.
- What the result covers
- A violating observation provides a witness. An open or incomplete trace can leave the claim unresolved.
Building Blocks
State what must hold at a commit or across observations, then check the claim against a trace, a finite catalog, or a running monitor.
Cohesive.Assurance turns a business rule into a claim that tools can check. A claim names the system it constrains, the observations it reads, and the predicate that must hold, all pinned to exact revisions. Each check then produces evidence that says what was examined and how far the result reaches, so a team can tell a proven rule from one that has only passed so far.
Suppose a reservation must leave Reserved <= OnHand after every commit. Define the claim against the inventory observation contract, choose whether it includes the initial state, and bind the predicate to those fields. The resulting document identifies the subject revision and the observations needed to check it. A report can point back to the exact requirement and the state that violated it.
var author = new ExpressionAuthoring();
var stock = author.Input<Inventory>("stock");
var claim = Claim.Define("inventory.safe", "1", inventory,
observationContract, reviewedSource, loweringConfiguration)
.AtEveryCommittedState(population, InitialStateSelection.Include)
.Require(stock, ClaimInputRole.State, s => s.Reserved <= s.OnHand)
.Build();The typed lambda lowers through the same expression compiler that Relations uses, so the claim carries portable predicate IR and no CLR types or closures. A structural Expr declaration of the same predicate produces the same semantic fingerprint.
The same language can express a successful Transition contract over before and after state, require an earlier observation, or require a response by an inclusive deadline. For a response claim, a monitor needs evidence of how far the source is complete before it can conclude that the deadline passed without a response.
A finite check can take its guard straight from a Transition's admission rules. The checker then evaluates the same preconditions that the Transition interpreter executes, pinned to their exact revision and source nodes. When a repair changes the guard, comparing the faulty and repaired admission plans over one shared catalog looks for two witness rows: one that the repair newly permits and one that it newly forbids. Rechecking the retained comparison evaluates both candidates again from scratch.
The OpenTelemetry adapter accepts explicitly mapped semantic observations. A bounded reference monitor can append them, checkpoint its evaluation, and resume from that checkpoint. The capture-host example journals each source position before acknowledging delivery, so it can reconcile a redelivery after restart.
With Simulation, the bridge can check a state invariant or a state-changing commit contract against a retained trace for one actor in a declared sequential, atomic execution. Rechecking the trace evaluates the original observations. Running a repaired candidate produces a new trace and evidence tied to that candidate.
Each check produces an immutable evidence report for one exact claim and one target: a model, an encoding, an implementation, or a deployment. The report records the method, its configuration, how much of the scope it covered, and the dependencies and residual assumptions it relied on. An assessment derives a proof state from these reports under an explicit acceptance policy and an explicit time.
A violated trace can disprove the claim for the implementation it observed. A clean trace leaves the claim unknown, even when every trace in the selected population satisfied it, because sampling a run proves nothing about the runs that did not happen. An exhaustive finite check or an external proof can establish the claim within its declared scope. A recorded waiver changes how a team disposes of the claim but leaves its proof state unchanged. When a policy, dependency, or clock changes, the assessment is recomputed into a new one, and the earlier evidence stays as it was.