private void flattenTask(TaskDescriptor td) {
BlockNode bn=state.getMethodBody(td);
FlatNode fn=flattenBlockNode(bn).getBegin();
- FlatFlagActionNode ffan=new FlatFlagActionNode();
+ FlatFlagActionNode ffan=new FlatFlagActionNode(false);
ffan.addNext(fn);
FlatMethod fm=new FlatMethod(td, ffan);
}
private NodePair flattenTaskExitNode(TaskExitNode ten) {
- FlatTaskExitNode tenflat=new FlatTaskExitNode();
- return new NodePair(tenflat,tenflat);
+ FlatFlagActionNode ffan=new FlatFlagActionNode(true);
+ updateFlagActionNode(ffan, ten.getFlagEffects());
+ return new NodePair(ffan, ffan);
}
-
+
private NodePair flattenSubBlockNode(SubBlockNode sbn) {
return flattenBlockNode(sbn.getBlockNode());
}
public static final int FlatNop=10;
public static final int FlatSetElementNode=11;
public static final int FlatElementNode=12;
- public static final int FlatTaskExitNode=13;
- public static final int FlatFlagActionNode=14;
+ public static final int FlatFlagActionNode=13;
}
public class FlatFlagActionNode extends FlatNode {
Hashtable tempflagpairs;
+ boolean taskexit;
- public FlatFlagActionNode() {
+ public FlatFlagActionNode(boolean taskexit) {
tempflagpairs=new Hashtable();
+ this.taskexit=taskexit;
}
public void addFlagAction(TempDescriptor td, FlagDescriptor fd, boolean status) {