Formal Methods for Multicore Programming