Skip to content

Commit

Permalink
instanceOfType attribute map
Browse files Browse the repository at this point in the history
Signed-off-by: John Kastner <[email protected]>
  • Loading branch information
john-h-kastner-aws committed Aug 23, 2024
1 parent 51a78c1 commit 6d6727f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cedar-lean/Cedar/Validation/RequestEntityValidator.lean
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def instanceOfType (v : Value) (ty : CedarType) : Bool :=
| .some qty => instanceOfType v qty.getType
| _ => true))) &&
rty.keys.all (requiredAttributePresent r rty)
| .record r, .attribute_map aty =>
(r.kvs.attach₂.all (λ ⟨(_, v), _⟩ => instanceOfType v aty))
| .ext x, .ext xty => instanceOfExtType x xty
| _, _ => false
termination_by v
Expand All @@ -73,7 +75,7 @@ def instanceOfType (v : Value) (ty : CedarType) : Bool :=
case _ h₁ =>
have := Set.sizeOf_lt_of_mem h₁
omega
case _ h₁ =>
case _ h₁ | _ h₁ =>
cases r
simp only [Map.kvs] at h₁
simp only [Map.mk.sizeOf_spec]
Expand Down

0 comments on commit 6d6727f

Please sign in to comment.