stability_label_algorithm/modules/argumentation/labelers/acceptability_labeler.py
def color_literal(argumentation_theory, literal, labels):
        """
        Color the Literal, that is: check, based on observations/Rules for this Literal/Rules for its contraries, if
        this Literal may be unsatisfiable, defended, out or blocked.
        """
        if literal.is_observable:
            if literal in argumentation_theory.knowledge_base:
                labels.literal_labeling[literal].blocked = False            # L-B-a
                labels.literal_labeling[literal].out = False                # L-O-a
            else:
                if any([contrary_literal in argumentation_theory.knowledge_base
                        for contrary_literal in literal.contraries]):
                    labels.literal_labeling[literal].blocked = False        # L-B-b
                    labels.literal_labeling[literal].defended = False       # L-D-a

        if literal not in argumentation_theory.knowledge_base:
            if all([not labels.rule_labeling[rule].defended for rule in literal.children]):
                labels.literal_labeling[literal].defended = False           # L-D-b
            if any([not labels.rule_labeling[contrary_rule].unsatisfiable and
                    not labels.rule_labeling[contrary_rule].out
                    for contrary_literal in literal.contraries
                    for contrary_rule in contrary_literal.children]):
                labels.literal_labeling[literal].defended = False           # L-D-c

        if all([contrary_literal not in argumentation_theory.knowledge_base
                for contrary_literal in literal.contraries]):
            if all([not labels.rule_labeling[rule].out for rule in literal.children]):
                labels.literal_labeling[literal].out = False                # L-O-b
            if any([not labels.rule_labeling[rule].unsatisfiable and not labels.rule_labeling[rule].out
                    for rule in literal.children]):
                labels.literal_labeling[literal].out = False                # L-O-c

        if all([not labels.rule_labeling[rule].defended and
                not labels.rule_labeling[rule].blocked for rule in literal.children]):
            labels.literal_labeling[literal].blocked = False                # L-B-c
        if all([not labels.rule_labeling[rule].blocked for rule in literal.children]) and \
                all([not labels.rule_labeling[contrary_rule].blocked and
                     not labels.rule_labeling[contrary_rule].defended
                     for contrary_literal in literal.contraries
                     for contrary_rule in contrary_literal.children]):
            labels.literal_labeling[literal].blocked = False                # L-B-d
        if any([not labels.rule_labeling[rule].unsatisfiable and not labels.rule_labeling[rule].out and
                not labels.rule_labeling[rule].blocked
                for rule in literal.children]) and \
                all([not labels.rule_labeling[contrary_rule].blocked and
                     not labels.rule_labeling[contrary_rule].defended
                     for contrary_literal in literal.contraries
                     for contrary_rule in contrary_literal.children]):
            labels.literal_labeling[literal].blocked = False                # L-B-e

        Color the Literal, that is: check, based on observations/Rules for this Literal/Rules for its contraries, if
        this Literal may be unsatisfiable, defended, out or blocked.
        
Color the Literal, that is: check, based on observations/Rules for this Literal/Rules for its contraries, if
this Literal may be unsatisfiable, defended, out or blocked.
Color the Literal that is : check based on observations / Rules for this Literal / Rules for its contraries if this Literal may be unsatisfiable defended out or blocked .
def color_literal(argumentation_theory, literal, labels):
        if literal.is_observable:
            if literal in argumentation_theory.knowledge_base:
                labels.literal_labeling[literal].blocked = False            
                labels.literal_labeling[literal].out = False                
            else:
                if any([contrary_literal in argumentation_theory.knowledge_base
                        for contrary_literal in literal.contraries]):
                    labels.literal_labeling[literal].blocked = False        
                    labels.literal_labeling[literal].defended = False       
        if literal not in argumentation_theory.knowledge_base:
            if all([not labels.rule_labeling[rule].defended for rule in literal.children]):
                labels.literal_labeling[literal].defended = False           
            if any([not labels.rule_labeling[contrary_rule].unsatisfiable and
                    not labels.rule_labeling[contrary_rule].out
                    for contrary_literal in literal.contraries
                    for contrary_rule in contrary_literal.children]):
                labels.literal_labeling[literal].defended = False           
        if all([contrary_literal not in argumentation_theory.knowledge_base
                for contrary_literal in literal.contraries]):
            if all([not labels.rule_labeling[rule].out for rule in literal.children]):
                labels.literal_labeling[literal].out = False                
            if any([not labels.rule_labeling[rule].unsatisfiable and not labels.rule_labeling[rule].out
                    for rule in literal.children]):
                labels.literal_labeling[literal].out = False                
        if all([not labels.rule_labeling[rule].defended and
                not labels.rule_labeling[rule].blocked for rule in literal.children]):
            labels.literal_labeling[literal].blocked = False                
        if all([not labels.rule_labeling[rule].blocked for rule in literal.children]) and \
                all([not labels.rule_labeling[contrary_rule].blocked and
                     not labels.rule_labeling[contrary_rule].defended
                     for contrary_literal in literal.contraries
                     for contrary_rule in contrary_literal.children]):
            labels.literal_labeling[literal].blocked = False                
        if any([not labels.rule_labeling[rule].unsatisfiable and not labels.rule_labeling[rule].out and
                not labels.rule_labeling[rule].blocked
                for rule in literal.children]) and \
                all([not labels.rule_labeling[contrary_rule].blocked and
                     not labels.rule_labeling[contrary_rule].defended
                     for contrary_literal in literal.contraries
                     for contrary_rule in contrary_literal.children]):
            labels.literal_labeling[literal].blocked = False                
def color_literal ( argumentation_theory , literal , labels ) : if literal . is_observable : if literal in argumentation_theory . knowledge_base : labels . literal_labeling [ literal ] . blocked = False labels . literal_labeling [ literal ] . out = False else : if any ( [ contrary_literal in argumentation_theory . knowledge_base for contrary_literal in literal . contraries ] ) : labels . literal_labeling [ literal ] . blocked = False labels . literal_labeling [ literal ] . defended = False if literal not in argumentation_theory . knowledge_base : if all ( [ not labels . rule_labeling [ rule ] . defended for rule in literal . children ] ) : labels . literal_labeling [ literal ] . defended = False if any ( [ not labels . rule_labeling [ contrary_rule ] . unsatisfiable and not labels . rule_labeling [ contrary_rule ] . out for contrary_literal in literal . contraries for contrary_rule in contrary_literal . children ] ) : labels . literal_labeling [ literal ] . defended = False if all ( [ contrary_literal not in argumentation_theory . knowledge_base for contrary_literal in literal . contraries ] ) : if all ( [ not labels . rule_labeling [ rule ] . out for rule in literal . children ] ) : labels . literal_labeling [ literal ] . out = False if any ( [ not labels . rule_labeling [ rule ] . unsatisfiable and not labels . rule_labeling [ rule ] . out for rule in literal . children ] ) : labels . literal_labeling [ literal ] . out = False if all ( [ not labels . rule_labeling [ rule ] . defended and not labels . rule_labeling [ rule ] . blocked for rule in literal . children ] ) : labels . literal_labeling [ literal ] . blocked = False if all ( [ not labels . rule_labeling [ rule ] . blocked for rule in literal . children ] ) and all ( [ not labels . rule_labeling [ contrary_rule ] . blocked and not labels . rule_labeling [ contrary_rule ] . defended for contrary_literal in literal . contraries for contrary_rule in contrary_literal . children ] ) : labels . literal_labeling [ literal ] . blocked = False if any ( [ not labels . rule_labeling [ rule ] . unsatisfiable and not labels . rule_labeling [ rule ] . out and not labels . rule_labeling [ rule ] . blocked for rule in literal . children ] ) and all ( [ not labels . rule_labeling [ contrary_rule ] . blocked and not labels . rule_labeling [ contrary_rule ] . defended for contrary_literal in literal . contraries for contrary_rule in contrary_literal . children ] ) : labels . literal_labeling [ literal ] . blocked = False
Color the Literal, that is: check, based on observations/Rules for this Literal/Rules for its contraries, if
this Literal may be unsatisfiable, defended, out or blocked.
Color the Literal that is : check based on observations / Rules for this Literal / Rules for its contraries if this Literal may be unsatisfiable defended out or blocked .
"""
        Color the Literal, that is: check, based on observations/Rules for this Literal/Rules for its contraries, if
        this Literal may be unsatisfiable, defended, out or blocked.
        """ # L-B-a # L-O-a # L-B-b # L-D-a # L-D-b # L-D-c # L-O-b # L-O-c # L-B-c # L-B-d # L-B-e
argumentation_theory
literal
labels