# HG changeset patch # User one # Date 1355060264 -32400 # Node ID 92cde627701844a5472a080af8223220dcb2c064 # Parent f5c2fad58b7e2f5e396ac0009b7692487293dcce modified each CodeSegment linkage diff -r f5c2fad58b7e -r 92cde6277018 src/alice/test/dpp/codesegment/EatCodeSegment.java --- a/src/alice/test/dpp/codesegment/EatCodeSegment.java Sun Dec 09 22:29:59 2012 +0900 +++ b/src/alice/test/dpp/codesegment/EatCodeSegment.java Sun Dec 09 22:37:44 2012 +0900 @@ -18,7 +18,7 @@ Philosophy phil = arg1.asClass(Philosophy.class); System.out.println(phil.getName() + " is eating."); phil.setState(Philosophy.State.PUTFORK); - new ScheduleCodeSegment(phil.getName()); + new PutForkCodeSegment(phil.getName(), phil.getRightFork(), phil.getLeftFork()); ods.update("local", phil.getName(), phil); } } diff -r f5c2fad58b7e -r 92cde6277018 src/alice/test/dpp/codesegment/PutForkCodeSegment.java --- a/src/alice/test/dpp/codesegment/PutForkCodeSegment.java Sun Dec 09 22:29:59 2012 +0900 +++ b/src/alice/test/dpp/codesegment/PutForkCodeSegment.java Sun Dec 09 22:37:44 2012 +0900 @@ -27,7 +27,7 @@ leftFork.onTheTable(phil.getName()); rightFork.onTheTable(phil.getName()); phil.setState(Philosophy.State.THINK); - new ScheduleCodeSegment(phil.getName()); + new ThinkCodeSegment(phil.getName()); ods.update("local", phil.getName(), phil); ods.update("local", leftFork.getForkName(), leftFork); ods.update("local", rightFork.getForkName(), rightFork); diff -r f5c2fad58b7e -r 92cde6277018 src/alice/test/dpp/codesegment/TakeLeftForkCodeSegment.java --- a/src/alice/test/dpp/codesegment/TakeLeftForkCodeSegment.java Sun Dec 09 22:29:59 2012 +0900 +++ b/src/alice/test/dpp/codesegment/TakeLeftForkCodeSegment.java Sun Dec 09 22:37:44 2012 +0900 @@ -24,7 +24,7 @@ phil.setState(Philosophy.State.EAT); new EatCodeSegment(phil.getName()); } else { - new TakeLeftForkCodeSegment(phil.getName(), phil.getRightFork()); + new TakeLeftForkCodeSegment(phil.getName(), phil.getLeftFork()); } ods.update("local", phil.getName(), phil); ods.update("local", fork.getForkName(), fork); diff -r f5c2fad58b7e -r 92cde6277018 src/alice/test/dpp/codesegment/ThinkCodeSegment.java --- a/src/alice/test/dpp/codesegment/ThinkCodeSegment.java Sun Dec 09 22:29:59 2012 +0900 +++ b/src/alice/test/dpp/codesegment/ThinkCodeSegment.java Sun Dec 09 22:37:44 2012 +0900 @@ -19,7 +19,7 @@ System.out.println(phil.getName() + " is thinking"); // phil.setState(Philosophy.State.TAKEFORK); // dead lock phil.setState(Philosophy.State.TAKERIGHTFORK); - new ScheduleCodeSegment(phil.getName()); + new TakeRightForkCodeSegment(phil.getName(), phil.getRightFork()); ods.update("local", phil.getName(), phil); }