Source/Packages

Observe.Capture

packages/observability/src/Observe/Capture.alpha

78 lines2 declarations3.4 KiBSHA-256 85873d45b29f

def · lines 53–78

aosCaptureCounterAdmission

Full file
Exact room flags come from the bounded runtime counters. Refuse before any mutation if a required counter would wrap; never record an invented zero.
53def aosCaptureCounterAdmission =
54  (lambda unrestricted decision : Nat .
55    (lambda unrestricted sequenceRoom : Nat .
56      (lambda unrestricted droppedRoom : Nat .
57        (lambda unrestricted excludedRoom : Nat .
58          (aosChoose
59            Nat
60            (naturalAnd
61              (naturalLessOrEqual decision 4)
62              (naturalAnd
63                (naturalLessOrEqual sequenceRoom 1)
64                (naturalAnd (naturalLessOrEqual droppedRoom 1) (naturalLessOrEqual excludedRoom 1))))
65            (aosChoose
66              Nat
67              (naturalEqual decision 0)
68              (aosChoose Nat excludedRoom 0 4)
69              (aosChoose
70                Nat
71                (naturalEqual decision 1)
72                (aosChoose Nat sequenceRoom 1 4)
73                (aosChoose
74                  Nat
75                  (naturalEqual decision 2)
76                  (aosChoose Nat (naturalAnd sequenceRoom droppedRoom) 2 4)
77                  decision)))
78            4)))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.