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

Don't reuse the same CFG to compute PPDG exclusive edges.

parent 7860e367
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ public class PPDG extends APDG {

        /** Finds the CD arcs that are only present in the PPDG and marks them as such. */
        protected void markPPDGExclusiveEdges(CallableDeclaration<?> declaration) {
            APDG apdg = new APDG((ACFG) cfg);
            APDG apdg = new APDG();
            apdg.build(declaration);
            Set<Arc> apdgArcs = apdg.edgeSet().stream()
                    .filter(Arc::isUnconditionalControlDependencyArc)
+9 −1
Original line number Diff line number Diff line
@@ -115,7 +115,15 @@ public class JSysPDG extends ESPDG {
        }

        @Override
        protected void expandCalls() {}
        protected void expandCalls() {
            for (GraphNode<?> graphNode : vertexSet()) {
                for (VariableAction action : List.copyOf(graphNode.getVariableActions())) {
                    if (action instanceof VariableAction.Movable) {
                        ((VariableAction.Movable) action).moveOnly();
                    }
                }
            }
        }

        protected void addSyntheticNodesToPDG() {
            for (GraphNode<?> node : cfg.vertexSet()) {