Exemplo n.º 1
0
 def visit_logical_constant(self, logical_constant):
     if (isinstance(logical_constant.get_type(), ComplexType) and
             not LogicLanguageServices.is_coordination_predicate(logical_constant) and
             not LogicLanguageServices.is_array_index_predicate(logical_constant) and
             not LogicLanguageServices.is_array_sub_predicate(logical_constant)):
         self.predicates.add(logical_constant)
Exemplo n.º 2
0
 def do_is_factorable(cls, constant):
     return not LogicLanguageServices.is_coordination_predicate(constant) and \
            not LogicLanguageServices.is_array_index_predicate(constant) and \
            not LogicLanguageServices.is_array_sub_predicate(constant) and \
            LogicLanguageServices.get_type_repository().get_index_type() != constant.get_type() and \
            constant not in cls.unfactored_constants