Loading EDG/src/main/java/edg/constraint/AsteriskConstraint.java +31 −23 Original line number Diff line number Diff line Loading @@ -42,19 +42,22 @@ public class AsteriskConstraint extends EdgeConstraint return super.wrap(new Constraints()); super.check(phase, Phase.SummaryGeneration); if (existsPreviousAsteriskConstraint(constraints)) return super.wrap(this.popToAsteriskConstraint(constraints)); if (topConstraint.operation == AccessConstraint.Operation.Remove) return super.wrap(super.push(phase, constraints)); super.check(topConstraint.operation, AccessConstraint.Operation.Add); final Constraints newConstraints = super.pop(constraints); if (newConstraints.isEdgeConstraintsEmpty()) return super.wrap(newConstraints); final EdgeConstraint peekConstraint = newConstraints.peekEdgeConstraint(); return super.resolve(phase, edg, edge, newConstraints, peekConstraint, productionDepth); Constraints newConstraints = new Constraints(); return super.wrap(super.push(phase, newConstraints)); // if (existsPreviousAsteriskConstraint(constraints)) // return super.wrap(this.popToAsteriskConstraint(constraints)); // // if (topConstraint.operation == AccessConstraint.Operation.Remove) // return super.wrap(super.push(phase, constraints)); // super.check(topConstraint.operation, AccessConstraint.Operation.Add); // // final Constraints newConstraints = super.pop(constraints); // if (newConstraints.isEdgeConstraintsEmpty()) // return super.wrap(newConstraints); // // final EdgeConstraint peekConstraint = newConstraints.peekEdgeConstraint(); // return super.resolve(phase, edg, edge, newConstraints, peekConstraint, productionDepth); } protected List<Constraints> resolve(Phase phase, EDG edg, Edge edge, Constraints constraints, LiteralConstraint topConstraint, int productionDepth) { Loading @@ -62,19 +65,24 @@ public class AsteriskConstraint extends EdgeConstraint return super.wrap(new Constraints()); super.check(phase, Phase.SummaryGeneration); if (existsPreviousAsteriskConstraint(constraints)) return super.wrap(this.popToAsteriskConstraint(constraints)); return super.wrap(super.push(phase, constraints)); Constraints newConstraints = new Constraints(); return super.wrap(super.push(phase, newConstraints)); // if (existsPreviousAsteriskConstraint(constraints)) // return super.wrap(this.popToAsteriskConstraint(constraints)); // return super.wrap(super.push(phase, constraints)); } protected List<Constraints> resolve(Phase phase, EDG edg, Edge edge, Constraints constraints, GrammarConstraint topConstraint, int productionDepth) { super.check(phase, Phase.SummaryGeneration); // If the constraint prior to a grammar constraint is an asterisk constraint and we traverse another Asterisk if (isPreviousConstraintAsteriskConstraint(constraints)) return super.wrap(this.popToAsteriskConstraint(constraints)); return super.wrap(super.push(phase, constraints)); Constraints newConstraints = new Constraints(); return super.wrap(super.push(phase, newConstraints)); // super.check(phase, Phase.SummaryGeneration); // // // If the constraint prior to a grammar constraint is an asterisk constraint and we traverse another Asterisk // if (isPreviousConstraintAsteriskConstraint(constraints)) // return super.wrap(this.popToAsteriskConstraint(constraints)); // // return super.wrap(super.push(phase, constraints)); } protected List<Constraints> resolve(Phase phase, EDG edg, Edge edge, Constraints constraints, SeekingConstraint topConstraint, int productionDepth) { Loading Loading
EDG/src/main/java/edg/constraint/AsteriskConstraint.java +31 −23 Original line number Diff line number Diff line Loading @@ -42,19 +42,22 @@ public class AsteriskConstraint extends EdgeConstraint return super.wrap(new Constraints()); super.check(phase, Phase.SummaryGeneration); if (existsPreviousAsteriskConstraint(constraints)) return super.wrap(this.popToAsteriskConstraint(constraints)); if (topConstraint.operation == AccessConstraint.Operation.Remove) return super.wrap(super.push(phase, constraints)); super.check(topConstraint.operation, AccessConstraint.Operation.Add); final Constraints newConstraints = super.pop(constraints); if (newConstraints.isEdgeConstraintsEmpty()) return super.wrap(newConstraints); final EdgeConstraint peekConstraint = newConstraints.peekEdgeConstraint(); return super.resolve(phase, edg, edge, newConstraints, peekConstraint, productionDepth); Constraints newConstraints = new Constraints(); return super.wrap(super.push(phase, newConstraints)); // if (existsPreviousAsteriskConstraint(constraints)) // return super.wrap(this.popToAsteriskConstraint(constraints)); // // if (topConstraint.operation == AccessConstraint.Operation.Remove) // return super.wrap(super.push(phase, constraints)); // super.check(topConstraint.operation, AccessConstraint.Operation.Add); // // final Constraints newConstraints = super.pop(constraints); // if (newConstraints.isEdgeConstraintsEmpty()) // return super.wrap(newConstraints); // // final EdgeConstraint peekConstraint = newConstraints.peekEdgeConstraint(); // return super.resolve(phase, edg, edge, newConstraints, peekConstraint, productionDepth); } protected List<Constraints> resolve(Phase phase, EDG edg, Edge edge, Constraints constraints, LiteralConstraint topConstraint, int productionDepth) { Loading @@ -62,19 +65,24 @@ public class AsteriskConstraint extends EdgeConstraint return super.wrap(new Constraints()); super.check(phase, Phase.SummaryGeneration); if (existsPreviousAsteriskConstraint(constraints)) return super.wrap(this.popToAsteriskConstraint(constraints)); return super.wrap(super.push(phase, constraints)); Constraints newConstraints = new Constraints(); return super.wrap(super.push(phase, newConstraints)); // if (existsPreviousAsteriskConstraint(constraints)) // return super.wrap(this.popToAsteriskConstraint(constraints)); // return super.wrap(super.push(phase, constraints)); } protected List<Constraints> resolve(Phase phase, EDG edg, Edge edge, Constraints constraints, GrammarConstraint topConstraint, int productionDepth) { super.check(phase, Phase.SummaryGeneration); // If the constraint prior to a grammar constraint is an asterisk constraint and we traverse another Asterisk if (isPreviousConstraintAsteriskConstraint(constraints)) return super.wrap(this.popToAsteriskConstraint(constraints)); return super.wrap(super.push(phase, constraints)); Constraints newConstraints = new Constraints(); return super.wrap(super.push(phase, newConstraints)); // super.check(phase, Phase.SummaryGeneration); // // // If the constraint prior to a grammar constraint is an asterisk constraint and we traverse another Asterisk // if (isPreviousConstraintAsteriskConstraint(constraints)) // return super.wrap(this.popToAsteriskConstraint(constraints)); // // return super.wrap(super.push(phase, constraints)); } protected List<Constraints> resolve(Phase phase, EDG edg, Edge edge, Constraints constraints, SeekingConstraint topConstraint, int productionDepth) { Loading