Loading EDG/src/main/java/edg/slicing/AdaptedStandardAlgorithm.java +1 −1 Original line number Diff line number Diff line Loading @@ -118,7 +118,7 @@ public class AdaptedStandardAlgorithm implements SlicingAlgorithm { private record State(Node node, Edge.Type lastEdgeType) { private State(Node node, Edge.Type lastEdgeType) { this.node = node; if (SlicingAlgorithm.shouldTypeBeStored(node, lastEdgeType)) if (SlicingAlgorithm.shouldTypeBeStored(lastEdgeType)) this.lastEdgeType = lastEdgeType; else this.lastEdgeType = null; Loading EDG/src/main/java/edg/slicing/ConstrainedTabularAlgorithm.java +1 −1 Original line number Diff line number Diff line Loading @@ -141,7 +141,7 @@ public class ConstrainedTabularAlgorithm implements SlicingAlgorithm { List<Constraints> resolvedList = edgeCons.resolve(Phase.Tabular, edg, edge, (Constraints) work.current.stack.clone(), topConstraint, 0); for (Constraints resolved : resolvedList) if (SlicingAlgorithm.shouldTypeBeStored(nextNode, edge.getType())) if (SlicingAlgorithm.shouldTypeBeStored(edge.getType())) propagate(new Work(work, new State(nextNode, resolved), edge.getType())); else // no need to store the type, type only matters for structural and control. propagate(new Work(work, new State(nextNode, resolved))); Loading EDG/src/main/java/edg/slicing/OnePassStandardAlgorithm.java +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ public class OnePassStandardAlgorithm implements SlicingAlgorithm { private record State(Node node, Edge.Type lastEdgeType) { private State(Node node, Edge.Type lastEdgeType) { this.node = node; if (SlicingAlgorithm.shouldTypeBeStored(node, lastEdgeType)) if (SlicingAlgorithm.shouldTypeBeStored(lastEdgeType)) this.lastEdgeType = lastEdgeType; else this.lastEdgeType = null; Loading EDG/src/main/java/edg/slicing/SlicingAlgorithm.java +2 −3 Original line number Diff line number Diff line Loading @@ -70,9 +70,8 @@ public interface SlicingAlgorithm { && !(lastEdgeType == Edge.Type.Structural && edge.getType() != Edge.Type.Structural); } static boolean shouldTypeBeStored(Node node, Edge.Type edgeType) { return edgeType == Edge.Type.Structural || (node.getType() == Node.Type.Generator && edgeType == Edge.Type.Control); static boolean shouldTypeBeStored(Edge.Type edgeType) { return edgeType == Edge.Type.Structural || edgeType == Edge.Type.Control; } /** Loading EDG/src/main/java/edg/slicing/StandardAlgorithm.java +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ public class StandardAlgorithm implements SlicingAlgorithm { private record State(Node node, Edge.Type lastEdgeType) { private State(Node node, Edge.Type lastEdgeType) { this.node = node; if (SlicingAlgorithm.shouldTypeBeStored(node, lastEdgeType)) if (SlicingAlgorithm.shouldTypeBeStored(lastEdgeType)) this.lastEdgeType = lastEdgeType; else this.lastEdgeType = null; Loading Loading
EDG/src/main/java/edg/slicing/AdaptedStandardAlgorithm.java +1 −1 Original line number Diff line number Diff line Loading @@ -118,7 +118,7 @@ public class AdaptedStandardAlgorithm implements SlicingAlgorithm { private record State(Node node, Edge.Type lastEdgeType) { private State(Node node, Edge.Type lastEdgeType) { this.node = node; if (SlicingAlgorithm.shouldTypeBeStored(node, lastEdgeType)) if (SlicingAlgorithm.shouldTypeBeStored(lastEdgeType)) this.lastEdgeType = lastEdgeType; else this.lastEdgeType = null; Loading
EDG/src/main/java/edg/slicing/ConstrainedTabularAlgorithm.java +1 −1 Original line number Diff line number Diff line Loading @@ -141,7 +141,7 @@ public class ConstrainedTabularAlgorithm implements SlicingAlgorithm { List<Constraints> resolvedList = edgeCons.resolve(Phase.Tabular, edg, edge, (Constraints) work.current.stack.clone(), topConstraint, 0); for (Constraints resolved : resolvedList) if (SlicingAlgorithm.shouldTypeBeStored(nextNode, edge.getType())) if (SlicingAlgorithm.shouldTypeBeStored(edge.getType())) propagate(new Work(work, new State(nextNode, resolved), edge.getType())); else // no need to store the type, type only matters for structural and control. propagate(new Work(work, new State(nextNode, resolved))); Loading
EDG/src/main/java/edg/slicing/OnePassStandardAlgorithm.java +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ public class OnePassStandardAlgorithm implements SlicingAlgorithm { private record State(Node node, Edge.Type lastEdgeType) { private State(Node node, Edge.Type lastEdgeType) { this.node = node; if (SlicingAlgorithm.shouldTypeBeStored(node, lastEdgeType)) if (SlicingAlgorithm.shouldTypeBeStored(lastEdgeType)) this.lastEdgeType = lastEdgeType; else this.lastEdgeType = null; Loading
EDG/src/main/java/edg/slicing/SlicingAlgorithm.java +2 −3 Original line number Diff line number Diff line Loading @@ -70,9 +70,8 @@ public interface SlicingAlgorithm { && !(lastEdgeType == Edge.Type.Structural && edge.getType() != Edge.Type.Structural); } static boolean shouldTypeBeStored(Node node, Edge.Type edgeType) { return edgeType == Edge.Type.Structural || (node.getType() == Node.Type.Generator && edgeType == Edge.Type.Control); static boolean shouldTypeBeStored(Edge.Type edgeType) { return edgeType == Edge.Type.Structural || edgeType == Edge.Type.Control; } /** Loading
EDG/src/main/java/edg/slicing/StandardAlgorithm.java +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ public class StandardAlgorithm implements SlicingAlgorithm { private record State(Node node, Edge.Type lastEdgeType) { private State(Node node, Edge.Type lastEdgeType) { this.node = node; if (SlicingAlgorithm.shouldTypeBeStored(node, lastEdgeType)) if (SlicingAlgorithm.shouldTypeBeStored(lastEdgeType)) this.lastEdgeType = lastEdgeType; else this.lastEdgeType = null; Loading