Skip to content

Commit

Permalink
release 4.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ignazio1977 committed Oct 18, 2015
1 parent 836e34a commit 071feb0
Show file tree
Hide file tree
Showing 4 changed files with 169 additions and 177 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<groupId>net.sourceforge.owlapi</groupId>
<artifactId>jfact</artifactId>
<packaging>bundle</packaging>
<version>4.0.2-SNAPSHOT</version>
<version>4.0.2</version>
<name>JFact</name>
<description>JFact is an OWL DL reasoner, based on FaCT++</description>
<url>http://jfact.sourceforge.net</url>
Expand Down Expand Up @@ -52,7 +52,7 @@

<profiles>
<profile>
<id>release-sign-artifacts</id>
<id>release</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
Expand Down Expand Up @@ -225,7 +225,7 @@
<dependency>
<groupId>edu.stanford.protege</groupId>
<artifactId>org.protege.editor.owl</artifactId>
<version>[4.3,5]</version>
<version>4.3.0</version>
<optional>true</optional>
</dependency>
<dependency>
Expand Down
230 changes: 116 additions & 114 deletions src/main/java/uk/ac/manchester/cs/jfact/kernel/DLDag.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ public void updateIndex(DagTag tag, int value) {
*
* @param v
* v
* @param knownNew
* true if the vertex is known to be new
* @return size of heap
*/
@PortedFrom(file = "dlDag.h", name = "directAdd")
Expand Down Expand Up @@ -411,19 +413,19 @@ public void removeQuery() {
for (int i = size() - 1; i >= finalDagSize; --i) {
DLVertex v = heap.get(i);
switch (v.getType()) {
case dtDataType:
case dtDataExpr:
((DatatypeEntry) v.getConcept()).setIndex(bpINVALID);
break;
case dtDataValue:
((LiteralEntry) v.getConcept()).setIndex(bpINVALID);
break;
case dtPConcept:
case dtNConcept:
((Concept) v.getConcept()).clear();
break;
default:
break;
case dtDataType:
case dtDataExpr:
((DatatypeEntry) v.getConcept()).setIndex(bpINVALID);
break;
case dtDataValue:
((LiteralEntry) v.getConcept()).setIndex(bpINVALID);
break;
case dtPConcept:
case dtNConcept:
((Concept) v.getConcept()).clear();
break;
default:
break;
}
}
resize(heap, finalDagSize);
Expand Down Expand Up @@ -478,44 +480,44 @@ private void computeVertexStat(DLVertex v, boolean pos, int depth) {
// ensure that the statistic is gather for all sub-concepts of the
// expression
switch (v.getType()) {
case dtCollection: // if pos then behaves like and
if (!pos) {
case dtCollection: // if pos then behaves like and
if (!pos) {
break;
}
// fallthrough
//$FALL-THROUGH$
case dtAnd: // check all the conjuncts
for (int q : v.begin()) {
int index = createBiPointer(q, pos);
DLVertex vertex = get(index);
boolean pos2 = index > 0;
if (!vertex.isProcessed(pos2)) {
computeVertexStat(vertex, pos2, depth + 1);
}
}
break;
}
// fallthrough
//$FALL-THROUGH$
case dtAnd: // check all the conjuncts
for (int q : v.begin()) {
int index = createBiPointer(q, pos);
case dtProj:
if (!pos) {
break;
}
// fallthrough
//$FALL-THROUGH$
case dtPConcept:
case dtNConcept:
case dtPSingleton:
case dtNSingleton:
case dtForall:
case dtChoose:
case dtLE: // check a single referenced concept
int index = createBiPointer(v.getConceptIndex(), pos);
DLVertex vertex = get(index);
boolean pos2 = index > 0;
if (!vertex.isProcessed(pos2)) {
computeVertexStat(vertex, pos2, depth + 1);
}
}
break;
case dtProj:
if (!pos) {
break;
}
// fallthrough
//$FALL-THROUGH$
case dtPConcept:
case dtNConcept:
case dtPSingleton:
case dtNSingleton:
case dtForall:
case dtChoose:
case dtLE: // check a single referenced concept
int index = createBiPointer(v.getConceptIndex(), pos);
DLVertex vertex = get(index);
boolean pos2 = index > 0;
if (!vertex.isProcessed(pos2)) {
computeVertexStat(vertex, pos2, depth + 1);
}
break;
default: // nothing to do
break;
default: // nothing to do
break;
}
v.setProcessed(pos);
// here all the necessary statistics is gathered -- use it in the init
Expand All @@ -538,39 +540,39 @@ private void updateVertexStat(DLVertex v, boolean pos) {
// correct values wrt POS
d = v.getDepth(pos);
switch (v.getType()) {
case dtAnd:
if (!pos) {
++b;
// OR is branching
}
break;
case dtForall:
++d;
// increase depth
if (!pos) {
++g;
// SOME is generating
}
break;
case dtLE:
++d;
// increase depth
if (!pos) {
++g;
// >= is generating
} else if (v.getNumberLE() != 1) {
++b;
// <= is branching
}
break;
case dtProj:
if (pos) {
++b;
// projection sometimes involves branching
}
break;
default:
break;
case dtAnd:
if (!pos) {
++b;
// OR is branching
}
break;
case dtForall:
++d;
// increase depth
if (!pos) {
++g;
// SOME is generating
}
break;
case dtLE:
++d;
// increase depth
if (!pos) {
++g;
// >= is generating
} else if (v.getNumberLE() != 1) {
++b;
// <= is branching
}
break;
case dtProj:
if (pos) {
++b;
// projection sometimes involves branching
}
break;
default:
break;
}
v.updateStatValues(d, s, b, g, pos);
}
Expand Down Expand Up @@ -806,43 +808,43 @@ private void mergeSorts(Role R) {
@SuppressWarnings("incomplete-switch")
private void mergeSorts(DLVertex v) {
switch (v.getType()) {
case dtLE: // set R&D for role
case dtForall:
v.merge(v.getRole().getDomainLabel()); // domain(role)=cur
merge(v.getRole().getRangeLabel(), v.getConceptIndex());
break;
case dtProj: // projection: equate R&D of R and ProjR, and D(R) with
// C
v.merge(v.getRole().getDomainLabel());
v.merge(v.getProjRole().getDomainLabel());
merge(v.getRole().getDomainLabel(), v.getConceptIndex());
v.getRole().getRangeLabel().merge(v.getProjRole().getRangeLabel());
break;
case dtIrr: // equate R&D for role
v.merge(v.getRole().getDomainLabel());
v.merge(v.getRole().getRangeLabel());
break;
case dtAnd:
case dtCollection:
for (int q : v.begin()) {
merge(v.getSort(), q);
}
break;
case dtNSingleton:
case dtPSingleton:
case dtPConcept:
case dtNConcept: // merge with description
case dtChoose:
merge(v.getSort(), v.getConceptIndex());
break;
case dtDataType: // nothing to do
case dtDataValue:
case dtDataExpr:
case dtNN:
break;
case dtTop:
default:
throw new UnreachableSituationException();
case dtLE: // set R&D for role
case dtForall:
v.merge(v.getRole().getDomainLabel()); // domain(role)=cur
merge(v.getRole().getRangeLabel(), v.getConceptIndex());
break;
case dtProj: // projection: equate R&D of R and ProjR, and D(R) with
// C
v.merge(v.getRole().getDomainLabel());
v.merge(v.getProjRole().getDomainLabel());
merge(v.getRole().getDomainLabel(), v.getConceptIndex());
v.getRole().getRangeLabel().merge(v.getProjRole().getRangeLabel());
break;
case dtIrr: // equate R&D for role
v.merge(v.getRole().getDomainLabel());
v.merge(v.getRole().getRangeLabel());
break;
case dtAnd:
case dtCollection:
for (int q : v.begin()) {
merge(v.getSort(), q);
}
break;
case dtNSingleton:
case dtPSingleton:
case dtPConcept:
case dtNConcept: // merge with description
case dtChoose:
merge(v.getSort(), v.getConceptIndex());
break;
case dtDataType: // nothing to do
case dtDataValue:
case dtDataExpr:
case dtNN:
break;
case dtTop:
default:
throw new UnreachableSituationException();
}
}

Expand Down
Loading

0 comments on commit 071feb0

Please sign in to comment.