Skip to content

Commit

Permalink
bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mb706 committed Sep 23, 2024
1 parent 7583cab commit a2bf056
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 2 deletions.
3 changes: 1 addition & 2 deletions R/CnfFormula_simplify1.R
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ simplify_cnf = function(entries, universe) {
if (rowsum > 2L) next
ousr = on_updated_subset_relations(meta_idx, other_meta_idx)
if (identical(ousr, TRUE)) return(TRUE) # forward contradiction signal. We don't care if other_meta_idx was eliminated.
if (eliminated[[clause_idx]]) return(NULL) # need to check more directly if things escalated somehow and clause_idx was eliminated indirectly
if (eliminated[[clause_idx]] || is_unit[[clause_idx]]) return(NULL) # need to check more directly if things escalated somehow and clause_idx was eliminated indirectly
}
# call on_domain_changed_handle_2nd_order_sse
# it is not a waste w/r/t the 'on_updated_subset_relations' call, since that one only deals with clauses for which the symbol is set to FALSE now,
Expand Down Expand Up @@ -342,7 +342,6 @@ simplify_cnf = function(entries, universe) {
if (is.null(hs2oo)) return(NULL) # meta_idx eliminated
if (hs2oo) return(TRUE)
}

targets_while_twoend = potential_targets[not_subset_count[meta_idx, potential_targets] == 2L]
for (meta_idx_target in targets_while_twoend) {
hs2oo = handle_sse_2nd_order_twoend(meta_idx, meta_idx_target, symbol)
Expand Down
81 changes: 81 additions & 0 deletions attic/experiments.R
Original file line number Diff line number Diff line change
Expand Up @@ -1254,3 +1254,84 @@ e1&e2
e1
e2



(V3 %among% c("v3_3", "v3_4") | V1 %among% "v1_2" | (V1 %among% "v1_1" | V1 %among% c("v1_1", "v1_5", "v1_4"))) & ((V1
%among% "v1_3" | V4 %among% "v4_3") & (V1 %among% c("v1_5", "v1_3", "v1_4", "v1_1") | V4 %among% "v4_3")) & (V3 %among%
c("v3_3", "v3_4", "v3_1", "v3_2") | V3 %among% "v3_5" | (V1 %among% c("v1_1", "v1_2", "v1_4", "v1_3") | V4 %among%
c("v4_3", "v4_1")) | (V4 %among% c("v4_2", "v4_3", "v4_1", "v4_4") | V3 %among% c("v3_4", "v3_2", "v3_1", "v3_5")) &
(V2 %among% c("v2_2", "v2_1", "v2_3", "v2_4") | V3 %among% c("v3_2", "v3_5", "v3_3"))) & (V4 %among% "v4_2" | V2
%among% c("v2_1", "v2_3", "v2_2", "v2_5") | V2 %among% c("v2_3", "v2_5") & V2 %among% c("v2_2", "v2_5") | (V1 %among%
c("v1_1", "v1_5", "v1_3", "v1_4") & V1 %among% c("v1_5", "v1_3", "v1_1", "v1_4") | V2 %among% "v2_2" & V1 %among%
c("v1_3", "v1_2")) | (V2 %among% c("v2_5", "v2_2", "v2_1") | V1 %among% c("v1_3", "v1_1") | V1 %among% c("v1_5",
"v1_3") & V4 %among% c("v4_1", "v4_4") | (V2 %among% c("v2_2", "v2_1") | V2 %among% "v2_3") & (V2 %among% c("v2_1",
"v2_3", "v2_5", "v2_4") & V4 %among% "v4_5"))) & ((V4 %among% c("v4_4", "v4_1") & V4 %among% c("v4_1", "v4_3", "v4_5")
| (V2 %among% c("v2_3", "v2_2") | V4 %among% c("v4_2", "v4_4", "v4_5", "v4_3"))) & (V4 %among% c("v4_5", "v4_1") | V1
%among% c("v1_5", "v1_2") | V1 %among% "v1_4" & V1 %among% "v1_5") | (V4 %among% c("v4_1", "v4_3") & V3 %among% "v3_2"
| V1 %among% c("v1_4", "v1_1", "v1_5", "v1_2") & V1 %among% c("v1_5", "v1_1") | (V2 %among% c("v2_2", "v2_4") | V3
%among% c("v3_4", "v3_1", "v3_3", "v3_5")) & (V2 %among% c("v2_3", "v2_5") | V1 %among% c("v1_2", "v1_1", "v1_5",
"v1_3"))) | (V1 %among% c("v1_4", "v1_2") & V1 %among% c("v1_5", "v1_1") | (V3 %among% c("v3_2", "v3_1", "v3_4",
"v3_5") | V1 %among% c("v1_3", "v1_5", "v1_4", "v1_2"))) & (V4 %among% c("v4_5", "v4_1") & V1 %among% c("v1_4", "v1_3")
| V4 %among% c("v4_4", "v4_2") & V4 %among% c("v4_4", "v4_1", "v4_5")) & ((V2 %among% c("v2_3", "v2_4") | V2 %among%
c("v2_5", "v2_4", "v2_1" )) & (V4 %among% c("v4_5", "v4_2", "v4_4") | V4 %among% "v4_5") & (V1 %among% "v1_4" | V4
%among% c("v4_4", "v4_3") | V4 %among% c("v4_3", "v4_1") & V3 %among% c("v3_3", "v3_5", "v3_1")))) & (V4 %among%
c("v4_2", "v4_4", "v4_1", "v4_3") & V3 %among% "v3_3" & (V1 %among% c("v1_1", "v1_4", "v1_2", "v1_5") & V2 %among%
c("v2_5", "v2_3")) & (V1 %among% c("v1_1", "v1_3", "v1_4", "v1_2") | V1 %among% "v1_5" | V3 %among% c("v3_5", "v3_4") &
V1 %among% c("v1_4", "v1_1")) & (V1 %among% c("v1_1", "v1_5", "v1_3", "v1_4") | V2 %among% c("v2_4", "v2_3") | (V2
%among% c("v2_1", "v2_5") | V2 %among% c("v2_5", "v2_4", "v2_3", "v2_2")) | V4 %among% c("v4_5", "v4_2") & V3 %among%
"v3_1" & (V1 %among% c("v1_3", "v1_5") & V1 %among% c("v1_2", "v1_1", "v1_3", "v1_4"))) | (V3 %among% c("v3_1", "v3_4")
| V2 %among% "v2_5" | V4 %among% c("v4_4", "v4_1", "v4_3") & V2 %among% c("v2_2", "v2_5") | (V1 %among% "v1_4" | V4
%among% c("v4_5", "v4_2")) & (V2 %among% "v2_3" & V2 %among% "v2_5") | ((V3 %among% "v3_3" | V4 %among% c("v4_2",
"v4_3")) & (V3 %among% c("v3_1", "v3_2", "v3_4") | V4 %among% c("v4_3", "v4_1", "v4_4", "v4_5")) | (V4 %among% "v4_1" |
V4 %among% c("v4_4", "v4_3", "v4_5")) & (V1 %among% c("v1_4", "v1_2", "v1_3") & V1 %among% c("v1_1", "v1_3")))) | ((V2
%among% "v2_2" | V1 %among% "v1_1") & (V2 %among% "v2_5" & V3 %among% "v3_5") & (V1 %among% c("v1_5", "v1_3", "v1_4") |
V1 %among% c("v1_1", "v1_3", "v1_4") | (V1 %among% c("v1_3", "v1_5", "v1_4") | V1 %among% c("v1_4", "v1_1"))) | (V1
%among% "v1_1" & V4 %among% c("v4_1", "v4_4", "v4_2") | V1 %among% c("v1_3", "v1_5") & V3 %among% c("v3_1", "v3_3",
"v3_5")) & (V1 %among% "v1_5" & V1 %among% c("v1_1", "v1_4") & (V3 %among% "v3_4" | V1 %among% c("v1_5", "v1_2",
"v1_1"))) | (V3 %among% c("v3_1", "v3_5", "v3_4", "v3_3") | V1 %among% c("v1_2", "v1_5", "v1_3") | (V4 %among%
c("v4_2", "v4_5", "v4_3", "v4_1") | V2 %among% c("v2_5", "v2_2", "v2_3", "v2_1")) | V3 %among% c("v3_2", "v3_1") & V1
%among% c("v1_3", "v1_1", "v1_2", "v1_4") & (V2 %among% "v2_3" & V2 %among% c("v2_4", "v2_5"))) & ((V1 %among% "v1_4" &
V4 %among% c("v4_1", "v4_3") | (V1 %among% c("v1_1", "v1_4") | V4 %among% "v4_5")) & (V2 %among% c("v2_2", "v2_4",
"v2_5", "v2_3") & V4 %among% "v4_5" & (V4 %among% c("v4_2", "v4_4", "v4_3", "v4_1") & V2 %among% c("v2_1", "v2_5",
"v2_4", "v2_3")))))) & (((V4 %among% c("v4_4", "v4_3") & V2 %among% c("v2_5", "v2_2") | V1 %among% c("v1_3", "v1_4",
"v1_5") & V4 %among% c("v4_4", "v4_1", "v4_2", "v4_5")) & (V3 %among% c("v3_1", "v3_3", "v3_4", "v3_2") | V3 %among%
"v3_2" | (V1 %among% c("v1_3", "v1_5", "v1_4", "v1_2") | V1 %among% c("v1_4", "v1_2", "v1_3", "v1_1"))) | V1 %among%
c("v1_5", "v1_2", "v1_4") & V2 %among% "v2_1" & (V3 %among% c("v3_4", "v3_5", "v3_1") | V3 %among% c("v3_2", "v3_1",
"v3_4")) & (V4 %among% c("v4_1", "v4_3", "v4_2") & V2 %among% c("v2_4", "v2_1", "v2_3") | V2 %among% c("v2_3", "v2_2")
& V1 %among% c("v1_2", "v1_3", "v1_4", "v1_5"))) & (((V3 %among% "v3_1" | V1 %among% c("v1_2", "v1_5", "v1_1", "v1_3"))
& (V2 %among% c("v2_2", "v2_5", "v2_4", "v2_1") & V2 %among% c("v2_5", "v2_2", "v2_4")) | (V3 %among% c("v3_3", "v3_4",
"v3_1", "v3_2") & V2 %among% "v2_2" | (V3 %among% c("v3_3", "v3_1", "v3_4") | V4 %among% c("v4_5", "v4_1")))) & ((V3
%among% c("v3_2", "v3_3", "v3_4", "v3_5") & V4 %among% c("v4_4", "v4_2") | V1 %among% c("v1_3", "v1_2", "v1_4", "v1_1")
& V2 %among% c("v2_2", "v2_3")) & (V3 %among% c("v3_1", "v3_3", "v3_2") | V3 %among% c("v3_3", "v3_1", "v3_5", "v3_4")
| V4 %among% c("v4_3", "v4_5", "v4_2", "v4_4") & V3 %among% c("v3_5", "v3_1")))) & ((V1 %among% c("v1_1", "v1_2",
"v1_4", "v1_5") & V4 %among% c("v4_4", "v4_5", "v4_1") | V3 %among% c("v3_4", "v3_2") & V1 %among% c("v1_3", "v1_2") |
V3 %among% c("v3_1", "v3_5") & V1 %among% c("v1_1", "v1_3") & (V4 %among% "v4_1" & V3 %among% c("v3_3", "v3_5", "v3_2",
"v3_4")) | (V4 %among% c("v4_1", "v4_3") | V4 %among% c("v4_1", "v4_3", "v4_2")) & (V3 %among% c("v3_1", "v3_4",
"v3_2") & V2 %among% c("v2_1", "v2_2", "v2_5", "v2_4")) & (V3 %among% c("v3_3", "v3_1", "v3_4", "v3_5") & V3 %among%
c("v3_3", "v3_5", "v3_4", "v3_1") | V2 %among% c("v2_4", "v2_2", "v2_5", "v2_3") & V2 %among% c("v2_4", "v2_1",
"v2_2"))) & (V4 %among% c("v4_2", "v4_1") & V1 %among% c("v1_4", "v1_2") & (V3 %among% c("v3_2", "v3_5") | V4 %among%
"v4_5") & (V3 %among% c("v3_2", "v3_1", "v3_4") & V2 %among% c("v2_2", "v2_5", "v2_1") | (V2 %among% c("v2_2", "v2_3")
| V3 %among% c("v3_5", "v3_1", "v3_2", "v3_4"))) | (V2 %among% c("v2_4", "v2_1") | V3 %among% c("v3_3", "v3_5", "v3_1",
"v3_4")) & (V1 %among% c("v1_2", "v1_3", "v1_5") & V2 %among% "v2_5") & (V1 %among% c("v1_2", "v1_5") | V2 %among%
c("v2_3", "v2_1", "v2_4", "v2_5") | (V4 %among% "v4_1" | V2 %among% "v2_2")))) | ((V1 %among% c("v1_1", "v1_4", "v1_5")
| V1 %among% "v1_5") & (V1 %among% c("v1_3", "v1_5") | V2 %among% c("v2_4", "v2_1")) & (V2 %among% c("v2_4", "v2_2",
"v2_1", "v2_5") & V1 %among% "v1_2" | (V1 %among% "v1_4" | V2 %among% c("v2_2", "v2_1", "v2_5", "v2_3"))) & (V1 %among%
c("v1_2", "v1_4", "v1_5") & V3 %among% c("v3_5", "v3_3") | V2 %among% "v2_3" & V1 %among% c("v1_5", "v1_3", "v1_4") |
(V4 %among% "v4_4" | V1 %among% "v1_4") & (V4 %among% "v4_3" & V3 %among% c("v3_2", "v3_4", "v3_1", "v3_5"))) | V4
%among% c("v4_2", "v4_3", "v4_1") & V3 %among% c("v3_3", "v3_5", "v3_1", "v3_2") & (V2 %among% c("v2_4", "v2_1",
"v2_5") & V3 %among% c("v3_3", "v3_4", "v3_2", "v3_5")) & (V2 %among% c("v2_3", "v2_2") & V1 %among% c("v1_1", "v1_3")
| V1 %among% "v1_4" & V1 %among% c("v1_4", "v1_1")) & ((V2 %among% c("v2_5", "v2_3") & V4 %among% c("v4_5", "v4_4",
"v4_2") | V1 %among% "v1_1" & V1 %among% c("v1_3", "v1_5")) & (V4 %among% c("v4_4", "v4_2", "v4_5") & V2 %among% "v2_2"
& (V2 %among% c("v2_4", "v2_3", "v2_5") | V4 %among% c("v4_1", "v4_4"))))) & ((V1 %among% c("v1_3", "v1_2", "v1_1") |
V2 %among% c("v2_3", "v2_1") | (V2 %among% c("v2_4", "v2_5", "v2_1") | V2 %among% c("v2_5", "v2_3", "v2_2", "v2_1")) |
V1 %among% c("v1_3", "v1_1", "v1_2") & V3 %among% c("v3_2", "v3_3", "v3_1") & (V1 %among% c("v1_3", "v1_5", "v1_4",
"v1_1") & V2 %among% c("v2_3", "v2_2"))) & ((V1 %among% c("v1_5", "v1_3", "v1_4", "v1_2") & V3 %among% c("v3_2",
"v3_5", "v3_3", "v3_1") | V3 %among% c("v3_4", "v3_3", "v3_2", "v3_1") & V4 %among% c("v4_4", "v4_3", "v4_2")) & (V1
%among% c("v1_4", "v1_2") | V4 %among% c("v4_2", "v4_1", "v4_3", "v4_5") | (V1 %among% "v1_5" | V3 %among% c("v3_4",
"v3_1")))) & (((V1 %among% c("v1_4", "v1_3") | V1 %among% "v1_3") & (V4 %among% c("v4_5", "v4_1", "v4_2") & V1 %among%
c("v1_2", "v1_1", "v1_4")) | V1 %among% c("v1_1", "v1_2") & V4 %among% "v4_5" & (V1 %among% c("v1_3", "v1_5", "v1_1",
"v1_4") | V1 %among% c("v1_1", "v1_2", "v1_5"))) & ((V4 %among% c("v4_2", "v4_4", "v4_1") | V2 %among% c("v2_2",
"v2_4")) & (V1 %among% c("v1_3", "v1_2", "v1_5") | V1 %among% c("v1_2", "v1_1", "v1_5")) & (V3 %among% c("v3_2",
"v3_3", "v3_4", "v3_5") & V4 %among% c("v4_4", "v4_5", "v4_3", "v4_2") | V2 %among% c("v2_4", "v2_5", "v2_2", "v2_3") &
V4 %among% c("v4_1", "v4_5", "v4_3"))))))

0 comments on commit a2bf056

Please sign in to comment.