Static analysis of the determinism of multithreaded programs