Concretizing symbolic environments #
This file defines functions for concretizing a literal symbolic environment
(SymEnv) into a corresponding concrete environment (Env). This functionality
is needed for extracting counterexamples from models returned by the solver and
also for proving that Cedar's reduction to SMT (Cedar.SymCC.compile) is
complete.
See Cedar.Thm.SymbolicCompilation for a statement of the completeness theorem.
Equations
Instances For
@[irreducible]
Equations
- One or more equations did not get rendered due to their size.
- (Cedar.Spec.Value.prim p).entityUIDs = p.entityUIDs
- (Cedar.Spec.Value.set (Cedar.Data.Set.mk vs)).entityUIDs = vs.mapUnion₁ fun (x : { x : Cedar.Spec.Value // x ∈ vs }) => match x with | ⟨v, property⟩ => v.entityUIDs
- (Cedar.Spec.Value.ext x_1).entityUIDs = Cedar.Data.Set.empty
Instances For
Equations
- (Cedar.Spec.Value.prim (Cedar.Spec.Prim.entityUID uid)).entityUID? = some uid
- x✝.entityUID? = none
Instances For
Equations
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Cedar.Spec.instReprEnv = { reprPrec := Cedar.Spec.instReprEnv.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- env.entityUIDs = env.request.entityUIDs ∪ env.entities.entityUIDs
Instances For
@[irreducible]
Equations
- One or more equations did not get rendered due to their size.
- (Cedar.Spec.Expr.lit p).entityUIDs = p.entityUIDs
- (Cedar.Spec.Expr.var v).entityUIDs = Cedar.Data.Set.empty
- (x₁.ite x₂ x₃).entityUIDs = x₁.entityUIDs ∪ x₂.entityUIDs ∪ x₃.entityUIDs
- (x₁.and x₂).entityUIDs = x₁.entityUIDs ∪ x₂.entityUIDs
- (x₁.or x₂).entityUIDs = x₁.entityUIDs ∪ x₂.entityUIDs
- (Cedar.Spec.Expr.binaryApp op x₁ x₂).entityUIDs = x₁.entityUIDs ∪ x₂.entityUIDs
- (Cedar.Spec.Expr.unaryApp op x₁).entityUIDs = x₁.entityUIDs
- (x₁.getAttr attr).entityUIDs = x₁.entityUIDs
- (x₁.hasAttr attr).entityUIDs = x₁.entityUIDs
- (Cedar.Spec.Expr.set xs).entityUIDs = xs.mapUnion₁ fun (x : { x : Cedar.Spec.Expr // x ∈ xs }) => match x with | ⟨x, property⟩ => x.entityUIDs
- (Cedar.Spec.Expr.call xfn xs).entityUIDs = xs.mapUnion₁ fun (x : { x : Cedar.Spec.Expr // x ∈ xs }) => match x with | ⟨x, property⟩ => x.entityUIDs
Instances For
Equations
- (Cedar.SymCC.TermPrim.bool b).value? = some (Cedar.Spec.Value.prim (Cedar.Spec.Prim.bool b))
- (Cedar.SymCC.TermPrim.bitvec bv).value? = do let a ← Cedar.SymCC.BitVec.int64? bv pure (Cedar.Spec.Value.prim (Cedar.Spec.Prim.int a))
- (Cedar.SymCC.TermPrim.string s).value? = some (Cedar.Spec.Value.prim (Cedar.Spec.Prim.string s))
- (Cedar.SymCC.TermPrim.entity uid).value? = some (Cedar.Spec.Value.prim (Cedar.Spec.Prim.entityUID uid))
- (Cedar.SymCC.TermPrim.ext xv).value? = some (Cedar.Spec.Value.ext xv)
Instances For
@[irreducible]
Equations
Instances For
Equations
Instances For
Equations
Instances For
@[irreducible]
Equations
- One or more equations did not get rendered due to their size.
- (Cedar.SymCC.Term.var a).entityUIDs = Cedar.Data.Set.empty
- (Cedar.SymCC.Term.none a).entityUIDs = Cedar.Data.Set.empty
- (Cedar.SymCC.Term.prim p).entityUIDs = p.entityUIDs
- t.some.entityUIDs = t.entityUIDs
- (Cedar.SymCC.Term.set ts eltsTy).entityUIDs = ts.elts.mapUnion₁ fun (x : { x : Cedar.SymCC.Term // x ∈ ts.elts }) => match x with | ⟨t, property⟩ => t.entityUIDs
- (Cedar.SymCC.Term.app a ts retTy).entityUIDs = ts.mapUnion₁ fun (x : { x : Cedar.SymCC.Term // x ∈ ts }) => match x with | ⟨t, property⟩ => t.entityUIDs
Instances For
Equations
- (Cedar.SymCC.Term.prim (Cedar.SymCC.TermPrim.entity uid)).entityUID? = some uid
- x✝.entityUID? = none
Instances For
Equations
- (Cedar.SymCC.Term.set (Cedar.Data.Set.mk ts) eltsTy).setOfEntityUIDs? = do let __do_lift ← List.mapM Cedar.SymCC.Term.entityUID? ts some (Cedar.Data.Set.make __do_lift)
- x✝.setOfEntityUIDs? = none
Instances For
Equations
- (Cedar.SymCC.Term.prim (Cedar.SymCC.TermPrim.string tag)).tag? = some tag
- x✝.tag? = none
Instances For
Equations
- (Cedar.SymCC.Term.set (Cedar.Data.Set.mk ts) eltsTy).setOfTags? = do let __do_lift ← List.mapM Cedar.SymCC.Term.tag? ts some (Cedar.Data.Set.make __do_lift)
- x✝.setOfTags? = none
Instances For
Equations
- ρ.entityUIDs = ρ.principal.entityUIDs ∪ ρ.action.entityUIDs ∪ ρ.resource.entityUIDs ∪ ρ.context.entityUIDs
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Cedar.SymCC.SymEntityData.entityUIDs.mems ety δ = match δ.members with | none => Cedar.Data.Set.empty | some eids => Cedar.Data.Set.make (List.map (Cedar.Spec.EntityUID.mk ety) eids.elts)
Instances For
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Cedar.SymCC.SymEntityData.entityUIDs.tags δ = match δ.tags with | none => Cedar.Data.Set.empty | some τs => τs.vals.entityUIDs
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- εnv.entityUIDs = εnv.request.entityUIDs ∪ εnv.entities.entityUIDs
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Cedar.SymCC.SymEntityData.concretize?.isValidEntityUID
(uid : Spec.EntityUID)
(δ : SymEntityData)
:
Equations
Instances For
def
Cedar.SymCC.SymEntityData.concretize?.taggedValueFor
(τs : SymTags)
(tuid : Term)
(tag : Spec.Tag)
:
Equations
- Cedar.SymCC.SymEntityData.concretize?.taggedValueFor τs tuid tag = do let __do_lift ← (τs.getTag! tuid (Cedar.SymCC.Term.string tag)).value? some (tag, __do_lift)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.