Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Optimize methods for searching OWLAxioms by OWLObject & Position & AxiomType #12

Closed
sszuev opened this issue Mar 4, 2020 · 2 comments
Closed
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@sszuev
Copy link
Contributor

sszuev commented Mar 4, 2020

Not all methods of such kind have optimizations yet.
This could be critical for some systems and big ontologies.
This is the old issue, the source: https://github.com/avicomp/ont-api/issues/33

List of methods for optimization --

  • for OWLDatatype:
1 ::: Stream<OWLDatatypeDefinitionAxiom> axioms(OWLDatatype)
2 ::: Stream<OWLDatatypeDefinitionAxiom> datatypeDefinitions(OWLDatatype)
  • for OWLClass:
1 ::: Stream<OWLClassAxiom> axioms(OWLClass)
2 ::: Stream<OWLEquivalentClassesAxiom> equivalentClassesAxioms(OWLClass)
3 ::: Stream<OWLSubClassOfAxiom> subClassAxiomsForSuperClass(OWLClass)
4 ::: Stream<OWLSubClassOfAxiom> subClassAxiomsForSubClass(OWLClass)
5 ::: Stream<OWLDisjointClassesAxiom> disjointClassesAxioms(OWLClass)
6 ::: Stream<OWLDisjointUnionAxiom> disjointUnionAxioms(OWLClass)
7 ::: Stream<OWLClassAssertionAxiom> classAssertionAxioms(OWLClassExpression)
8 ::: Stream<OWLHasKeyAxiom> hasKeyAxioms(OWLClass)
  • for OWLIndividual:
1 ::: Stream<OWLIndividualAxiom> axioms(OWLIndividual)
2 ::: Stream<OWLClassAssertionAxiom> classAssertionAxioms(OWLIndividual)
3 ::: Stream<OWLSameIndividualAxiom> sameIndividualAxioms(OWLIndividual)
4 ::: Stream<OWLDifferentIndividualsAxiom> differentIndividualAxioms(OWLIndividual)
5 ::: Stream<OWLObjectPropertyAssertionAxiom> objectPropertyAssertionAxioms(OWLIndividual)
6 ::: Stream<OWLNegativeObjectPropertyAssertionAxiom> negativeObjectPropertyAssertionAxioms(OWLIndividual)
7 ::: Stream<OWLDataPropertyAssertionAxiom> dataPropertyAssertionAxioms(OWLIndividual)
8 ::: Stream<OWLNegativeDataPropertyAssertionAxiom> negativeDataPropertyAssertionAxioms(OWLIndividual)
  • for OWLObjectProperty:
1 ::: Stream<OWLObjectPropertyAxiom> axioms(OWLObjectPropertyExpression)
2 ::: Stream<OWLEquivalentObjectPropertiesAxiom> equivalentObjectPropertiesAxioms(OWLObjectPropertyExpression)
3 ::: Stream<OWLSubObjectPropertyOfAxiom> objectSubPropertyAxiomsForSuperProperty(OWLObjectPropertyExpression)
4 ::: Stream<OWLSubObjectPropertyOfAxiom> objectSubPropertyAxiomsForSubProperty(OWLObjectPropertyExpression)
5 ::: Stream<OWLInverseObjectPropertiesAxiom> inverseObjectPropertyAxioms(OWLObjectPropertyExpression)
6 ::: Stream<OWLFunctionalObjectPropertyAxiom> functionalObjectPropertyAxioms(OWLObjectPropertyExpression)
7 ::: Stream<OWLInverseFunctionalObjectPropertyAxiom> inverseFunctionalObjectPropertyAxioms(OWLObjectPropertyExpression)
8 ::: Stream<OWLSymmetricObjectPropertyAxiom> symmetricObjectPropertyAxioms(OWLObjectPropertyExpression)
9 ::: Stream<OWLAsymmetricObjectPropertyAxiom> asymmetricObjectPropertyAxioms(OWLObjectPropertyExpression)
10 ::: Stream<OWLTransitiveObjectPropertyAxiom> transitiveObjectPropertyAxioms(OWLObjectPropertyExpression)
11 ::: Stream<OWLReflexiveObjectPropertyAxiom> reflexiveObjectPropertyAxioms(OWLObjectPropertyExpression)
12 ::: Stream<OWLIrreflexiveObjectPropertyAxiom> irreflexiveObjectPropertyAxioms(OWLObjectPropertyExpression)
13 ::: Stream<OWLObjectPropertyDomainAxiom> objectPropertyDomainAxioms(OWLObjectPropertyExpression)
14 ::: Stream<OWLObjectPropertyRangeAxiom> objectPropertyRangeAxioms(OWLObjectPropertyExpression)
15 ::: Stream<OWLDisjointObjectPropertiesAxiom> disjointObjectPropertiesAxioms(OWLObjectPropertyExpression)
  • for OWLDataProperty:
1 ::: Stream<OWLDataPropertyAxiom> axioms(OWLDataProperty)
2 ::: Stream<OWLEquivalentDataPropertiesAxiom> equivalentDataPropertiesAxioms(OWLDataProperty)
3 ::: Stream<OWLSubDataPropertyOfAxiom> dataSubPropertyAxiomsForSuperProperty(OWLDataPropertyExpression)
4 ::: Stream<OWLSubDataPropertyOfAxiom> dataSubPropertyAxiomsForSubProperty(OWLDataProperty)
5 ::: Stream<OWLFunctionalDataPropertyAxiom> functionalDataPropertyAxioms(OWLDataPropertyExpression)
6 ::: Stream<OWLDataPropertyDomainAxiom> dataPropertyDomainAxioms(OWLDataProperty)
7 ::: Stream<OWLDataPropertyRangeAxiom> dataPropertyRangeAxioms(OWLDataProperty)
8 ::: Stream<OWLDisjointDataPropertiesAxiom> disjointDataPropertiesAxioms(OWLDataProperty)
  • for OWLAnnotationProperty:
1 ::: Stream<OWLAnnotationAxiom> axioms(OWLAnnotationProperty)
2 ::: Stream<OWLSubAnnotationPropertyOfAxiom> subAnnotationPropertyOfAxioms(OWLAnnotationProperty)
3 ::: Stream<OWLAnnotationPropertyRangeAxiom> annotationPropertyRangeAxioms(OWLAnnotationProperty)
4 ::: Stream<OWLAnnotationPropertyDomainAxiom> annotationPropertyDomainAxioms(OWLAnnotationProperty)

@sszuev sszuev added the enhancement New feature or request label Mar 4, 2020
@sszuev sszuev changed the title Optimize OWLAxiom search by OWLObject methods Optimize OWLAxiom search by OWLObject/AxiomType/Position methods Apr 17, 2020
@sszuev
Copy link
Contributor Author

sszuev commented May 5, 2020

Note that the optimizations for OWLClass number 2 (equivalentClassesAxioms) and 4 (subClassAxiomsForSubClass) are already done.
The following two optimizations are also ready:

Stream<OWLDeclarationAxiom> declarationAxioms(OWLEntity)
Stream<OWLAnnotationAssertionAxiom> annotationAssertionAxioms(OWLAnnotationSubject)

@sszuev sszuev changed the title Optimize OWLAxiom search by OWLObject/AxiomType/Position methods Optimize methods for searching OWLAxioms by OWLObject & Position & AxiomType May 5, 2020
sszuev added a commit that referenced this issue May 5, 2020
…esAxioms, subClassAxiomsForSubClass and declarationAxioms) + fix DeclarationByEntity searcher (must return only local axioms)
sszuev added a commit that referenced this issue May 5, 2020
…ement + add search-by-objects test-data for OWLOntology#annotationAssertionAxioms(OWLAnnotationSubject) method(issue #12)
sszuev added a commit that referenced this issue May 6, 2020
…to #reduce() and list* #methods) + add tests for OWLOntology#subClassAxiomsForSuperClass (#12)
sszuev added a commit that referenced this issue May 7, 2020
sszuev added a commit that referenced this issue May 11, 2020
…ms(Class<A>, OWLObject, boolean); axioms-by-object methods moved to InternalModel, add ListAxioms interface (related to issue #12)
sszuev added a commit that referenced this issue May 16, 2020
sszuev added a commit that referenced this issue May 16, 2020
sszuev added a commit that referenced this issue May 17, 2020
…tion (#12), add tests + minor refactoring of internal.searchers.axioms api
sszuev added a commit that referenced this issue May 17, 2020
sszuev added a commit that referenced this issue May 17, 2020
sszuev added a commit that referenced this issue May 19, 2020
@sszuev
Copy link
Contributor Author

sszuev commented Nov 4, 2020

The main cases are covered, all others are rare.
Optimizations for these rest cases can be proposed later, when an understanding of their need arises: right now the existing mechanisms seem to be good enough.

@sszuev sszuev added the wontfix This will not be worked on label Dec 24, 2020
@sszuev sszuev closed this as completed Dec 5, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant