Skip to content

Commit 26aa643

Browse files
committed
wip: testing graph creation
1 parent 684a8f5 commit 26aa643

17 files changed

Lines changed: 440 additions & 596 deletions

File tree

client-java/instrumentation/src/main/java/org/evomaster/client/java/instrumentation/dynamosa/DynamosaConfig.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,33 @@
66
*/
77
public class DynamosaConfig {
88

9-
private static volatile boolean enableGraphs = false;
10-
private static volatile boolean writeCfg = false;
9+
private static volatile boolean enableGraphs = true;
10+
private static volatile boolean writeCfg = true;
1111

12+
1213
public static boolean isGraphsEnabled() {
14+
System.out.println("enableGraphs: " + enableGraphs);
1315
return enableGraphs;
1416
}
1517

1618
public static void setEnableGraphs(boolean value) {
19+
System.out.println("----------------------------------------------");
20+
System.out.println("Setting enableGraphs to " + value);
21+
System.out.println("----------------------------------------------");
1722
enableGraphs = value;
1823
}
1924

2025
public static boolean isWriteCfgEnabled() {
26+
System.out.println("----------------------------------------------");
27+
System.out.println("writeCfg: " + writeCfg);
28+
System.out.println("----------------------------------------------");
2129
return writeCfg;
2230
}
2331

2432
public static void setWriteCfgEnabled(boolean value) {
33+
System.out.println("----------------------------------------------");
34+
System.out.println("Setting writeCfg to " + value);
35+
System.out.println("----------------------------------------------");
2536
writeCfg = value;
2637
}
2738
}

client-java/instrumentation/src/main/java/org/evomaster/client/java/instrumentation/dynamosa/graphs/cdg/DominatorNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* You should have received a copy of the GNU Lesser General Public
1818
* License along with EvoSuite. If not, see <http://www.gnu.org/licenses/>.
1919
*/
20-
package org.evomaster.client.java.graphs.cdg;
20+
package org.evomaster.client.java.instrumentation.dynamosa.graphs.cdg;
2121

2222
import java.util.HashSet;
2323
import java.util.Set;

client-java/instrumentation/src/main/java/org/evomaster/client/java/instrumentation/dynamosa/graphs/cfg/ASMWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public String getType() {
153153
* @return a boolean.
154154
*/
155155
public boolean isActualBranch() {
156-
return isBranch() || isSwitch();
156+
return isBranch();
157157
}
158158

159159
/**

client-java/instrumentation/src/main/java/org/evomaster/client/java/instrumentation/dynamosa/graphs/cfg/BytecodeInstructionFactory.java

Lines changed: 0 additions & 48 deletions
This file was deleted.

client-java/instrumentation/src/main/java/org/evomaster/client/java/instrumentation/dynamosa/graphs/cfg/BytecodeInstructionIdComparator.java

Lines changed: 0 additions & 42 deletions
This file was deleted.

client-java/instrumentation/src/main/java/org/evomaster/client/java/instrumentation/dynamosa/graphs/cfg/BytecodeInstructionPool.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,14 @@ public List<BytecodeInstruction> registerMethodNode(MethodNode node,
8686
for (int instructionId = 0; instructionId < node.instructions.size(); instructionId++) {
8787
AbstractInsnNode instructionNode = node.instructions.get(instructionId);
8888

89-
BytecodeInstruction instruction = BytecodeInstructionFactory.createBytecodeInstruction(classLoader,
89+
BytecodeInstruction instruction = new BytecodeInstruction(
90+
classLoader,
9091
className,
9192
methodName,
9293
instructionId,
9394
bytecodeOffset,
94-
instructionNode);
95+
instructionNode
96+
);
9597

9698
if (instruction.isLineNumber())
9799
lastLineNumber = instruction.getLineNumber();

client-java/instrumentation/src/main/java/org/evomaster/client/java/instrumentation/dynamosa/graphs/cfg/CFGClassAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.evomaster.client.java.graphs.cfg;
1+
package org.evomaster.client.java.instrumentation.dynamosa.graphs.cfg;
22

33
import org.objectweb.asm.ClassVisitor;
44
import org.objectweb.asm.MethodVisitor;

client-java/instrumentation/src/main/java/org/evomaster/client/java/instrumentation/dynamosa/graphs/cfg/CFGFrame.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* You should have received a copy of the GNU Lesser General Public
1818
* License along with EvoSuite. If not, see <http://www.gnu.org/licenses/>.
1919
*/
20-
package org.evomaster.client.java.graphs.cfg;
20+
package org.evomaster.client.java.instrumentation.dynamosa.graphs.cfg;
2121

2222
import org.objectweb.asm.tree.analysis.Frame;
2323

client-java/instrumentation/src/main/java/org/evomaster/client/java/instrumentation/dynamosa/graphs/cfg/EntryBlock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* You should have received a copy of the GNU Lesser General Public
1818
* License along with EvoSuite. If not, see <http://www.gnu.org/licenses/>.
1919
*/
20-
package org.evomaster.client.java.graphs.cfg;
20+
package org.evomaster.client.java.instrumentation.dynamosa.graphs.cfg;
2121

2222
public class EntryBlock extends BasicBlock {
2323

client-java/instrumentation/src/main/java/org/evomaster/client/java/instrumentation/dynamosa/graphs/cfg/ExitBlock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* You should have received a copy of the GNU Lesser General Public
1818
* License along with EvoSuite. If not, see <http://www.gnu.org/licenses/>.
1919
*/
20-
package org.evomaster.client.java.graphs.cfg;
20+
package org.evomaster.client.java.instrumentation.dynamosa.graphs.cfg;
2121

2222
public class ExitBlock extends BasicBlock {
2323

0 commit comments

Comments
 (0)