/** Returns a sequence of names labelling a shortest path from the initial node to node q. */
@SuppressWarnings("unchecked")
protected static List<Label> getShortPrefix(DirectedSparseGraph model, Vertex q){
Vertex init = DeterministicDirectedSparseGraph.findInitial(model);
UnweightedShortestPath p = new UnweightedShortestPath(model);
Iterator<Edge> pathIt = ShortestPathUtils.getPath(p, init, q).iterator();
List<Label> list = new LinkedList<Label>();
while(pathIt.hasNext()){
Edge e = pathIt.next();
Set<Label> s = (Set<Label>)e.getUserDatum(JUConstants.LABEL);