Source: https://lacl.u-pec.fr/dima/langages/cours8.pdf