include "aarch64fences.cat"
let Imp = NExp
let C_TLBI = TLBI & domain(po; [dsb.full])
let C_IC = IC & domain(po; [dsb.full])
let add_pair p =
map (
fun r -> (p | r))
let rec add_both_choices (rs,wts) =
match wts
with
|| {} -> rs
|| wt ++ wts ->
let wt = wt ++
0 in
let tw = wt^-1
in
let r1 = add_pair wt rs
and r2 = add_pair tw rs
in
let rs = r1|r2
in
add_both_choices (rs,wts)
end
let enumerate-ordered-pairs (unordered-pairs,rel) =
let no-choice = rel & (unordered-pairs | unordered-pairs^-1)
in
let need-choosing = unordered-pairs \ (no-choice | no-choice^-1)
in
add_both_choices ({no-choice},need-choosing)
let TLBI-Imp_TTD_R-pairs = inv-scope &
((C_TLBI * (Imp & TTD & R)) \
(TLBInXS * PTEXS) \
((~TLBIIS) * (Imp & TTD & R)) & ext)
let all-TLBI-Imp_TTD_R-enums rel =
enumerate-ordered-pairs (
TLBI-Imp_TTD_R-pairs,
rel
)
let all-DC-Exp_W-enums rel =
enumerate-ordered-pairs (
scl & (DC.CVAU * (Exp & W)),
rel | (IW * (
_\IW))
)
let all-IC-Imp_Instr_R-enums rel =
enumerate-ordered-pairs (
scl & (C_IC * (Imp & Instr & R)),
rel
)