Source: http://www.dcc.fc.up.pt/~edrdo/QSES1819/lectures/qses-13-concurrency.pdf