Source: https://team.inria.fr/reo/files/2013/09/TPnote.pdf