Package com.clarkparsia.owlapi.explanation.util

Examples of com.clarkparsia.owlapi.explanation.util.DefinitionTracker


        this.ontology = checkNotNull(ontology, "ontology cannot be null");
        this.reasonerFactory = checkNotNull(reasonerFactory,
                "reasonerFactory cannot be null");
        this.reasoner = checkNotNull(reasoner, "reasoner cannot be null");
        owlOntologyManager = ontology.getOWLOntologyManager();
        definitionTracker = new DefinitionTracker(ontology);
    }
View Full Code Here


    public SingleExplanationGeneratorImpl(OWLOntology ontology, OWLReasonerFactory reasonerFactory, OWLReasoner reasoner) {
        this.ontology = ontology;
        this.reasonerFactory = reasonerFactory;
        this.reasoner = reasoner;
        this.owlOntologyManager = ontology.getOWLOntologyManager();
        definitionTracker = new DefinitionTracker(ontology);
    }
View Full Code Here

    public SingleExplanationGeneratorImpl(OWLOntology ontology, OWLReasonerFactory reasonerFactory, OWLReasoner reasoner) {
        this.ontology = ontology;
        this.reasonerFactory = reasonerFactory;
        this.reasoner = reasoner;
        this.owlOntologyManager = ontology.getOWLOntologyManager();
        definitionTracker = new DefinitionTracker(ontology);
    }
View Full Code Here

        return prunedExplanation;

      // create an ontology from the explanation axioms
      OWLOntology debuggingOntology = OWL.Ontology( explanation );
     
      DefinitionTracker defTracker = new DefinitionTracker( debuggingOntology );

      // since explanation size is generally small we can create and use a
      // completely new reasoner rather than destroying the state on already
      // existing reasoner
      PelletReasoner reasoner = getReasonerFactory().createNonBufferingReasoner( debuggingOntology );
           
      if( !defTracker.isDefined( unsatClass ) ) {
        log.warning( "Some of the entities in " + unsatClass
            + " are not defined in the explanation " + explanation );
      }
     
      if( isSatisfiable( reasoner, unsatClass, true ) ) {
        log.warning( "Explanation incomplete: Concept " + unsatClass
            + " is satisfiable in the explanation " + explanation );
      }

      // simply remove axioms one at a time. If the unsatClass turns
      // satisfiable then we know that axiom cannot be a part of minimal
      // explanation
      for( OWLAxiom axiom : explanation ) {
        if( log.isLoggable( Level.FINER ) )
          log.finer( "Try pruning " + axiom );
       
        if( !incremental) {
          reasoner.dispose();
        }
       
        OntologyUtils.removeAxioms( debuggingOntology, axiom );
       
        if( !incremental) {
          reasoner = getReasonerFactory().createNonBufferingReasoner( debuggingOntology );
        }
       
        reasoner.getKB().prepare();

        if( defTracker.isDefined( unsatClass )
            && !isSatisfiable( reasoner, unsatClass, false ) ) {
          // does not affect satisfiability so remove from the results
          prunedExplanation.remove( axiom );
         
          if( log.isLoggable( Level.FINER ) )
View Full Code Here

TOP

Related Classes of com.clarkparsia.owlapi.explanation.util.DefinitionTracker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.