Add function for computing topological sort.
Nothing tested.  Need to also test changes to evalVar()