framework for partially compiled functions