Implement task compilation