ANCLETO: a template-based P3L compiler