Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package soot.dava.internal.SET;
/*-
* #%L
* Soot - a J*va Optimization Framework
* %%
* Copyright (C) 2003 Jerome Miecznikowski
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* .
* #L%
*/
import java.io.PrintStream;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import soot.G;
import soot.dava.DavaBody;
import soot.dava.internal.AST.ASTNode;
import soot.dava.internal.asg.AugmentedStmt;
import soot.dava.toolkits.base.finders.AbruptEdgeFinder;
import soot.dava.toolkits.base.finders.LabeledBlockFinder;
import soot.dava.toolkits.base.finders.SequenceFinder;
import soot.util.IterableSet;
import soot.util.UnmodifiableIterableSet;
public abstract class SETNode {
private static final Logger logger = LoggerFactory.getLogger(SETNode.class);
private IterableSet body;
private final SETNodeLabel label;
protected SETNode parent;
protected AugmentedStmt entryStmt;
protected IterableSet predecessors, successors;
protected LinkedList subBodies;
protected Map body2childChain;
public abstract IterableSet get_NaturalExits();
public abstract ASTNode emit_AST();
public abstract AugmentedStmt get_EntryStmt();
protected abstract boolean resolve(SETNode parent);
public SETNode(IterableSet body) {
this.body = body;
parent = null;
label = new SETNodeLabel();
subBodies = new LinkedList();
body2childChain = new HashMap();
predecessors = new IterableSet();
successors = new IterableSet();
}
public void add_SubBody(IterableSet body) {
subBodies.add(body);
body2childChain.put(body, new IterableSet());
}
public Map get_Body2ChildChain() {
return body2childChain;
}
public List get_SubBodies() {
return subBodies;
}
public IterableSet get_Body() {
return body;
}
public SETNodeLabel get_Label() {
return label;
}
public SETNode get_Parent() {
return parent;
}
public boolean contains(Object o) {
return body.contains(o);
}
public IterableSet get_Successors() {
return successors;
}
public IterableSet get_Predecessors() {
return predecessors;
}
public boolean add_Child(SETNode child, IterableSet children) {
if ((this == child) || (children.contains(child))) {
return false;
}
children.add(child);
child.parent = this;
return true;
}
public boolean remove_Child(SETNode child, IterableSet children) {
if ((this == child) || (children.contains(child) == false)) {
return false;
}
children.remove(child);
child.parent = null;
return true;
}
public boolean insert_ChildBefore(SETNode child, SETNode point, IterableSet children) {
if ((this == child) || (this == point) || (children.contains(point) == false)) {
return false;
}
children.insertBefore(child, point);
child.parent = this;
return true;
}
public List