Skip to content
Snippets Groups Projects
Commit 9baadd76 authored by Jonas Blatt's avatar Jonas Blatt :ant:
Browse files

Merge branch 'bugfix/booleanmissingrules' into 'develop'

Resolve "Missing Rules -> Booleans"

Closes #26

See merge request jonasblatt/ma-jonasblatt-dmn-verifier!52
parents 62443672 9551d7fd
No related branches found
No related tags found
No related merge requests found
...@@ -48,7 +48,7 @@ public class BiCreaterLowerBounds extends AbstractBoundaryBiCreater<AbstractGrow ...@@ -48,7 +48,7 @@ public class BiCreaterLowerBounds extends AbstractBoundaryBiCreater<AbstractGrow
} }
} }
if (b1 instanceof LongBoundary) { if (b1 instanceof LongBoundary) {
if (b1.getUpperBound().equals((long) b2.getUpperBound() + 1) if ((long) b1.getLowerBound() + 1 == (int) b2.getLowerBound()
&& b1.getLowerBoundType() == EXCLUSIVE && b1.getLowerBoundType() == EXCLUSIVE
&& b2.getLowerBoundType() == INCLUSIVE) { && b2.getLowerBoundType() == INCLUSIVE) {
return Optional.empty(); return Optional.empty();
......
package de.unikoblenz.fgbks.base.utils.boundary.impl; package de.unikoblenz.fgbks.base.utils.boundary.impl;
import static de.unikoblenz.fgbks.base.utils.boundary.BoundType.EXCLUSIVE;
import static de.unikoblenz.fgbks.base.utils.boundary.BoundType.INCLUSIVE; import static de.unikoblenz.fgbks.base.utils.boundary.BoundType.INCLUSIVE;
import de.unikoblenz.fgbks.base.utils.boundary.AbstractGrowingBoundary; import de.unikoblenz.fgbks.base.utils.boundary.AbstractGrowingBoundary;
...@@ -63,6 +64,19 @@ public class BooleanBoundary extends AbstractGrowingBoundary<Boolean> { ...@@ -63,6 +64,19 @@ public class BooleanBoundary extends AbstractGrowingBoundary<Boolean> {
} }
} }
@Override
protected void validate() throws BoundaryParseException {
if (lowerBoundType == EXCLUSIVE) {
lowerBound = true;
lowerBoundType = INCLUSIVE;
}
if (upperBoundType == EXCLUSIVE) {
upperBound = false;
upperBoundType = INCLUSIVE;
}
super.validate();
}
/** /**
* Get the boolean boundary: "true", "false" or "". * Get the boolean boundary: "true", "false" or "".
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment