I don't understand how the $S$ is needed in dijkstra shortest path algorithm. For each node $v$ in $G.V$, the $v.\pi = previous\_node$ is used to denote it previous node in the shortest path to the current node, and $\rm{}INITIALIZE\rm{-}SINGLE\rm{-}SOURCE(G,s)$ also initialize all $v.\pi=NIL,$ so if it's impossible to reach some node, a simple check $$\textrm{if }v.\pi==NIL$$ is enough. So why the $S$ is needed? If all node can be reached then $S=G.V$ and it will be useless...
Edit: I add the book statement, but I wonder since that the priority queue has been used, the description becomes inconsistent with the pseudocode follows, no need to refer to $V-S$, which will slow down the algorithm?
Edit2: I suspect that priority queue is not a requirement of dijkstra SP algorithm, it's just a technique to speed up it, so the pseudocode in my another question on Dijkstra's SP algorithm is correct?
Edit3: Now I got stuck on my own comment, I suspect it's not correct:
I tried to make use of $S$, so I tried $G.Adj[u]\color{blue}{-S}$ and thought it will speed up the updating, but what if the following happen that the edge $(\color{red}{v,u})$ will not be selected since $\color{blue}S$ is already subtracted?
Book: Introduction to Algorithm 3ed. page 658, (forget about the679 is just pdf reader page #.)