private void incrementalClassify() { if( log.isLoggable( Level.FINE ) ) { log.fine( "Incremental classification starting" ); } Timer timer = timers.startTimer( "incrementalClassify" ); incClassifyAllModStrategy(); timer.stop(); if( log.isLoggable( Level.FINE ) ) { log.fine( "Incremental classification done" ); } }
public Timer startTimer(String name) { Timer t = getTimer(name); if(t == null) t = createTimer(name); t.start(); return t; }
protected boolean findTarget(ATermAppl term, ATermAppl target, Set<ATermAppl> seen) { List<ATermAppl> queue = new ArrayList<ATermAppl>(); queue.add( term ); while( !queue.isEmpty() ) { kb.timers.checkTimer( "preprocessing" ); ATermAppl current = queue.remove( queue.size() - 1 ); if( !seen.add( current ) ) { continue; } if( current.equals( target ) ) { return true; } TermDefinition td = this.getTD( current ); if( td != null ) { // Shortcut if( td.getDependencies().contains( target ) ) { return true; } queue.addAll( td.getDependencies() ); } } return false; }
public boolean isSubClassOf(ATermAppl c1, ATermAppl c2) { if( !doExplanation ) { Bool isKnownSubClass = isKnownSubClassOf( c1, c2 ); if( isKnownSubClass.isKnown() ) { return isKnownSubClass.isTrue(); } } if( log.isLoggable( Level.FINE ) ) { long count = kb.timers.getTimer( "subClassSat" ) == null ? 0 : kb.timers.getTimer( "subClassSat" ).getCount(); log.fine( count + ") Checking subclass [" + ATermUtils.toString( c1 ) + " " + ATermUtils.toString( c2 ) + "]" ); } ATermAppl notC2 = ATermUtils.negate( c2 ); ATermAppl c = ATermUtils.makeAnd( c1, notC2 ); Timer t = kb.timers.startTimer( "subClassSat" ); boolean sub = !isSatisfiable( c, false ); t.stop(); if( log.isLoggable( Level.FINE ) ) { log.fine( " Result: " + sub + " (" + t.getLast() + "ms)" ); } return sub; }
kb.timers.createTimer( "classifySub" ); log.fine( "Classes: " + classCount + " Individuals: " + kb.getIndividuals().size() ); Timer t = kb.timers.startTimer( "taxBuilder.prepare" ); prepare(); t.stop();
public void checkTimer(String name) { Timer t = getTimer(name); if (t == null) throw new UnsupportedOperationException("Timer " + name + " does not exist!"); t.check(); }
public Timers() { mainTimer = createTimer("main"); mainTimer.start(); }
public void print( final Writer pw ) { print( pw, false, "Total" ); }
public OWLOntology getLearnedOntology() { Timers timers = new Timers(); Timer timer = timers.createTimer("OntologyCreation");
public void interrupt() { kb.timers.interrupt(); }
public boolean isSubClassOf(ATermAppl c1, ATermAppl c2) { if( !doExplanation ) { Bool isKnownSubClass = isKnownSubClassOf( c1, c2 ); if( isKnownSubClass.isKnown() ) { return isKnownSubClass.isTrue(); } } if( log.isLoggable( Level.FINE ) ) { long count = kb.timers.getTimer( "subClassSat" ) == null ? 0 : kb.timers.getTimer( "subClassSat" ).getCount(); log.fine( count + ") Checking subclass [" + ATermUtils.toString( c1 ) + " " + ATermUtils.toString( c2 ) + "]" ); } ATermAppl notC2 = ATermUtils.negate( c2 ); ATermAppl c = ATermUtils.makeAnd( c1, notC2 ); Timer t = kb.timers.startTimer( "subClassSat" ); boolean sub = !isSatisfiable( c, false ); t.stop(); if( log.isLoggable( Level.FINE ) ) { log.fine( " Result: " + sub + " (" + t.getLast() + "ms)" ); } return sub; }
kb.timers.createTimer( "classifySub" ); log.fine( "Classes: " + classCount + " Individuals: " + kb.getIndividuals().size() ); Timer t = kb.timers.startTimer( "taxBuilder.prepare" ); prepare(); t.stop();
public void resetTimer(String name) { Timer t = getTimer(name); if (t == null) throw new UnsupportedOperationException("Timer " + name + " does not exist!"); t.reset(); }
public Timers() { mainTimer = createTimer("main"); mainTimer.start(); }
public void print() { print( false ); }
public void interrupt() { kb.timers.interrupt(); }
public Collection<PartialBinding> applyRete() { Timer t; if( PelletOptions.ALWAYS_REBUILD_RETE ) { t = timers.startTimer( "rule-rebuildRete" ); partialBindings.clear(); partialBindings.addAll(unsafeRules); interpreter.reset(); t.stop(); } t = timers.startTimer( "rule-reteRun" ); interpreter.run(); t.stop(); return interpreter.getBindings(); }
assert isComplete() : "Initial consistency check has not been performed!"; Timer incT = kb.timers.startTimer( "isIncConsistent" ); Timer t = kb.timers.startTimer( "isConsistent" ); Timer completionTimer = kb.timers.getTimer( "complete" ); completionTimer.start(); try {
public void setTimeout(String name, long timeout) { Timer t = getTimer(name); if (t == null) t = createTimer(name); t.setTimeout(timeout); }
public void stopTimer(String name) { Timer t = getTimer(name); if (t == null) throw new UnsupportedOperationException("Timer " + name + " does not exist!"); t.stop(); }