@@ -2,6 +2,7 @@ import { get_client } from './shared'
22import {
33 get_all_assignments ,
44 get_categories ,
5+ get_ignored_redundant_properties ,
56 get_next_implication ,
67 get_next_implication_for_contradiction ,
78 get_normalized_category_implications ,
@@ -30,13 +31,15 @@ function check_redundant_category_property_assignments() {
3031 const implications = get_normalized_category_implications ( db )
3132 const categories = get_categories ( db )
3233 const assignments = get_all_assignments ( db , categories )
34+ const ignore_dict = get_ignored_redundant_properties ( db )
3335
3436 let redundancy_count = 0
3537
3638 for ( const category of categories ) {
3739 const redundant_satisfied_property = get_redundant_satisfied_property (
3840 assignments [ category . id ] . satisfied . non_deduced ,
3941 implications ,
42+ ignore_dict [ category . id ] ,
4043 )
4144
4245 if ( redundant_satisfied_property ) {
@@ -56,6 +59,7 @@ function check_redundant_category_property_assignments() {
5659 all_satisfied_properties ,
5760 assignments [ category . id ] . unsatisfied . non_deduced ,
5861 implications ,
62+ ignore_dict [ category . id ] ,
5963 )
6064
6165 if ( redundant_unsatisfied_property ) {
@@ -104,8 +108,10 @@ function get_deduced_satisfied_properties(
104108function get_redundant_satisfied_property (
105109 satisfied_properties : Set < string > ,
106110 implications : NormalizedCategoryImplication [ ] ,
111+ ignored : Set < string > = new Set ( ) ,
107112) {
108113 for ( const p of [ ...satisfied_properties ] ) {
114+ if ( ignored . has ( p ) ) continue
109115 satisfied_properties . delete ( p )
110116 const deduced_properties = get_deduced_satisfied_properties (
111117 satisfied_properties ,
@@ -161,8 +167,10 @@ function get_redundant_unsatisfied_property(
161167 satisfied_properties : Set < string > ,
162168 unsatisfied_properties : Set < string > ,
163169 implications : NormalizedCategoryImplication [ ] ,
170+ ignored : Set < string > = new Set ( ) ,
164171) {
165172 for ( const p of [ ...unsatisfied_properties ] ) {
173+ if ( ignored . has ( p ) ) continue
166174 unsatisfied_properties . delete ( p )
167175 const deduced_properties = get_deduced_unsatisfied_properties (
168176 satisfied_properties ,
0 commit comments