Note: For the definition of entity, see section 5.