use of com.jopdesign.wcet.ipet.IPETBuilder.ExecutionEdge in project jop by jop-devel.
the class IPETUtils method infeasibleEdgeConstraints.
/**
* Compute flow constraints: Infeasible edge constraints
*
* @param g the flow graph
* @param ctx the invocation context
* @return A list of flow constraints
*/
public static <C extends CallStringProvider> List<LinearConstraint<ExecutionEdge>> infeasibleEdgeConstraints(ControlFlowGraph g, IPETBuilder<C> ctx) {
List<LinearConstraint<ExecutionEdge>> constraints = new ArrayList<LinearConstraint<ExecutionEdge>>();
// -- edge = 0
for (CFGEdge edge : ctx.getWCETTool().getInfeasibleEdges(g, ctx.getCallString())) {
LinearConstraint<ExecutionEdge> infeasibleConstraint = new LinearConstraint<ExecutionEdge>(ConstraintType.Equal);
infeasibleConstraint.addLHS(ctx.newEdge(edge));
infeasibleConstraint.addRHS(0);
constraints.add(infeasibleConstraint);
}
return constraints;
}
Aggregations