Commit fc1f38dd authored by Carlos Galindo's avatar Carlos Galindo
Browse files

fix: remove topological numbers from GraphNode

parent 02d469e1
Loading
Loading
Loading
Loading
Loading
+1 −16
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@ import es.upv.mist.slicing.graphs.sdg.SDG;
import es.upv.mist.slicing.utils.ASTUtils;

import java.util.*;
import java.util.stream.Collectors;

import static es.upv.mist.slicing.graphs.exceptionsensitive.ESCFG.ACTIVE_EXCEPTION_VARIABLE;

@@ -39,9 +38,6 @@ public class GraphNode<N extends Node> implements Comparable<GraphNode<?>> {
    /** @see #isImplicitInstruction() */
    protected boolean isImplicit = false;

    /** Topological numbers associated to GraphNode */
    protected final Set<Integer> topologicalNumbersSet = new HashSet<>();

    /** Create a graph node, with id and variable actions generated automatically. */
    public GraphNode(String label, N astNode) {
        this(IdHelper.getInstance().getNextId(), label, astNode);
@@ -101,8 +97,7 @@ public class GraphNode<N extends Node> implements Comparable<GraphNode<?>> {

    /** The node's long-form label, including its id and information on variables. */
    public String getLongLabel() {
        String label = "Top - " + getTopologicalNumbersString() + " -";
        label += getId() + ": " + getLabel().replace("\\", "\\\\");
        String label = getId() + ": " + getLabel().replace("\\", "\\\\");
        if (!getVariableActions().isEmpty())
            label += "\\n" + getVariableActions().stream().map(Object::toString).reduce((a, b) -> a + "," + b).orElse("--");
        return label;
@@ -213,16 +208,6 @@ public class GraphNode<N extends Node> implements Comparable<GraphNode<?>> {
        variableActions.add(new VariableAction.CallMarker(call, this, enter));
    }

    public void setTopologicalNumbers(Set<Integer> topologicalNumbers) {
        this.topologicalNumbersSet.addAll(topologicalNumbers);
    }

    public String getTopologicalNumbersString() {
        return this.topologicalNumbersSet.stream()
                .map(String::valueOf)
                .collect(Collectors.joining(","));
    }

    // ============================================================
    // =======================  Overridden  =======================
    // ============================================================