Parse.AaQ.allowed: def of bend-osdev-apparmor@0.1.0.0 Import: import bend-osdev-apparmor@0.1.0.0/parse.bend as Parse Lines 964-983 of bend-osdev-apparmor@0.1.0.0/parse.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-apparmor@0.1.0.0/parse.bend&start_line=964&end_line=983 import Base # the qualifier k may come at stage s (0 start, 1 after audit, 2 after allow # or deny, 3 after owner), and the stage after it def AaQ.allowed(k: Nat, s: Nat) -> Bool: match k: case 0n: False{} case 1n+k1: match k1: case 0n: Nat.is_eq(s, 0n) case 1n+k2: match k2: case 0n: Nat.is_le(s, 1n) case 1n+k3: match k3: case 0n: Nat.is_le(s, 1n) case 1n+k4: Nat.is_le(s, 2n) Uses (4): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_le