Parallel Program Design: A Foundation