compute_cbc_enabling_relation_and_assert(OpName1,OpName2,FindInvViolations,Timeout,Pref) :-
b_get_read_write(OpName1,_Reads1_,Writes1),
get_negated_guard(OpName2,PosGuard2,NegGuard2),
enabling_analysis: partition_predicate(PosGuard2,Writes1,FilteredPosGuard2,StaticPosGuard2),
create_negation(FilteredPosGuard2,FilteredNegGuard2),
(OpName1==OpName2 ->
KeepDisabled=false, Enable=false,
(Pref=enabled2 ->
test_path_non_failing(PosGuard2,[OpName1],FilteredNegGuard2,FindInvViolations,Timeout,Disable),
KeepEnabled = unknown
;Pref=disabled2 ->
translate: print_bexpr(PosGuard2),
translate: print_bexpr(FilteredPosGuard2),
test_path_non_failing(PosGuard2,[OpName1],FilteredPosGuard2,FindInvViolations,Timeout,KeepEnabled),
Disable = unknown
;
test_path_non_failing(PosGuard2,[OpName1],FilteredNegGuard2,FindInvViolations,Timeout,Disable),
test_path_non_failing(PosGuard2,[OpName1],FilteredPosGuard2,FindInvViolations,Timeout,KeepEnabled)
)
;
conjunct_predicates([StaticPosGuard2,FilteredNegGuard2],NegEnableGuard2),
(Pref=enabled2 -> % need to known just Disable and KeepDisabled
Enable = unknown, KeepEnabled = unknown,
test_path_non_failing(PosGuard2,[OpName1],FilteredNegGuard2,FindInvViolations,Timeout,Disable),
test_path_non_failing(NegGuard2,[OpName1],NegGuard2,FindInvViolations,Timeout,KeepDisabled)
;Pref=disabled2 -> % need to known just Enable and KeepEnabled
test_path_non_failing(NegEnableGuard2,[OpName1],FilteredPosGuard2,FindInvViolations,Timeout,Enable),
test_path_non_failing(PosGuard2,[OpName1],FilteredPosGuard2,FindInvViolations,Timeout,KeepEnabled),
Disable = unknown, KeepDisabled = unknown
; % we have full2
test_path_non_failing(NegEnableGuard2,[OpName1],FilteredPosGuard2,FindInvViolations,Timeout,Enable),
test_path_non_failing(PosGuard2,[OpName1],FilteredPosGuard2,FindInvViolations,Timeout,KeepEnabled),
test_path_non_failing(PosGuard2,[OpName1],FilteredNegGuard2,FindInvViolations,Timeout,Disable),
test_path_non_failing(NegGuard2,[OpName1],NegGuard2,FindInvViolations,Timeout,KeepDisabled)
)
),
prove_and_assert_enabling_relation(OpName1,OpName2,Enable,KeepEnabled,Disable,KeepDisabled),
debug_println(9,enabling_relations(OpName1,OpName2,Enable,KeepEnabled,Disable,KeepDisabled)).