← Advanced course and all videos

Video 22 of 53 · 4:15 · Applications, benchmarking and evidence

Exact policy rewrites and their cost

In this video

  1. 0:00 · Introduction
  2. 0:16 · Factor a policy with concrete conditions
  3. 1:05 · Core explanation
  4. 2:09 · An exception never bypasses the shared staff condition
  5. 3:10 · A revision is a new proof instance
  6. 4:06 · Direct takeaways

Caption transcript

Show transcript
This overview explains how a proved Boolean rewrite can preserve policy decisions while changing the work needed to compute them. Finding a match, admitting its proof, updating identities, and handling fallback can cost more than the rewrite saves. Both routes require authorized staff. One route accepts allowed hours; the other accepts an explicit exception. The two branches therefore share A, while B and C are alternatives. Factor the common staff condition outside the or. When A is zero, both forms deny access. When A is one, both forms return B or C. These two cases prove the equality for every combination of the other conditions. For authorized staff outside normal hours with an exception, the original branches return zero and one. Their or allows access. The factored form first finds B or C true, then combines it with A one and also allows access. A proved Boolean identity can preserve decisions while reducing structure. Profitability also includes finding the match, admitting the proof, updating identities and handling fallback. Use allow equals role AND region, OR role AND resource. Factor it to role AND the OR of region and resource. Exhaustive evaluation over the three inputs confirms equality. In the revision example, the resource clause changes. The matching record and proof instance depend on that clause. They require invalidation or revalidation; an old cache name alone cannot establish validity. The factorization is a conceptual proof example. It is not asserted to be a deployed rule or a measured D-series winner. A smaller expression can still lose whole-task time after matching and cache overhead. Preserve an exact no-rewrite path when advice is rejected. Work a second complete case with A 0, B 1, C 1. Keep this assignment fixed throughout the calculation. Each symbol retains the meaning already introduced; a new value does not create a new logical rule. Although both alternative conditions are true, the shared authorized-staff condition is false. Both original branches contain that false requirement and return zero. The factored form keeps A outside the or and also returns zero. Factoring has preserved the permission boundary. This case establishes a specific contrast. A remains required in both forms. Do not replace the policy with B OR C alone. Keep the input, intermediate values, and conclusion together when comparing it with the previous case. The calculated answer belongs to this complete assignment under the stated rule. Suppose the exception route now requires D rather than A. The earlier factorization does not automatically apply, because the two branches no longer share the same required condition. The meaning of the revised clause matters. With A zero, B zero, C one, and D one, the revised policy allows access through the second branch. The old factored expression returns zero because it still requires A. This single complete assignment disproves that proposed rewrite of the revised policy. Apply exact checking to the current rule version. After correctness is established, count or measure the work of recognizing, preparing, and executing the rewrite. A safe transformation can still cost more than evaluating the original policy for the requested lifetime. Check correctness independently of profitability. Charge the complete request and retain an exact no-rewrite fallback.