Commit bcd4f364 authored by Sergio Pérez's avatar Sergio Pérez
Browse files

* Summary Generation traversal fix

* Call arcs to clause nodes
parent 10f9343d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -350,7 +350,7 @@ public class InterproceduralEdgeGenerator extends EdgeGenerator
				if (argumentResult != null && parameterResult != null)
					this.edg.addEdge(argumentResult, parameterResult, new Edge(Edge.Type.Input, new PhaseConstraint(Phase.Input)));
			}
			this.edg.addEdge(calleeResult, clauseResult, new Edge(Edge.Type.Call, new PhaseConstraint(Phase.Input)));
			this.edg.addEdge(calleeResult, matchingClause, new Edge(Edge.Type.Call, new PhaseConstraint(Phase.Input)));
		}
	}
	private List<Node> getPossibleClausesErlang(Node call)
+9 −8
Original line number Diff line number Diff line
@@ -75,12 +75,12 @@ long worksProcessed = 0;
//	continue;
			
// TODO Borrame
worksProcessed++;
final String id = work.getId();
final Integer prev = ids.get(id);
ids.put(id, prev == null ? 0 : prev + 1);
if (prev != null && prev == 100000)
System.out.println(work.getId() + " - " + work.getConstraints().getEdgeConstraints().toString());
//worksProcessed++;
//final String id = work.getId();
//final Integer prev = ids.get(id);
//ids.put(id, prev == null ? 0 : prev + 1);
//if (prev != null && prev == 100000)
//System.out.println(work.getId() + " - " + work.getConstraints().getEdgeConstraints().toString());
			final Node initialNode = work.getInitialNode();
			
//final int initialNodeId = initialNode.getId();
@@ -101,8 +101,9 @@ System.out.println(work.getId() + " - " + work.getConstraints().getEdgeConstrain
				if (currentNode == edg.getNodeFromRes(initialNode) || currentNode == edg.getParent(initialNode))
					continue;

				// ESTO SE USA PARA EVITAR BUCLES INFINITOS AL GENERAR SUMMARIES, SE PIERDE PRECISION Y PUEDE DAR COMO RESULTADO GRAMATICAS INCOMPLETAS O INCLUSO ERRONEAS
				if (workList.getDoneNodes().contains(currentNode) && edg.getParent(initialNode).getType() != Node.Type.Clause)
				// This avoids the multiple evaluation of the same expressions which are in a circular dependency
				// WARNING: This may lead to incomplete grammars due to lack of looped constraints
				if (workList.getDoneNodes().contains(currentNode) && edg.getNodeFromRes(initialNode).getType() != Node.Type.Clause)
					continue;

				if (isFormalIn = this.isFormalIn(currentNode, initialNode))