Theory FlowPolicies
theory FlowPolicies
imports Views
begin
record 'domain FlowPolicy_rec =
D :: "'domain set"
v_rel :: "('domain × 'domain) set"
n_rel :: "('domain × 'domain) set"
c_rel :: "('domain × 'domain) set"
definition FlowPolicy :: "'domain FlowPolicy_rec ⇒ bool"
where
"FlowPolicy fp ≡
((v_rel fp) ∪ (n_rel fp) ∪ (c_rel fp) = ((D fp) × (D fp)))
∧ (v_rel fp) ∩ (n_rel fp) = {}
∧ (v_rel fp) ∩ (c_rel fp) = {}
∧ (n_rel fp) ∩ (c_rel fp) = {}
∧ (∀d ∈ (D fp). (d, d) ∈ (v_rel fp))"
type_synonym ('e, 'domain) dom_type = "'e ⇀ 'domain"
definition dom :: "('e, 'domain) dom_type ⇒ 'domain set ⇒ 'e set ⇒ bool"
where
"dom domas dset es ≡
(∀e. ∀d. ((domas e = Some d) ⟶ (e ∈ es ∧ d ∈ dset)))"
definition view_dom :: "'domain FlowPolicy_rec ⇒ 'domain ⇒ ('e, 'domain) dom_type ⇒ 'e V_rec"
where
"view_dom fp d domas ≡
⦇ V = {e. ∃d'. (domas e = Some d' ∧ (d', d) ∈ (v_rel fp))},
N = {e. ∃d'. (domas e = Some d' ∧ (d', d) ∈ (n_rel fp))},
C = {e. ∃d'. (domas e = Some d' ∧ (d', d) ∈ (c_rel fp))} ⦈"
end