pFmt = f;
break;
}
}
if( pFmt == null ) {
result = new ReasoningRun( testcase, INCOMPLETE, type, OwlApi3AbstractRunner.this,
"No acceptable serialization formats found for premise ontology." );
return;
}
for( SerializationFormat f : formatList ) {
if( testcase.getConclusionFormats().contains( f ) ) {
cFmt = f;
break;
}
}
if( cFmt == null ) {
result = new ReasoningRun( testcase, INCOMPLETE, type, OwlApi3AbstractRunner.this,
"No acceptable serialization formats found for conclusion ontology." );
return;
}
OWLOntology premise, conclusion;
try {
long parseStart = System.currentTimeMillis();
premise = testcase.parsePremiseOntology( pFmt );
conclusion = testcase.parseConclusionOntology( cFmt );
long parseEnd = System.currentTimeMillis();
System.err.println(testcase.getIdentifier() + " parse time " + ((parseEnd - parseStart)/1000));
} catch( OntologyParseException e ) {
result = new ReasoningRun( testcase, INCOMPLETE, type, OwlApi3AbstractRunner.this,
"Exception parsing input ontology: " + e.getLocalizedMessage(), e );
return;
}
try {
boolean entailed = isEntailed(premise, conclusion );
if( entailed )
result = new ReasoningRun( testcase, POSITIVE_ENTAILMENT.equals( type )
? PASSING
: FAILING, type, OwlApi3AbstractRunner.this );
else
result = new ReasoningRun( testcase, NEGATIVE_ENTAILMENT.equals( type )
? PASSING
: FAILING, type, OwlApi3AbstractRunner.this );
} catch( Throwable th ) {
System.gc();
th.printStackTrace();
result = new ReasoningRun( testcase, INCOMPLETE, type, OwlApi3AbstractRunner.this,
"Caught throwable: " + th.getLocalizedMessage(), th );
}
}