(define-ontology example () (class !entity_of_organismal_origin :partial) (object-property !has_part :transitive) (class !cell :partial !entity_of_organismal_origin) (class !cell :partial (restriction !has_part (some-values-from !dna))) (class !tissue :partial (intersection-of !entity_of_organismal_origin (restriction !has_part (some-values-from !cell)))) (class !dna :partial !entity_of_organismal_origin) (class !aggregate_of_cells :partial (intersection-of !entity_of_organismal_origin (restriction !has_part (all-values-from !cell)) (restriction !has_part (some-values-from !cell)))) (class !protocol_application :partial) (object-property !has_input (domain !protocol_application)) (object-property !has_output (domain !protocol_application)) (class !dna_extraction :complete (intersection-of !protocol_application (restriction !has_input (some-values-from (restriction !has_part (some-values-from !dna)))) (restriction !has_output (all-values-from !dna) ) (restriction !has_output (some-values-from !dna) ))) (class !cell_isolation :complete (intersection-of !protocol_application (restriction !has_input (some-values-from (restriction !has_part (some-values-from !cell)))) (restriction !has_output (all-values-from !aggregate_of_cells)) (restriction !has_output (some-values-from !aggregate_of_cells)))) (class !cell_isolation_from_tissue :complete (intersection-of !protocol_application (restriction !has_input (all-values-from !tissue)) (restriction !has_input (some-values-from !tissue)) (restriction !has_output (all-values-from !aggregate_of_cells)) (restriction !has_output (some-values-from !aggregate_of_cells)))) (class !cell_subpopulation_isolation_from_cells :complete (intersection-of !protocol_application (restriction !has_input (all-values-from !aggregate_of_cells)) (restriction !has_input (some-values-from !aggregate_of_cells)) (restriction !has_output (all-values-from !aggregate_of_cells)) (restriction !has_output (some-values-from !aggregate_of_cells))))) ;; (show-classtree example) to draw the inferred hierarchy ;; add a macro, save some typing. (defmacro some-and-all (property what) `(list (restriction ,property (all-values-from ,what)) (restriction ,property (some-values-from ,what)))) (define-ontology example2 () (class !entity_of_organismal_origin :partial) (object-property !has_part :transitive) (class !cell :partial !entity_of_organismal_origin) (class !cell :partial (restriction !has_part (some-values-from !dna))) (class !tissue :partial (intersection-of !entity_of_organismal_origin (restriction !has_part (some-values-from !cell)))) (class !dna :partial !entity_of_organismal_origin) (class !aggregate_of_cells :partial (intersection-of !entity_of_organismal_origin (some-and-all !has_part !cell))) (class !protocol_application :partial) (object-property !has_input (domain !protocol_application)) (object-property !has_output (domain !protocol_application)) (class !dna_extraction :complete (intersection-of !protocol_application (restriction !has_input (some-values-from (restriction !has_part (some-values-from !dna)))) (some-and-all !has_output !dna))) (class !cell_isolation :complete (intersection-of !protocol_application (restriction !has_input (some-values-from (restriction !has_part (some-values-from !cell)))) (some-and-all !has_output !aggregate_of_cells))) (class !cell_isolation_from_tissue :complete (intersection-of !protocol_application (some-and-all !has_input !tissue) (some-and-all !has_output !aggregate_of_cells))) (class !cell_subpopulation_isolation_from_cells :complete (intersection-of !protocol_application (some-and-all !has_input !aggregate_of_cells) (some-and-all !has_output !aggregate_of_cells))))