From 8ec8f459fd34deea534022de6101ac2cf7a16762 Mon Sep 17 00:00:00 2001 From: adam Date: Sun, 25 Feb 2007 20:09:31 -0500 Subject: [PATCH] make some methods static in Reduction darcs-hash:20070226010931-5007d-90d0bd5b5a961b8d590e190a47cc3713e4d911ea.gz --- src/edu/berkeley/sbp/Reduction.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/edu/berkeley/sbp/Reduction.java b/src/edu/berkeley/sbp/Reduction.java index e845764..922c60a 100644 --- a/src/edu/berkeley/sbp/Reduction.java +++ b/src/edu/berkeley/sbp/Reduction.java @@ -45,13 +45,13 @@ final class Reduction implements Comparable { return -1 * ret; } - private boolean isRightNullable(Walk.Cache c, Position p) { + private static boolean isRightNullable(Walk.Cache c, Position p) { if (p.isLast()) return true; if (!c.possiblyEpsilon(p.element())) return false; return isRightNullable(c, p.next()); } - public boolean canKill(Walk.Cache cache, Position mep, Position himp) { + public static boolean canKill(Walk.Cache cache, Position mep, Position himp) { if (!isRightNullable(cache, mep)) return false; if (!isRightNullable(cache, himp)) return false; Sequence me = mep.owner(); @@ -78,7 +78,7 @@ final class Reduction implements Comparable { public int pos() { return targetPhase()==null ? 0 : targetPhase().pos; } public GSS.Phase targetPhase() { return node.phase(); } - public boolean canNeed(Walk.Cache cache, Position mep, Position himp) { + public static boolean canNeed(Walk.Cache cache, Position mep, Position himp) { if (!isRightNullable(cache, mep)) return false; if (!isRightNullable(cache, himp)) return false; Sequence me = mep.owner(); -- 1.7.10.4