An incremental monitor for the safety fragment G(p) (“p always holds”) — the practical
Büchi-automaton acceptance for stream monitoring: it stays Safe while every streamed event
satisfies p, and latches to Violated permanently on the first event that does not. Zero-heap.
Timeout guard for a lock lease: Err(AbortedTimeout) when
current_time is past lock_granted_at + ttl_seconds, else Ok.
The lease boundary itself (==) is still valid.
Evaluate an LtlFormula over a finite quin trace — the
predicate-hash is the proposition at each state. Empty traces
satisfy nothing. Until/Release scan for the earliest index where
the consequent holds with the antecedent/invariant holding
throughout the prefix.
Sincep S q: at the end of the trace, q held at some past point and p has held at
every point since (inclusive of after q). Retrospective legal analysis (“the duty has held
since the breach”). Zero-heap.
MTL bounded-globallyG[t0, t0+window] inv: from the earliest trigger timestamp t0,
the invariant must hold at every event whose timestamp lies in [t0, t0+window]. Returns
true vacuously if no in-window events. Zero-heap.
Metric temporal (MTL) “within”: after the EARLIEST occurrence of trigger
(each event quin carries its timestamp in metadata), target must occur at
some time t1 with t0 <= t1 <= t0 + window. Models deadlines — e.g. “remedy
within 30 days of breach”. Zero-heap (two linear scans; no allocation).
Extract the [first, last] timestamp interval over which predicate occurs in the timed
trace (each event’s timestamp in metadata), or None if it never occurs. The bridge to
the Allen Interval Algebra (interval_reasoning::allen_relation relates two such intervals).