src/index/index.c
/*
 * Recursively checks if bottom is a given class expression contains bottom as a subexpression.
 * Returns 1 if this is the case, 0 otherwise
 */
Recursively checks if bottom is a given class expression contains bottom as a subexpression.
Returns 1 if this is the case, 0 otherwise
Recursively checks if bottom is a given class expression contains bottom as a subexpression . Returns 1 if this is the case 0 otherwise
char class_expression_contains_bottom(ClassExpression* c, TBox* tbox)  {
	switch (c->type) {
	case CLASS_TYPE:
		if (c == tbox->bottom_concept) {
			return 1;
		}
		break;
	case OBJECT_ONE_OF_TYPE:
		break;
	case OBJECT_INTERSECTION_OF_TYPE:
		if (class_expression_contains_bottom(c->description.conj.conjunct1, tbox)) {
			return 1;
		}
		if (class_expression_contains_bottom(c->description.conj.conjunct2, tbox)) {
			return 1;
		}
		break;
	case OBJECT_SOME_VALUES_FROM_TYPE:
		if (class_expression_contains_bottom(c->description.exists.filler, tbox)) {
			return 1;
		}
		break;
	default:
		fprintf(stderr, "unknown concept type, aborting\n");
		exit(EXIT_FAILURE);
	}
	return 0;
}
char class_expression_contains_bottom ( ClassExpression * c , TBox * tbox ) { switch ( c -> type ) { case CLASS_TYPE : if ( c == tbox -> bottom_concept ) { return 1 ; } break ; case OBJECT_ONE_OF_TYPE : break ; case OBJECT_INTERSECTION_OF_TYPE : if ( class_expression_contains_bottom ( c -> description . conj . conjunct1 , tbox ) ) { return 1 ; } if ( class_expression_contains_bottom ( c -> description . conj . conjunct2 , tbox ) ) { return 1 ; } break ; case OBJECT_SOME_VALUES_FROM_TYPE : if ( class_expression_contains_bottom ( c -> description . exists . filler , tbox ) ) { return 1 ; } break ; default : fprintf ( stderr , " \n " ) ; exit ( EXIT_FAILURE ) ; } return 0 ; }
Recursively checks if bottom is a given class expression contains bottom as a subexpression.
Recursively checks if bottom is a given class expression contains bottom as a subexpression .