Metakit / @doeixd/metakit/prove

policyImplies

function · packages/metakit/src/prove/policy.ts:47

function policyImplies<
  Row,
  Principal,
  Rules extends Readonly<
    Record<string, Expr.Expr<Policy.PolicyEnv<Row, Principal>, boolean>>
  >,
>(
  pol: Policy.Definition<Row, Principal, Rules>,
  from: NoInfer<Policy.RuleOf<Rules>>,
  to: NoInfer<Policy.RuleOf<Rules>>,
  options?: ProveOptions,
): Effect.Effect<Proof, SolverUnavailableError>

Prove that rule from of pol (with the row and principal Schemas) entails its rule to: non-disclosure is pol.rules.Update entailing pol.rules.Read.

Runs Tier 3 first and asks Z3 where it is undecided. False carries a replayed environment that from allows and to does not. A rule of another policy throws.