Bottom-up implementation