1 19 20 package soot.dava.internal.SET; 21 22 import java.util.*; 23 import soot.util.*; 24 import soot.jimple.*; 25 import soot.dava.internal.asg.*; 26 import soot.dava.internal.AST.*; 27 import soot.dava.internal.javaRep.*; 28 29 public class SETDoWhileNode extends SETCycleNode 30 { 31 private AugmentedStmt entryPoint; 32 33 public SETDoWhileNode( AugmentedStmt characterizingStmt, AugmentedStmt entryPoint, IterableSet body) 34 { 35 super( characterizingStmt, body); 36 37 this.entryPoint = entryPoint; 38 39 IterableSet subBody = (IterableSet) body.clone(); 40 subBody.remove( characterizingStmt); 41 add_SubBody( subBody); 42 } 43 44 public IterableSet get_NaturalExits() 45 { 46 IterableSet c = new IterableSet(); 47 48 c.add( get_CharacterizingStmt()); 49 50 return c; 51 } 52 53 public ASTNode emit_AST() 54 { 55 return new ASTDoWhileNode( get_Label(), 56 (ConditionExpr) ((IfStmt) get_CharacterizingStmt().get_Stmt()).getCondition(), 57 emit_ASTBody( (IterableSet) body2childChain.get( subBodies.get(0)))); 58 } 59 60 public AugmentedStmt get_EntryStmt() 61 { 62 return entryPoint; 63 } 64 } 65 | Popular Tags |