Create a list of safe variables: variables bounded to constants or
        that occur in a positive goal

def get_safe_variables(self,query,var_dict):
        ''' Create a list of safe variables: variables bounded to constants or
        that occur in a positive goal '''

        variables_bounded_to_constants = []

        for constraint in query.constraints:
            if (constraint.get_left_side().is_variable() and
                constraint.get_right_side().is_constant() and
                constraint.is_equality_constraint()):
                    variables_bounded_to_constants.append(constraint.get_left_side())

        safe_variables = list(var_dict) + variables_bounded_to_constants

        return safe_variables