pistachio compiler for KD's own templates