Add function to identify SCCs in programs